Search in sources :

Example 6 with VmDiskOperationParameterBase

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

the class VmDiskListModel method createPlugOrUnplugParams.

private ArrayList<ActionParametersBase> createPlugOrUnplugParams(boolean plug) {
    ArrayList<ActionParametersBase> parametersList = new ArrayList<>();
    VM vm = getEntity();
    for (Object item : getSelectedItems()) {
        Disk disk = (Disk) item;
        disk.setPlugged(plug);
        parametersList.add(new VmDiskOperationParameterBase(new DiskVmElement(disk.getId(), vm.getId())));
    }
    return parametersList;
}
Also used : VM(org.ovirt.engine.core.common.businessentities.VM) ArrayList(java.util.ArrayList) DiskVmElement(org.ovirt.engine.core.common.businessentities.storage.DiskVmElement) CinderDisk(org.ovirt.engine.core.common.businessentities.storage.CinderDisk) Disk(org.ovirt.engine.core.common.businessentities.storage.Disk) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) VmDiskOperationParameterBase(org.ovirt.engine.core.common.action.VmDiskOperationParameterBase)

Aggregations

VmDiskOperationParameterBase (org.ovirt.engine.core.common.action.VmDiskOperationParameterBase)6 DiskVmElement (org.ovirt.engine.core.common.businessentities.storage.DiskVmElement)3 ArrayList (java.util.ArrayList)1 DiskAttachment (org.ovirt.engine.api.model.DiskAttachment)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 CinderDisk (org.ovirt.engine.core.common.businessentities.storage.CinderDisk)1 Disk (org.ovirt.engine.core.common.businessentities.storage.Disk)1 ImageStatus (org.ovirt.engine.core.common.businessentities.storage.ImageStatus)1 IFrontendActionAsyncCallback (org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback)1