Get List of Compute Resources

To get the list of compute resources, use the following request:

GET /settings/hypervisors.xml
GET /settings/hypervisors.json

XML Request Example

curl -i -X -u user:userpass GET http://onapp.test/settings/hypervisors.xml

JSON Request Example

curl -i -X -u user:userpass GET http://onapp.test/settings/hypervisors.json

XML Output Example

<?xml version="1.0" encoding="UTF-8"?>
<hypervisors type="array">
 <hypervisor>
  <backup type="boolean">false</backup>
  <backup_ip_address/>
  <blocked type="boolean">true</blocked>
  <built type="boolean">false</built>
  <called_in_at nil="true"/>
  <connection_options nil="true"/>
  <cpu_idle type="integer">0</cpu_idle>
  <cpu_mhz nil="true"/><cpus nil="true"/>
  <created_at type="datetime">2013-06-10T12:09:48+00:00</created_at>
  <custom_config nil="true"/>
  <disable_failover type="boolean">false</disable_failover>
  <disk_pcis nil="true"/>
  <distro nil="true"/>
  <enabled type="boolean">true</enabled>
  <failover_recipe_id>get_if_config</failover_recipe_id>
  <failure_count type="integer">0</failure_count>
  <format_disks type="boolean">false</format_disks>
  <free_mem type="integer">0</free_mem>
  <host nil="true"/><host_id nil="true"/>
  <hypervisor_group_id nil="true"/>
  <hypervisor_type>kvm</hypervisor_type>
  <id type="integer">7</id>
  <ip_address>109.123.105.132</ip_address>
  <label>KVM C5 HV1</label>
  <list_of_logical_volumes/>
  <list_of_volume_groups/>
  <list_of_zombie_domains nil="true"/>
  <locked type="boolean">false</locked>
  <mac nil="true"/>
  <machine nil="true"/>
  <mem_info type="integer">0</mem_info>
  <mtu type="integer">1500</mtu>
  <online type="boolean">false</online>
  <ovs nil="true"/>
  <passthrough_disks type="boolean">false</passthrough_disks>
  <release nil="true"/>
  <segregation_os_type>any</segregation_os_type>
  <server_type>virtual</server_type>
  <spare type="boolean">false</spare>
  <storage_channel>224.3.28.1</storage_channel>
  <threads_per_core nil="true"/>
  <total_mem nil="true"/>
  <total_zombie_mem nil="true"/>
  <updated_at type="datetime">2013-06-10T12:09:48+00:00</updated_at>
  <uptime nil="true"/>
  <vmware_total_cpu_cores type="integer">0</vmware_total_cpu_cores>
  <total_cpus type="integer">0</total_cpus>
  <free_memory type="integer">0</free_memory>
  <used_cpu_resources type="integer">0</used_cpu_resources>
  <total_memory type="integer">0</total_memory>
  <cpu_cores type="integer">0</cpu_cores>
  <free_disk_space><onapp-fv4zl7t2h5wbeq type="integer">184</onapp-fv4zl7t2h5wbeq></free_disk_space>        <memory_allocated_by_running_vms type="integer">0</memory_allocated_by_running_vms>
  <total_memory_allocated_by_vms type="integer">0</total_memory_allocated_by_vms>
  <cpu_units type="integer">282</cpu_units> 
  <cpu_flags_type="array">...</cpu_flags>
  <cpu_model>Nehalem</cpu_model>
</hypervisors>
</hypervisors>



Where:

hypervisor – an array of all compute resources in the cloud and their details

backup - true, if the CloudBoot compute resource is used as a backup server. This parameter is for CloudBoot compute resources only. For other compute resource types the backup value is 0.

backup_ip_address - provisioning network IP address

blocked - true if the compute resource is blocked, otherwise false

built - true if the compute resource is built, otherwise false

called_in_at –  the date when the compute resource was called in the [YYYY][MM][DD]T[hh][mm][ss]Z format

connection_options - an array of the following vCenter cluster parameters:

  • login - vCenter login
  • password - vCenter password
  • cluster_name - vCenter cluster name
  • distributed_virtual_switch_name - distributed virtual switch label

cpu_idle - time of CPU delay

cpu_mhz - CPU operating frequency

created_at – the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format 

custom_config - custom commands that run when the compute resource is booted

disable_failover true if compute resource failover is disabled, otherwise false.

disk_pcis - comma-separated list of hypervisor disk pcis

distro - distributive label

enabled - true, if the compute resource is enabled, otherwise false


failure_countthe number of failures

format_disks - true, if the compute resource's disks are formatted during creation, otherwise false

free_mem - free compute resource memory

host - host label

hypervisor_group_id - the ID of a compute zone to which this compute resource is attached

hypervisor_type - the compute resource type

id - the compute resource ID

ip_address – the compute resource IP address

label - the compute resource label

list_of_logical_volumes - an array of compute resource logical volumes

list_of_volume_groups - an array of compute resource volume groups

list_of_zombie_domains - an array of zombie virtual servers

locked - true if the compute resource is locked, otherwise false

mac - compute resource MAC address

machine - architecture type

mem_info - Xen compute resource Dom0 size. This parameter is for Xen compute resources only. For other compute resource types the mem_info value is 0.

mtu - maximum transferrable unit value. You can set the frame size from 1500 to 9000 bytes.

The maximum transportation unit (MTU) is the maximum size of a unit that can be transmitted transferred via ethernet traffic. Any data that exceed the specified MTU value will be divided into smaller units before being transferred. Utilization of jumbo frames allows to reduce increase throughput and increase CPU utilization during large size file transfers.

online - true if online, otherwise false

ovs - whether the OpenvSwitch is enabled or not. Redundant parameter.

passthrough_disks - true, if the disks are passed through to the storage nodes, otherwise 0

release - compute resource kernel version

segregation_os_type - an operating system type (can be Any OS, Windows only or Non-Windows)

server_type - server type:

  • virtual  
  • smart 
  • baremetal

spare – true if no VSs are assigned, otherwise false

storage_channel - storage channel for the communication

threads_per_core - compute resource core and CPU ratio. For example, if threads_per_core = 2, compute resource with 2 cores will have 4 CPUs.

total_mem - total compute resource memory

total_zombie_mem - memory space occupied by zombie disks

updated_at – the date when the record was made in the DB in the [YYYY][MM][DD]T[hh][mm][ss]Z format

uptime - compute resource uptime value; shows how long the compute resource is online

vmware_total_cpu_cores - the total number of VMware compute resource CPU cores

total_cpus – the number of virtual cores

free_memoryfree RAM (MB) of compute resource. It is calculated as follows: total memory - memory overhead* - zombie VSs - sum of all VSs

used_cpu_resources – the percentage of used CPU resources

total_memorytotal RAM (MB) of compute resource

cpu_cores – the number of physical cores per compute resource

free_disk_space - free compute resource disk space in GB

memory_allocated_by_running_vms - the compute resource RAM in MB allocated to the virtual servers, which are currently running on this compute resource

total_memory_allocated_by_vms - the compute resource RAM in MB allocated to all virtual servers of this compute resource

cpu_units - the amount of CPU units assigned to this compute resource

cpu_flags - an array of CPU flags of the compute resource for which the extended CPU configuration is enabled

cpu_model - a CPU model of the compute resource for which the extended CPU configuration (flags) is enabled


*Memory Overhead for Compute Resources

Each compute resource has a reserved memory overhead value. This value is pre-configured by default in info_hub.yml.

For XEN compute resource:
memory_overhead = 1536

For KVM compute resource:

memory_overhead = 400 + 0,024 * total_memory

Page History

v.5.9

Added the following parameters:

  •  segregation_os_type
  • failover_recipe_id 

v.5.7:

Added the cpu_model parameter. 

v. 4.2:

  • cpu_flags

v. 3.3:

  • cpu_units

v. 3.1.:

  • cpu_idle
  • cpu_mhz
  • list_of_logical_volumes
  • list_of_volume_groups
  • list_of_zombie_domains
  • machine
  • server_type
  • storage_channel
  • total_mem
  • total_zombie_mem
  • free_disk_space
  • free_mem
  • free_memory