Search in sources :

Example 11 with ExternalSubnet

use of org.ovirt.engine.core.common.businessentities.network.ExternalSubnet 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));
    }
}
Also used : AddExternalSubnetParameters(org.ovirt.engine.core.common.action.AddExternalSubnetParameters) ExternalSubnet(org.ovirt.engine.core.common.businessentities.network.ExternalSubnet)

Example 12 with ExternalSubnet

use of org.ovirt.engine.core.common.businessentities.network.ExternalSubnet in project ovirt-engine by oVirt.

the class RemoveExternalSubnetModel method onRemove.

private void onRemove() {
    ArrayList<ActionParametersBase> list = new ArrayList<>();
    for (ExternalSubnet subnet : getSubnets()) {
        ActionParametersBase parameters = new ExternalSubnetParameters(subnet);
        list.add(parameters);
    }
    startProgress();
    Frontend.getInstance().runMultipleAction(ActionType.RemoveSubnetFromProvider, list, false, result -> {
        stopProgress();
        sourceListModel.getSearchCommand().execute();
        cancel();
    }, null);
}
Also used : ExternalSubnet(org.ovirt.engine.core.common.businessentities.network.ExternalSubnet) ArrayList(java.util.ArrayList) ExternalSubnetParameters(org.ovirt.engine.core.common.action.ExternalSubnetParameters) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase)

Aggregations

ExternalSubnet (org.ovirt.engine.core.common.businessentities.network.ExternalSubnet)12 ArrayList (java.util.ArrayList)4 Subnet (com.woorea.openstack.quantum.model.Subnet)3 ExternalSubnetParameters (org.ovirt.engine.core.common.action.ExternalSubnetParameters)2 Subnets (com.woorea.openstack.quantum.model.Subnets)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 Mapping (org.ovirt.engine.api.restapi.types.Mapping)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 AddExternalSubnetParameters (org.ovirt.engine.core.common.action.AddExternalSubnetParameters)1 GetExternalSubnetsOnProviderByExternalNetworkQueryParameters (org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters)1