Hi,
to get a reference for users and roles for a specific quota you can use:
.../ovirt-engine/api/datacenters/{datacenter: id}/quotas/{quota:
id}/permissions
for example:
GET
result:
<?xml version="1.0" encoding="UTF-8" standalone="yes"
?>
<permissions>
<permission href=
"/ovirt-engine/api/groups/eee00000-0000-0000-0000-123456789eee/permissions/58ca605c-010d-0307-0224-0000000001a9"
id="58ca605c-010d-0307-0224-0000000001a9">
<group href="/ovirt-engine/api/groups/eee00000-0000-0000-0000-123456789eee"
id="eee00000-0000-0000-0000-123456789eee" />
<role href="/ovirt-engine/api/roles/def00021-0000-0000-0000-def000000015"id=
"def00021-0000-0000-0000-def000000015" />
</permission>
<permission href=
"/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214/permissions/59746ab4-019c-0034-010f-000000000206"
id="59746ab4-019c-0034-010f-000000000206">
<role href="/ovirt-engine/api/roles/00000000-0000-0000-0000-000000000001"id=
"00000000-0000-0000-0000-000000000001" />
<user href="/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214"id=
"59746ab4-033f-0194-0334-000000000214" />
</permission>
<permission href=
"/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214/permissions/f19ee089-9c64-435c-92cc-83a7027cae51"
id="f19ee089-9c64-435c-92cc-83a7027cae51">
<role href="/ovirt-engine/api/roles/def0000a-0000-0000-0000-def00000000a"id=
"def0000a-0000-0000-0000-def00000000a" />
<user href="/ovirt-engine/api/users/59746ab4-033f-0194-0334-000000000214"id=
"59746ab4-033f-0194-0334-000000000214" />
</permission>
</permissions>
Regards,
Yanir Quinn
On Fri, Aug 4, 2017 at 1:01 PM, Staniforth, Paul <
P.Staniforth(a)leedsbeckett.ac.uk> wrote:
Hi Soumya,
You can copy quotas, what I can't figure out is how
to set a consumer from the API.
In table 7.263 Attributes Summary at
https://access.redhat.com/documentation/en-us/red_hat_
virtualization/4.1/html/rest_api_guide/types#types-quota
it show a users attribute but I only get
<quota href="/ovirt-engine/api/datacenters/00000001-0001-
0001-0001-00000000012f/quotas/7e3f074f-9911-40b8-a8ed-a52f7e933fff"
id="7e3f074f-9911-40b8-a8ed-a52f7e933fff">
<name>testcli</name>
<link href="/ovirt-engine/api/datacenters/00000001-0001-
0001-0001-00000000012f/quotas/7e3f074f-9911-40b8-a8ed-a52f7e933fff/permissions"
rel="permissions"/>
<link href="/ovirt-engine/api/datacenters/00000001-0001-
0001-0001-00000000012f/quotas/7e3f074f-9911-40b8-a8ed-a52f7e933fff/quotastoragelimits"
rel="quotastoragelimits"/>
<link href="/ovirt-engine/api/datacenters/00000001-0001-
0001-0001-00000000012f/quotas/7e3f074f-9911-40b8-a8ed-a52f7e933fff/quotaclusterlimits"
rel="quotaclusterlimits"/>
<cluster_hard_limit_pct>20</cluster_hard_limit_pct>
<cluster_soft_limit_pct>80</cluster_soft_limit_pct>
<data_center
href="/ovirt-engine/api/datacenters/00000001-0001-0001-0001-00000000012f"
id="00000001-0001-0001-0001-00000000012f"/>
<storage_hard_limit_pct>20</storage_hard_limit_pct>
<storage_soft_limit_pct>80</storage_soft_limit_pct>
</quota>
Regards,
Paul S.
________________________________________
From: users-bounces(a)ovirt.org <users-bounces(a)ovirt.org> on behalf of
Soumya Koduri <skoduri(a)redhat.com>
Sent: 03 August 2017 15:16
To: Artyom Lukianov
Cc: users
Subject: Re: [ovirt-users] Cannot set a quota to limit resources for each
user
Hi Artyom,
On 08/03/2017 04:07 PM, Artyom Lukianov wrote:
> Hi Soumya,
>
> 1. Yes, you correct a quota is shared among all quota consumers.
> 2. No, it not possible, the single possibility as you said is to create
> a separate quota for each user. I believe it was designed to make
> quota for group of users at first place, but I think it can be a
> good RFE :)
Thanks for confirming. I shall file a RFE then.
Regards,
Soumya
>
> Best Regards
>
> On Thu, Aug 3, 2017 at 10:54 AM, Soumya Koduri <skoduri(a)redhat.com
> <mailto:skoduri@redhat.com>> wrote:
>
> Hi,
>
> We have a use-case to limit VM resources for each user and were
> following guidelines specified in the admin guide to set quota and
> limit resources for each user [section: 16.8. Using Quota to Limit
> Resources by User]. However looks like that quota is shared by all
> the users added as consumers.
>
> Suppose I have created a quota (say quota1) to limit the storage
> capacity to 100GB for each user. Once I add user1 and user2 as
> consumers to that quota, seems like both users combined are entitled
> to 100GB. Is my understanding correct?
>
> Please let me know if there is any way to configure a single quota
> which could be applied for each user individually (i.e, in the above
> eg., each user should be limited to 100GB storage capacity).
>
> Or is the only way this can be done is by creating separate quota
> for each user [which seems like tedious process and cannot scale]?
>
>
> Thanks,
> Soumya
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org <mailto:Users@ovirt.org>
>
http://lists.ovirt.org/mailman/listinfo/users
> <
http://lists.ovirt.org/mailman/listinfo/users>
>
>
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
To view the terms under which this email is distributed, please go to:-
http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users