Change in ovirt-engine[master]: restapi: Replace "storage_manager" with "spm"
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Wed Sep 17 08:35:02 UTC 2014
Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: Replace "storage_manager" with "spm"
......................................................................
restapi: Replace "storage_manager" with "spm"
Currently the SPM priority of a host is modeled in the RESTAPI as an
attribute of an element that also has text content:
<host>
<storage_manager priority="5">true</storage_manager>
</host>
This means that it is impossible to send an udpate containing only the
priority and not the text content. For example, a document like the
following:
<host>
<storage_manager priority="5"/>
</host>
Is not valid because the text is declared as xs:boolean, and an empty
text isn't a valid value.
To avoid this issue this patch removes the "storage_manager" element
from the RSDL metadata and introduces a new "spm" element that contains
inner elements for the priority and the SPM status. For example:
<host>
<spm>
<priority>5</priority>
<status>
<state>spm</state>
</status>
</spm>
</host>
This way clients can send updates for only the priority:
<host>
<spm>
<priority>6</priority>
</spm>
</host>
The previous "storage_manager" element and its behaviour are preserved
for backwards compatibility, but removed from the RSDL metadata.
Change-Id: I9bb8dba2385b1219f6d90fa99692a79fc7cb36b7
Bug-Url: https://bugzilla.redhat.com/1136061
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/SpmState.java
M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/HostMapperTest.java
6 files changed, 120 insertions(+), 6 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Daniel Erez: Looks good to me, approved
Allon Mureinik: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.ovirt.org/32274
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9bb8dba2385b1219f6d90fa99692a79fc7cb36b7
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list