[Openstack] Error setting quotas
Guillermo Alvarado
guillermoalvarado89 at gmail.com
Tue Sep 25 17:19:54 UTC 2012
Hi Everyone,
I want to set quotas for a specific tenant, but I am getting this
error: Could not find any suitable endpoint. Correct region?
This is my code:
from novaclient.v1_1 import client
nova_client = client.Client(USERNAME, PASSWORD, TENANT_ID, AUTH_URL,
service_type="compute")
DEFAULT_GIGABYTES = '20'
DEFAULT_RAM = '1'
DEFAULT_FLOATING_IPS = '1'
DEFAULT_INSTANCES = '1'
DEFAULT_CORES = '1'
DEFAULT_VOLUMES = '0'
kwargs = {
'gigabytes': DEFAULT_GIGABYTES,
'ram': DEFAULT_RAM,
'floating_ips': DEFAULT_FLOATING_IPS,
'instances': DEFAULT_INSTANCES,
'cores': DEFAULT_CORES,
'volumes': DEFAULT_VOLUMES,
}
nova_client.quotas.update(tenant.id, **kwargs)
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120925/726b3bc1/attachment.html>
More information about the Openstack
mailing list