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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to