Change in ovirt-engine[ovirt-engine-3.4]: restapi: Preserve labels when setup networks is sent

iheim at redhat.com iheim at redhat.com
Tue Jan 28 14:21:35 UTC 2014


Itamar Heim has submitted this change and it was merged.

Change subject: restapi: Preserve labels when setup networks is sent
......................................................................


restapi: Preserve labels when setup networks is sent

The setup networks api doesn't use the patch
mechanism to preserve any interface's properties that
wasn't sent by the user. Instead, it creates a new
interface entity and set only the provided nic attributes.
Since labels are maintained as a sub-collection on the
nic entity, it should not be deleted for each setup networks
request.

This logic cannot reside on the engine side, since there will
be no distinction between setup networks sent by the UI, in
which the labels can be provided or removed, to the rest in
which labels cannot be provided and should be preserved.

Change-Id: Ic2b728a4797d03d6718e6c9b0b6adec6dcf3bbff
Bug-Url: https://bugzilla.redhat.com/1055441
Signed-off-by: Moti Asayag <masayag at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicsResource.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostNicsResourceTest.java
2 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Juan Hernandez: Looks good to me, approved
  Moti Asayag: Verified



-- 
To view, visit http://gerrit.ovirt.org/23524
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2b728a4797d03d6718e6c9b0b6adec6dcf3bbff
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list