Alona Kaplan has uploaded a new change for review. Change subject: restapi: Cannot remove custom properties from a vnic ......................................................................
restapi: Cannot remove custom properties from a vnic When passing <custom_properties/> to update vm, the custom properties on the vm aren't removed. Just when passing - <custom_properties> <custom_property/> </custom_properties> the custom properties are removed. The mapper shouldn't ignore the custom properties if vm.isSetCustomProperties()==true (Even if vm.getCustomProperties().isSetCustomProperty()==false). Change-Id: I9ba6f59eb08bc33b0f93848f9cd1bcba360605e1 Bug-Url: https://bugzilla.redhat.com/967874 Signed-off-by: Alona Kaplan <alkap...@redhat.com> --- M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/15137/1 diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java index a464f46..0d7386a 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java @@ -230,7 +230,7 @@ if (vm.isSetTimezone()) { staticVm.setTimeZone(TimeZoneMapping.getWindows(vm.getTimezone())); } - if (vm.isSetCustomProperties() && vm.getCustomProperties().isSetCustomProperty()) { + if (vm.isSetCustomProperties()) { staticVm.setCustomProperties(CustomPropertiesParser.parse(vm.getCustomProperties().getCustomProperty())); } if (vm.isSetQuota() && vm.getQuota().isSetId()) { @@ -459,7 +459,7 @@ params.setFloppyPath(file); } } - if (vm.isSetCustomProperties() && vm.getCustomProperties().isSetCustomProperty()) { + if (vm.isSetCustomProperties()) { params.setCustomProperties(CustomPropertiesParser.parse(vm.getCustomProperties().getCustomProperty())); } if (vm.isSetOs()) { -- To view, visit http://gerrit.ovirt.org/15137 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ba6f59eb08bc33b0f93848f9cd1bcba360605e1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches