Page tree
Skip to end of metadata
Go to start of metadata
POST /settings/hypervisors.xml
POST /settings/hypervisors.json

XML Request example

curl -X POST http://onapp.test/settings/hypervisors.xml -d '<hypervisor><label>HV_LABEL</label><ip_address>HV_IP</ip_address><hypervisor_type>kvm/xen</hypervisor_type><enabled>true/false</enabled><disable_failover>true</disable_failover><collect_stats>1</collect_stats><hypervisor_group_id>HV_Group_id</hypervisor_group_id><backup_ip_address>192.168.123.1</backup_ip_address><cpu_units>1000</cpu_units></hypervisor>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request example

curl -X POST http://onapp.test/settings/hypervisors.json -d'{"hypervisor":{"label":"HV_LABEL","ip_address":"HV_IP","backup_ip_address":"192.168.123.1","hypervisor_type":"kvm/xen","enabled":"true","disable_failover":"true/false","collect_stats":"1","hypervisor_group_id":"HV_Group_id","cpu_units":"1000"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

To add a new compute resource, send the following parameters: 

ip_address* - the compute resource IP address

backup_ip_address - provisioning network IP address. Be aware, that it is not an IP address of a backup server, it is an IP address of an interface on a compute resource. It is used not to overload a management network.

label* - the name of the compute resource

hypervisor_type* - specify if this is Xen or KVM compute resource

enabled -  set true to enable a compute resource, otherwise set false

hypervisor_group_id* - the ID of the group to which this  compute resource is assigned

collect_stats - set 1 to collect statistics for this compute resource, otherwise set 0

disable_failover - set true to disable  compute resource failover, otherwise set false

cpu_units - set the amount of CPU units for this compute resource


Page History

v. 3.3:

cpu_units

  • No labels