OpenStack: quotas

Documentation
https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/quota.html

openstack quota show
openstack quota show ${PROJECT_ID}
 
# show default quota
openstack quota show --default
 
# set quotas
openstack quota set --class --instances 20 default
openstack quota set --class --cores 	20 default
openstack quota set --class --ram 	$((68 * 1024)) default
 
openstack quota show
openstack quota set --class --gigabytes 10000 default
 
# show quota (admin only)
openstack quota list --project ${PROJECT_ID} --detail --compute 
openstack quota list --project ${PROJECT_ID} --detail --network 
openstack quota list --project ${PROJECT_ID} --detail --volume 
 
# set quota
openstack quota set --secgroups -1 service
openstack quota set --cores -1 service
openstack quota set --ram -1 service
openstack quota set --floating-ips -1 service
 
openstack quota set --class --floating-ips 50 default
openstack quota set --class --fixed-ips -1 default
openstack quota set --class --secgroups 10 default
openstack quota set --class --secgroup-rules 100 default
openstack quota set --class --networks 100 default
openstack quota set --class --ports 500 default
openstack quota set --class --routers 10 default
 
# compute
openstack quota list --detail --compute --project ${PROJECT_ID}
openstack quota set --ram 524288 project-name-or-id
openstack quota set --ram 393216 ${PROJECT_ID}
openstack quota set  --cores 200 ${PROJECT_ID}
 
# network
openstack quota list --detail --network --project ${PROJECT_ID}
openstack quota set --secgroup-rules 300 ${PROJECT_ID}
 
openstack quota set --routers 100 ${PROJECT_ID}
openstack quota set --secgroups 50 ${PROJECT_ID}
openstack quota set --secgroup-rules 200 ${PROJECT_ID}

Links
https://docs.openstack.org/ocata/user-guide/cli-cheat-sheet.html
https://docs.openstack.org/nova/latest/admin/quotas.html