[ovirt-users] quota creation from ovirt-shell
Doron Fediuck
dfediuck at redhat.com
Sun Sep 25 06:30:30 UTC 2016
On Tue, Sep 20, 2016 at 2:00 PM, Staniforth, Paul <
P.Staniforth at leedsbeckett.ac.uk> wrote:
> Thanks Andrej,
> it gives me another reason to learn
> python. I will try but things are a little hectic at the moment as it's
> induction week at our University.
>
Paul. you can also use Java or Ruby instead of Python.
>
> Regards,
> Paul S.
> ________________________________________
> From: Andrej Krejcir <akrejcir at redhat.com>
> Sent: 20 September 2016 10:44
> To: Staniforth, Paul
> Cc: users at ovirt.org
> Subject: Re: [ovirt-users] quota creation from ovirt-shell
>
> Hi,
>
> there is a bug in the ovirt-cli, which makes creating quotaclusterlimit
> and quotastoragelimit impossible.
>
> The correct syntax would be:
> add quotastoragelimit --parent-datacenter-name Default --parent-quota-name
> testcli ...
>
> You could use a python script with the SDK instead.
> For example:
>
>
> from ovirtsdk.api import API
> from ovirtsdk.xml.params import Quota
> from ovirtsdk.xml.params import QuotaStorageLimit
>
> api = API('IP:PORT/ovirt-engine/api', 'admin at internal', 'pass')
> dc = api.datacenters.list()[0]
> quota = dc.quotas.add(Quota(name="quota1"))
> quota.quotastoragelimits.add(QuotaStorageLimit(limit=100))
>
>
>
> Regards,
> Andrej
>
> ----- Original Message -----
> From: "Paul Staniforth" <P.Staniforth at leedsbeckett.ac.uk>
> To: users at ovirt.org
> Sent: Monday, September 12, 2016 6:00:50 PM
> Subject: [ovirt-users] quota creation from ovirt-shell
>
>
>
> Hello,
>
> I am trying to create user quotas from the command line via the shell.
>
>
>
>
> I am using ovirt 3.6.7 and the command
>
>
>
>
> add quota --parent-datacenter-name Default --name testcli
>
>
>
>
> creates a quota but without quotaclusterlimit or quotastoragelimit
>
>
>
>
> I can't find the correct syntax to create these.
>
>
>
>
> Also how would I add a consumer and change the values when created?
>
>
>
>
> Any examples or pointers to documentation would be appreciated.
>
>
>
>
> Thanks,
>
> Paul S.
> 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 at 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 at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160925/0a1c0bc7/attachment-0001.html>
More information about the Users
mailing list