use of org.ovirt.engine.core.common.action.AddExternalSubnetParameters in project ovirt-engine by oVirt.
the class BackendOpenStackSubnetsResource method add.
@Override
public Response add(OpenStackSubnet subnet) {
AddExternalSubnetParameters parameters = new AddExternalSubnetParameters();
parameters.setSubnet(map(subnet));
parameters.setProviderId(asGuid(providerId));
parameters.setNetworkId(networkId);
return performCreate(ActionType.AddSubnetToProvider, parameters, new SubnetNameResolver(subnet.getName()));
}
use of org.ovirt.engine.core.common.action.AddExternalSubnetParameters in project ovirt-engine by oVirt.
the class NewExternalSubnetModel method onSave.
private void onSave() {
if (!validate()) {
return;
}
// Save changes.
flush();
startProgress();
ProviderNetwork providedBy = getNetwork().getEntity().getProvidedBy();
Frontend.getInstance().runAction(ActionType.AddSubnetToProvider, new AddExternalSubnetParameters(getSubnetModel().getSubnet(), providedBy.getProviderId(), providedBy.getExternalId()), result -> {
ActionReturnValue returnValue = result.getReturnValue();
stopProgress();
if (returnValue != null && returnValue.getSucceeded()) {
cancel();
}
}, this, true);
}
use of org.ovirt.engine.core.common.action.AddExternalSubnetParameters in project ovirt-engine by oVirt.
the class AddNetworkWithSubnetOnProviderCommand method postAddNetwork.
@Override
protected void postAddNetwork(Guid providerId, String externalId) {
ExternalSubnet externalSubnet = getParameters().getExternalSubnet();
if (externalSubnet != null) {
AddExternalSubnetParameters subnetParameters = new AddExternalSubnetParameters(externalSubnet, providerId, externalId);
backend.runInternalMultipleActions(ActionType.AddSubnetToProvider, Arrays.asList(subnetParameters));
}
}
Aggregations