
Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Use matrix parameters for force remove storage domain ...................................................................... restapi: Use matrix parameters for force remove storage domain The operation that removes a storage domain supports the "force", "destroy" and "host" parameters. These parameters were passed to the "DELETE" method using the representation of the storage domain as the body: DELETE /storagedomains/{storagedomain:id} <storage_domain> <force>...</force> <destroy>...</destroy> <host id="..."> <name>...</name> </host> </storage_domain> This is problematic, as the HTTP "DELETE" method shouldn't have a body, and the representation of the storage domain shouldn't include things that aren't attributes of the storage domain, rather parameters of the operation. This patch replaces the "force", "delete" and "host" attributes by equivalent matrix parameters, and the operation doesn't now accept a body. For example, after this patch, the way to delete a storage domain with the "force" parameter is the following: DELETE /storagedomain/{storagedomain:id};host=myhost;force=true To delete with the "destroy" parameter: DELETE /storagedomain/{storagedomain:id};host=myhost;destroy=true Change-Id: I87d4a9a29fcd9af794ecbedb1b255e676541ee13 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/README.md M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageDomainResource.java 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/BackendStorageDomainResource.java M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResourceTest.java M backend/manager/modules/restapi/model/src/main/java/types/StorageDomain.java 6 files changed, 171 insertions(+), 113 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/47887 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87d4a9a29fcd9af794ecbedb1b255e676541ee13 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: automation@ovirt.org