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

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Wed Aug 10 08:05:55 UTC 2016


Piotr Kliczewski 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 at 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 at redhat.com>
(cherry picked from commit 12fffe432e03396ed62e3984116df46ea7d78e5a)
---
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:
  Sandro Bonazzola: Looks good to me, but someone else must approve
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23b0ef3830f8291d725fa8fce241c8e0c12309be
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list