Ayal Baron has posted comments on this change.
Change subject: engine: Import linux VM with legacy usb policy (#834254)
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 360:
getParameters().getVm().setusb_policy(UsbPolicy.DISABLED);
Just do:
VM vm = getParameters().getVm();
if vm.getos().isLinux() &&
vm.getusb_policy().equals(UsbPolicy.ENABLED_LEGACY) {
vm.setusb_policy(UsbPolicy.DISABLED);
}
Much easier on the eye.
(also you were missing parenthesis).
Line 362: retVal =
VmHandler.isUsbPolicyLegal(getParameters().getVm().getusb_policy(),
getParameters().getVm().getos(), getVdsGroup(),
getReturnValue().getCanDoActionMessages());
while you're at it you could shorten above line with vm.
--
To view, visit http://gerrit.ovirt.org/6612
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0dd8f02add7082422bd9897e64b10ca3c8396a1b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches