How to create quota using rest api? [closed]
I was trying to create a project using rest api's but cannot set quotas to it. Projects and users are being created.
First time here? Check out the FAQ!
I was trying to create a project using rest api's but cannot set quotas to it. Projects and users are being created.
Hey!
Depending on which quotas you want to modify you will either use Nova or Neutron's API. Neutron is used for the networking related quotas (routers, networks, subnets, etc) and Nova is used for the compute resources (RAM, CPU, etc).
To set quotas using the Nova API you will use a PUT against '/v2.1/os-quota-sets/{tenant_id}' with the following as an example:
{
"quota_set": {
"cores": 20,
"fixed_ips": -1,
"floating_ips": 10,
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 10,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 45,
"server_groups": 10,
"server_group_members": 10
}
}
You could also use the CLI's to do this and use '--debug' to extract the exact API call being used.
Not working "Internal Server Error 500" can you please share cli command.
Sure, first issue 'nova quota-show --tenant <tenant-uuid>' to see the quota classes and then to actually update them you would do:
nova quota-update --tenant <tenant-UUID> --instances <new_quota>
The example above would update the instances quota on the specified project (tenant).
Doesn't work with OpenStack Kilo, maybe these were from Juno release. Only this command works nova quota-show --tenant <tenant-uuid>
I was referencing the current CLI reference documentation. There may be an underlying issue, did the CLI return a 500 error as well?
Asked: 2015-07-29 07:30:53 -0600
Seen: 577 times
Last updated: Jul 29 '15
Can we create domains in Kilo? [closed]
How to restrict bandwidth for instances
nova-docker Python Driver Local Build
Kilo can not finish neutron configure
OpenStack Kilo nova image-list HTTP 500 but glance works
oslo_messaging._drivers.impl_rabbit [-] Failed to consume message from queue
Sahara UI broken after Kilo upgrade
The only issue is floating_ips don't change in the GUI i.e. dashboard.