Search in sources :

Example 1 with RemoveVmTemplateInterfaceModel

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

the class NetworkTemplateListModel method remove.

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

Example 2 with RemoveVmTemplateInterfaceModel

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

the class TemplateInterfaceListModel method remove.

private void remove() {
    if (getWindow() != null) {
        return;
    }
    RemoveVmTemplateInterfaceModel model = new RemoveVmTemplateInterfaceModel(this, getSelectedItems(), false);
    setWindow(model);
}
Also used : RemoveVmTemplateInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmTemplateInterfaceModel)

Aggregations

RemoveVmTemplateInterfaceModel (org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmTemplateInterfaceModel)2 ArrayList (java.util.ArrayList)1 VmTemplate (org.ovirt.engine.core.common.businessentities.VmTemplate)1 VmNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface)1