Michael Pasternak has submitted this change and it was merged.
Change subject: restapi: fix usb mapping on update vm call
......................................................................
restapi: fix usb mapping on update vm call
Change the way usb policy is set on update vm/template request which is
received through rest api. The full mapping is described in the bug-url.
Specifically, the new mapping states that if no usb setting is defined
in the update request, the previous usb policy will remain as is
(instead of being set to DISABLED as it was before), thus it solves
bug #875881.
UsbResourceUtils class methods moved to VmMapper class, and it was
removed on the way (the same was done for UsbResourceUtilsTest class,
its methods moved to VmMapperTest class).
Change-Id: If74bf6ede2fc0f932db8dfcd7951b6bcf90b7744
Bug-Url:
https://bugzilla.redhat.com/875881
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTemplateResource.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTemplatesResource.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
D
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/utils/UsbResourceUtils.java
D
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/utils/test/UsbResourceUtilsTest.java
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/TemplateMapper.java
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
M
backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/VmMapperTest.java
9 files changed, 334 insertions(+), 146 deletions(-)
Approvals:
Michael Pasternak: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/9792
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If74bf6ede2fc0f932db8dfcd7951b6bcf90b7744
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>