Change in ovirt-engine[master]: restapi: Move Cluster remove from collection to entity

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Jun 2 08:18:19 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Move Cluster remove from collection to entity
......................................................................


restapi: Move Cluster remove from collection to entity

Currently the methods implementing the DELETE operation are part of the
collection interfaces. This causes an issue with recent version of
Resteasy that implement the JAX-RS specification strictly. The issue is
that the remove resource method and the subresource locator use the same
URI pattern "/cluster/{id}". According to the JAX-RS specification when
two methods use the same URI pattern the resource method should be used
and the resource locator should be ignored. See section 3.7.2, step 2.h
of the resource matching algorithm. To avoid this problem this patch
moves the remove method from the collection resource to the entity
resource, but only for the cluster entity. Subsequent patches will move
all the other remove methods.

Change-Id: Ife8a3eb08ab379ffc0ea7b41c49f164cb55c15f2
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/ClusterResource.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/ClustersResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClustersResource.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendClusterResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendClustersResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendDataCenterClusterResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendDataCenterClustersResourceTest.java
9 files changed, 167 insertions(+), 141 deletions(-)

Approvals:
  Ori Liel: Looks good to me, approved
  Juan Hernandez: Verified
  Jenkins CI: Verified; Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/41783
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife8a3eb08ab379ffc0ea7b41c49f164cb55c15f2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list