Change in ovirt-engine[master]: restapi: Ignore failures fetching cluster policy

Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Ignore failures fetching cluster policy ...................................................................... restapi: Ignore failures fetching cluster policy Currently when a cluster is fetched in version 3 of the API an additional query is performed to retrieve the details of its associated scheduling policy, as that is how it used to work. But this additional query may require additional permissions for some users, and when this happens the complete cluster fetch fails. To alleviate that problem this patch changes the API so that failures to fetch the scheduling policy will just be ignored. As most users won't be interersted in those details this should solve most use cases. When a user without the required permissions fetches the cluster she will get only the reference, and not the details: GET /clusters Authorization: myuser@mydomain:... Filter: true <cluster id="123" href="/clusters/123"> ... <scheduling_policy id="456" href="/schedulingpolicies/456"/> ... </cluster> When the user has the required permissions he will get all the details of the scheduling policy. Change-Id: I23b0ef3830f8291d725fa8fce241c8e0c12309be Bug-Url: https://bugzilla.redhat.com/1364048 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/adapters/V3ClusterOutAdapter.java 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved Jenkins CI: Passed CI tests Roy Golan: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/62172 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23b0ef3830f8291d725fa8fce241c8e0c12309be 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: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
juan.hernandez@redhat.com