← Back to team overview

openstack team mailing list archive

Error setting quotas

 

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!