<div dir="ltr"><div><div><div><div><div><div><div><font size="2">Hi,<br></font></div><font size="2">to get a reference for users and roles for a specific quota you can use:<br><br>.../ovirt-engine/api/datacenters/{datacenter: id}/quotas/{quota: id}/permissions<br><br></font></div><font size="2"><br></font></div><font size="2">for example:<br><br></font></div><font size="2">GET <a href="http://localhost:8080/ovirt-engine/api/datacenters/59746a95-0352-0329-02fd-00000000026f/quotas/a86e8efd-7650-412d-8e3d-5d9729e891d6/permissions">http://localhost:8080/ovirt-engine/api/datacenters/59746a95-0352-0329-02fd-00000000026f/quotas/a86e8efd-7650-412d-8e3d-5d9729e891d6/permissions</a><br><br></font></div><font size="2">result: <br><span style="color:rgb(0,0,0)"><br></span></font><div class="gmail-node" style="margin:1px 0px;font-family:monospace;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail-processing"><span style="color:rgb(0,0,0)"><font size="2"><?xml version="1.0" encoding="UTF-8" standalone="yes" ?></font></span></div></div><div class="gmail-node" style="margin:1px 0px;font-family:monospace;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:rgb(0,0,0)"><font size="2"><span style="cursor: pointer;"></span><span class="gmail-punctuation"><</span><span class="gmail-tagname">permissions</span><span class="gmail-punctuation">></span></font></span><div class="gmail-nodeMargin" style="margin-left:44px"><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span style="cursor: pointer;"></span><span class="gmail-punctuation"><</span><span class="gmail-tagname">permission</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/groups/eee00000-0000-0000-0000-123456789eee/permissions/58ca605c-010d-0307-0224-0000000001a9"</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"58ca605c-010d-0307-0224-0000000001a9"</span><span class="gmail-punctuation">></span></font></span><div class="gmail-nodeMargin" style="margin-left:44px"><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-punctuation"><</span><span class="gmail-tagname">group</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/groups/eee00000-0000-0000-0000-123456789eee"</span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"eee00000-0000-0000-0000-123456789eee"</span><span class="gmail-punctuation"><span class="gmail-Apple-converted-space"> </span>/></span></font></span></div><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-punctuation"><</span><span class="gmail-tagname">role</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/roles/def00021-0000-0000-0000-def000000015"</span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"def00021-0000-0000-0000-def000000015"</span><span class="gmail-punctuation"><span class="gmail-Apple-converted-space"> </span>/></span></font></span></div></div><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-arrowEmpty" style="display:inline-block;width:24px;height:18px"> </span><span class="gmail-punctuation end"></</span><span class="gmail-tagname end">permission</span><span class="gmail-punctuation">></span></font></span></div><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span style="cursor: pointer;"></span><span class="gmail-punctuation"><</span><span class="gmail-tagname">permission</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214/permissions/59746ab4-019c-0034-010f-000000000206"</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"59746ab4-019c-0034-010f-000000000206"</span><span class="gmail-punctuation">></span></font></span><div class="gmail-nodeMargin" style="margin-left:44px"><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-punctuation"><</span><span class="gmail-tagname">role</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/roles/00000000-0000-0000-0000-000000000001"</span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"00000000-0000-0000-0000-000000000001"</span><span class="gmail-punctuation"><span class="gmail-Apple-converted-space"> </span>/></span></font></span></div><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-punctuation"><</span><span class="gmail-tagname">user</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214"</span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"59746ab4-033f-0194-0334-000000000214"</span><span class="gmail-punctuation"><span class="gmail-Apple-converted-space"> </span>/></span></font></span></div></div><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-arrowEmpty" style="display:inline-block;width:24px;height:18px"> </span><span class="gmail-punctuation end"></</span><span class="gmail-tagname end">permission</span><span class="gmail-punctuation">></span></font></span></div><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span style="cursor: pointer;"></span><span class="gmail-punctuation"><</span><span class="gmail-tagname">permission</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214/permissions/f19ee089-9c64-435c-92cc-83a7027cae51"</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"f19ee089-9c64-435c-92cc-83a7027cae51"</span><span class="gmail-punctuation">></span></font></span><div class="gmail-nodeMargin" style="margin-left:44px"><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-punctuation"><</span><span class="gmail-tagname">role</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/roles/def0000a-0000-0000-0000-def00000000a"</span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"def0000a-0000-0000-0000-def00000000a"</span><span class="gmail-punctuation"><span class="gmail-Apple-converted-space"> </span>/></span></font></span></div><div class="gmail-node" style="margin:1px 0px"><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-punctuation"><</span><span class="gmail-tagname">user</span><span class="gmail-Apple-converted-space"> </span><span class="gmail-attname">href</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214"</span><span class="gmail-attname">id</span><span class="gmail-punctuation">=</span><span class="gmail-attribute">"59746ab4-033f-0194-0334-000000000214"</span><span class="gmail-punctuation"><span class="gmail-Apple-converted-space"> </span>/></span></font></span></div></div><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-arrowEmpty" style="display:inline-block;width:24px;height:18px"> </span><span class="gmail-punctuation end"></</span><span class="gmail-tagname end">permission</span><span class="gmail-punctuation">></span></font></span></div></div><span style="color:rgb(0,0,0)"><font size="2"><span class="gmail-arrowEmpty" style="display:inline-block;width:24px;height:18px"> </span><span class="gmail-punctuation end"></</span><span class="gmail-tagname end">permissions</span><span class="gmail-punctuation">></span></font></span></div><font size="2"><br></font></div><font size="2">Regards,<br></font></div><font size="2">Yanir Quinn<br></font><div><div><div><div><div><div><div><font size="2"><br><br><br></font><div><font size="2"><br></font><br></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 4, 2017 at 1:01 PM, Staniforth, Paul <span dir="ltr"><<a href="mailto:P.Staniforth@leedsbeckett.ac.uk" target="_blank">P.Staniforth@leedsbeckett.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Soumya,<br>
You can copy quotas, what I can't figure out is how to set a consumer from the API.<br>
<br>
In table 7.263 Attributes Summary at<br>
<a href="https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/rest_api_guide/types#types-quota" rel="noreferrer" target="_blank">https://access.redhat.com/<wbr>documentation/en-us/red_hat_<wbr>virtualization/4.1/html/rest_<wbr>api_guide/types#types-quota</a><br>
<br>
it show a users attribute but I only get<br>
<br>
<quota href="/ovirt-engine/api/<wbr>datacenters/00000001-0001-<wbr>0001-0001-00000000012f/quotas/<wbr>7e3f074f-9911-40b8-a8ed-<wbr>a52f7e933fff" id="7e3f074f-9911-40b8-a8ed-<wbr>a52f7e933fff"><br>
<name>testcli</name><br>
<link href="/ovirt-engine/api/<wbr>datacenters/00000001-0001-<wbr>0001-0001-00000000012f/quotas/<wbr>7e3f074f-9911-40b8-a8ed-<wbr>a52f7e933fff/permissions" rel="permissions"/><br>
<link href="/ovirt-engine/api/<wbr>datacenters/00000001-0001-<wbr>0001-0001-00000000012f/quotas/<wbr>7e3f074f-9911-40b8-a8ed-<wbr>a52f7e933fff/<wbr>quotastoragelimits" rel="quotastoragelimits"/><br>
<link href="/ovirt-engine/api/<wbr>datacenters/00000001-0001-<wbr>0001-0001-00000000012f/quotas/<wbr>7e3f074f-9911-40b8-a8ed-<wbr>a52f7e933fff/<wbr>quotaclusterlimits" rel="quotaclusterlimits"/><br>
<cluster_hard_limit_pct>20</<wbr>cluster_hard_limit_pct><br>
<cluster_soft_limit_pct>80</<wbr>cluster_soft_limit_pct><br>
<data_center href="/ovirt-engine/api/<wbr>datacenters/00000001-0001-<wbr>0001-0001-00000000012f" id="00000001-0001-0001-0001-<wbr>00000000012f"/><br>
<storage_hard_limit_pct>20</<wbr>storage_hard_limit_pct><br>
<storage_soft_limit_pct>80</<wbr>storage_soft_limit_pct><br>
</quota><br>
<br>
Regards,<br>
Paul S.<br>
<br>
______________________________<wbr>__________<br>
From: <a href="mailto:users-bounces@ovirt.org">users-bounces@ovirt.org</a> <<a href="mailto:users-bounces@ovirt.org">users-bounces@ovirt.org</a>> on behalf of Soumya Koduri <<a href="mailto:skoduri@redhat.com">skoduri@redhat.com</a>><br>
Sent: 03 August 2017 15:16<br>
To: Artyom Lukianov<br>
Cc: users<br>
Subject: Re: [ovirt-users] Cannot set a quota to limit resources for each user<br>
<div><div class="h5"><br>
Hi Artyom,<br>
<br>
On 08/03/2017 04:07 PM, Artyom Lukianov wrote:<br>
> Hi Soumya,<br>
><br>
> 1. Yes, you correct a quota is shared among all quota consumers.<br>
> 2. No, it not possible, the single possibility as you said is to create<br>
> a separate quota for each user. I believe it was designed to make<br>
> quota for group of users at first place, but I think it can be a<br>
> good RFE :)<br>
<br>
Thanks for confirming. I shall file a RFE then.<br>
<br>
Regards,<br>
Soumya<br>
<br>
><br>
> Best Regards<br>
><br>
> On Thu, Aug 3, 2017 at 10:54 AM, Soumya Koduri <<a href="mailto:skoduri@redhat.com">skoduri@redhat.com</a><br>
> <mailto:<a href="mailto:skoduri@redhat.com">skoduri@redhat.com</a>>> wrote:<br>
><br>
> Hi,<br>
><br>
> We have a use-case to limit VM resources for each user and were<br>
> following guidelines specified in the admin guide to set quota and<br>
> limit resources for each user [section: 16.8. Using Quota to Limit<br>
> Resources by User]. However looks like that quota is shared by all<br>
> the users added as consumers.<br>
><br>
> Suppose I have created a quota (say quota1) to limit the storage<br>
> capacity to 100GB for each user. Once I add user1 and user2 as<br>
> consumers to that quota, seems like both users combined are entitled<br>
> to 100GB. Is my understanding correct?<br>
><br>
> Please let me know if there is any way to configure a single quota<br>
> which could be applied for each user individually (i.e, in the above<br>
> eg., each user should be limited to 100GB storage capacity).<br>
><br>
> Or is the only way this can be done is by creating separate quota<br>
> for each user [which seems like tedious process and cannot scale]?<br>
><br>
><br>
> Thanks,<br>
> Soumya<br>
> ______________________________<wbr>_________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
> <<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a>><br>
><br>
><br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
</div></div>To view the terms under which this email is distributed, please go to:-<br>
<a href="http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html" rel="noreferrer" target="_blank">http://disclaimer.<wbr>leedsbeckett.ac.uk/disclaimer/<wbr>disclaimer.html</a><br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>