Search in sources :

Example 1 with RemoveVmInterfaceModel

use of org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmInterfaceModel in project ovirt-engine by oVirt.

the class NetworkVmListModel method remove.

private void remove() {
    if (getWindow() != null) {
        return;
    }
    List<VmNetworkInterface> vnics = new ArrayList<>();
    for (Object item : getSelectedItems()) {
        PairQueryable<VmNetworkInterface, VM> pair = (PairQueryable<VmNetworkInterface, VM>) item;
        vnics.add(pair.getFirst());
    }
    RemoveVmInterfaceModel model = new RemoveVmInterfaceModel(this, vnics, true);
    setWindow(model);
}
Also used : PairQueryable(org.ovirt.engine.core.common.utils.PairQueryable) RemoveVmInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmInterfaceModel) VmNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface) VM(org.ovirt.engine.core.common.businessentities.VM) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 VmNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface)1 PairQueryable (org.ovirt.engine.core.common.utils.PairQueryable)1 RemoveVmInterfaceModel (org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmInterfaceModel)1