Tal Nisan 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(a)redhat.com>
Signed-off-by: Maor Lipchuk <mlipchuk(a)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: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Allon Mureinik: Looks good to me, approved
Maor Lipchuk: Verified
--
To view, visit
https://gerrit.ovirt.org/43000
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4033daddfca8f6d25ee2a1efd03fa2b65a48c6f4
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org