Change in ovirt-engine[master]: restapi: The "isattached" action should return an action object

Juan Hernandez has submitted this change and it was merged. Change subject: restapi: The "isattached" action should return an action object ...................................................................... restapi: The "isattached" action should return an action object Currently the "isattached" action of the storage domain resource returns a storage domain object. For example, the following HTTP request: POST /api/storagedomains/{storagedomain:id}/isattached <action> <host id="{host:id}"/> </action> Returns the following response: <storage_domain id="{storagedomain:id}"> <is_attached>true</is_attached> </storage_domain> This isn't correct, because all actions are expected to return an action object. Returning something different causes issues in the SDKs. The returned result should look like this: <action> <status> <state>complete</state> </status> <is_attached>true</is_attached> </action> There is no need to return the storage domain object, only the "is_attached" flag, and it should be an attribute of the action object, not of the storage domain. This patch modifies the storage domain resource so that this action works as described above. Change-Id: I4033daddfca8f6d25ee2a1efd03fa2b65a48c6f4 Bug-Url: https://bugzilla.redhat.com/1234937 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java 2 files changed, 28 insertions(+), 21 deletions(-) Approvals: Juan Hernandez: Verified; Passed CI tests Allon Mureinik: Looks good to me, but someone else must approve Maor Lipchuk: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/42895 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4033daddfca8f6d25ee2a1efd03fa2b65a48c6f4 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: automation@ovirt.org
participants (1)
-
juan.hernandez@redhat.com