use of org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters in project ovirt-engine by oVirt.
the class EditNetworkModel method executeSave.
@Override
public void executeSave() {
Frontend.getInstance().runAction(ActionType.UpdateNetwork, new AddNetworkStoragePoolParameters(getSelectedDc().getId(), getNetwork()), result -> {
ActionReturnValue retVal = result.getReturnValue();
postSaveAction(null, retVal != null && retVal.getSucceeded());
}, null);
}
use of org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters in project ovirt-engine by oVirt.
the class InternalImportExternalNetworkCommand method addNetwork.
private ActionReturnValue addNetwork(Guid dataCenterId, Network network, boolean attachToAllClusters) {
AddNetworkStoragePoolParameters params = new AddNetworkStoragePoolParameters(dataCenterId, network);
params.setVnicProfilePublicUse(getParameters().isPublicUse());
if (attachToAllClusters) {
params.setNetworkClusterList(networkHelper.createNetworkClusters(getAllClusterIdsInDataCenter(dataCenterId)));
}
return runInternalAction(ActionType.AddNetwork, params);
}
use of org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters in project ovirt-engine by oVirt.
the class BackendOpenStackNetworkResource method doImport.
@Override
public Response doImport(Action action) {
validateParameters(action, "dataCenter.id|name");
Guid dataCenterId = getDataCenterId(action);
ProviderNetwork providerNetwork = new ProviderNetwork(new Guid(providerId), id);
Network network = new Network();
network.setProvidedBy(providerNetwork);
network.setDataCenterId(dataCenterId);
network.setName(getNetwork().getName());
AddNetworkStoragePoolParameters parameters = new AddNetworkStoragePoolParameters(dataCenterId, network);
return doAction(ActionType.AddNetwork, parameters, action);
}
use of org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters in project ovirt-engine by oVirt.
the class BackendDataCenterNetworksResource method add.
@Override
public Response add(Network network) {
validateParameters(network, getRequiredAddFields());
DataCenter dataCenter = new DataCenter();
dataCenter.setId(dataCenterId.toString());
network.setDataCenter(dataCenter);
org.ovirt.engine.core.common.businessentities.network.Network entity = map(network);
AddNetworkStoragePoolParameters params = getAddParameters(network, entity);
return performCreate(network.isSetExternalProvider() ? ActionType.AddNetworkOnProvider : addAction, params, new DataCenterNetworkIdResolver(network.getName(), params.getStoragePoolId().toString()));
}
use of org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters in project ovirt-engine by oVirt.
the class SyncNetworkProviderCommand method updateNetwork.
private void updateNetwork(Guid dataCenterId, Network externalNetwork, Network networkInDataCenter) {
if (!networkInDataCenter.getName().equals(externalNetwork.getName())) {
networkInDataCenter.setName(externalNetwork.getName());
AddNetworkStoragePoolParameters parameters = new AddNetworkStoragePoolParameters(dataCenterId, networkInDataCenter);
propagateReturnValue(runInternalAction(ActionType.UpdateNetwork, parameters, getInternalCommandContext()));
}
}
Aggregations