Get List of User Limits

Limits display available resources for creating a VS, but not all the available resources of the user.
To see user limits, use the following request:

GET /users/:user_id/limits.xml
GET /users/:user_id/limits.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/users/12/limits.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/users/12/limits.json 

XML Output Example

<hash>
<limits>
<memory type="integer">12761</memory>
<cpus type="integer">8</cpus>
<cpu-shares type="integer">800</cpu-shares>
<rate type="integer">1000</rate>
<hypervisor_groups type="array">
<hypervisor_group>
<id type="integer">2</id>
<label>QA HVZ</label>
</hypervisor_group>
</hypervisor_groups>
<hypervisors type="array">
<hypervisor>
<id type="integer">1</id>
<label>HV2_xen</label>
<hypervisor_type>xen</hypervisor_type>
</hypervisor>
<hypervisor>
<id type="integer">12</id>
<label>hv1-xen</label>
<hypervisor_type>xen</hypervisor_type>
</hypervisor>
<hypervisor>
<id type="integer">13</id>
<label>KVM_HV2</label>
<hypervisor_type>kvm</hypervisor_type>
</hypervisor>
</hypervisors>
<data_store_groups type="array">
<data_store_group>
<id type="integer">3</id>
<label>dsz</label>
<data_stores type="array">
<data_store>
<id type="integer">1</id>
<usage type="integer">188</usage>
<capacity type="integer">460</capacity>
</data_store>
<data_store>
<id type="integer">22</id>
<usage type="integer">154</usage>
<capacity type="integer">1800</capacity>
</data_store>
</data_stores>
</data_store_group>
</data_store_groups>
<network_groups type="array">
<network_group>
<id type="integer">4</id>
<label>ntz6-xen</label>
</network_group>
<network_group>
<id type="integer">29</id>
<label>OHnz2</label>
</network_group>
</network_groups>
<primary-disk-size type="integer">1646</primary-disk-size>
<swap-disk-size type="integer">1646</swap-disk-size>
</limits>
<best-data-store-group-primary-id type="integer">3</best-data-store-group-primary-id>
<best-data-store-group-swap-id type="integer">3</best-data-store-group-swap-id>
<best-network-group-id type="integer">29</best-network-group-id>
</hash> 


Where:

cpu – amount of CPU cores, available for the user to create a VS

cpu_shares - CPU priority available for creation a VS

swap_disk_size/primary_disk_size – available disk space in GB at best_data_store_group_primary_id (best_data_store_group_swap_id)

memory – available RAM

rate – maximum port speed limit

hypervisor_groups – an array of available compute zones, with zone label and ID

hypervisors – an array of available compute resources, with compute resource label and ID

data_store_groups – an array of available data store groups, with group label, ID and the list of assigned data stores.

data_store – an array of data stores assigned to the data store groups, with ID, usage and capacity

network_group – an array of network groups, with group label and ID

best_data_store_group_primary_id(best_data_store_group_swap_id) – the ID of a data store zone with higher available disk capacity.

best_network_group_id – the ID of a priority network