[ovirt-users] quota creation from ovirt-shell

Staniforth, Paul P.Staniforth at leedsbeckett.ac.uk
Sun Sep 25 12:32:36 UTC 2016


Thanks, I've got it to work in python, just need to work out how to change/update them now.
I'm in just get the job done mode at present so it's not the most elegant code.

Paul S.
________________________________________
From: Doron Fediuck [dfediuck at redhat.com]
Sent: 25 September 2016 07:30
To: Staniforth, Paul
Cc: Andrej Krejcir; users at ovirt.org
Subject: Re: [ovirt-users] quota creation from ovirt-shell

On Tue, Sep 20, 2016 at 2:00 PM, Staniforth, Paul <P.Staniforth at leedsbeckett.ac.uk<mailto: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<mailto:akrejcir at redhat.com>>
Sent: 20 September 2016 10:44
To: Staniforth, Paul
Cc: users at ovirt.org<mailto: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<mailto:P.Staniforth at leedsbeckett.ac.uk>>
To: users at ovirt.org<mailto: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<mailto: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<mailto: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



More information about the Users mailing list