Arik Hadas has posted comments on this change. Change subject: restapi,engine: fix usb mapping on update vm call ......................................................................
Patch Set 2: (1 inline comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/utils/UsbResourceUtils.java Line 5: import org.ovirt.engine.core.common.businessentities.UsbPolicy; Line 6: import org.ovirt.engine.core.common.businessentities.VDSGroup; Line 7: import org.ovirt.engine.core.compat.Version; Line 8: Line 9: public class UsbResourceUtils { I think it wasn't part of VmMapper originally because you need to know the VDSGroup (in order to determine what is the USB policy if it's not explicitly set in the request) and you don't have access to it from the VmMapper's methods scope but you probably know the history of those class better - isn't it the reason why it wasn't implemented there in the first place? Line 10: public static UsbPolicy getUsbPolicyOnCreate(Usb usb, VDSGroup vdsGroup) { Line 11: UsbPolicy usbPolicy = null; Line 12: if (usb == null || !usb.isSetEnabled() || !usb.isEnabled()) { Line 13: usbPolicy = UsbPolicy.DISABLED; -- To view, visit http://gerrit.ovirt.org/9792 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If74bf6ede2fc0f932db8dfcd7951b6bcf90b7744 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches