Search in sources :

Example 1 with RemoveNetworkParameters

use of org.ovirt.engine.core.common.action.RemoveNetworkParameters in project ovirt-engine by oVirt.

the class RemoveNetworksModel method onRemove.

public void onRemove() {
    ArrayList<ActionParametersBase> pb = new ArrayList<>();
    for (Object a : sourceListModel.getSelectedItems()) {
        Network network = (Network) a;
        if (network.isExternal()) {
            pb.add(new RemoveNetworkParameters(network.getId(), getForce().getEntity()));
        } else {
            pb.add(new RemoveNetworkParameters(network.getId()));
        }
    }
    Frontend.getInstance().runMultipleAction(ActionType.RemoveNetwork, pb);
    sourceListModel.setConfirmWindow(null);
}
Also used : Network(org.ovirt.engine.core.common.businessentities.network.Network) ArrayList(java.util.ArrayList) RemoveNetworkParameters(org.ovirt.engine.core.common.action.RemoveNetworkParameters) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase)

Aggregations

ArrayList (java.util.ArrayList)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 RemoveNetworkParameters (org.ovirt.engine.core.common.action.RemoveNetworkParameters)1 Network (org.ovirt.engine.core.common.businessentities.network.Network)1