Change in ovirt-engine[master]: restapi: cast list results to single entity

Juan Hernandez has submitted this change and it was merged. Change subject: restapi: cast list results to single entity ...................................................................... restapi: cast list results to single entity In change 88756e3 (core: Remove usage of dynamic queries from the Backend) the dynamic queries were removed from the restapi Backend. The change didn't take in account that some of the queries were used to retrieve only one item and therefore doGetEntity should handle the case (as the old deprecated getEntity method). An example of the problem was adding a cluster: # add cluster --data_center-name DataCenter1 --name Cluster1 failing with a java.lang.ClassCastException (Cannot cast ArrayList to StoragePool). Change-Id: I7e96a62cd7a5429a5102c7a9134bee8754b3d128 Signed-off-by: Federico Simoncelli <fsimonce@redhat.com> --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java 1 file changed, 19 insertions(+), 13 deletions(-) Approvals: Juan Hernandez: Looks good to me, approved Federico Simoncelli: Verified -- To view, visit http://gerrit.ovirt.org/28359 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e96a62cd7a5429a5102c7a9134bee8754b3d128 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <fsimonce@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimonce@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzelkha@redhat.com> Gerrit-Reviewer: automation@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
juan.hernandez@redhat.com