Edit VMware Compute Resource

To edit a VMware compute resource, use the following request:

PUT /settings/hypervisors/:hypervisor_id.xml
PUT /settings/hypervisors/:hypervisor_id.json

XML Request Example

curl -i -X PUT http://onapp.test/settings/hypervisors/13.xml -d '<hypervisor><label>zaza_fake_ware_xml_ch</label><ip_address>10.10.10.12</ip_address><backup_ip_address>10.10.10.13</backup_ip_address><segregation_os_type>any</segregation_os_type><enabled>1</enabled><collect_stats>1</collect_stats><disable_failover>1</disable_failover><connection_options><login>login</login><password>password</password><cluster_name>OnApp</cluster_name><distributed_virtual_switch_name>dvSwitch</distributed_virtual_switch_name></connection_options></hypervisor>'
-u account_email:API_key -H 'Accept: application/xml' -H 'Content-type:
application/xml'

JSON Request Example

curl -i -X PUT http://onapp.test/settings/hypervisors/13.json -d '{"hypervisor":{"label":"zaza_fake_ware_json","ip_address":"10.10.10.2","backup_ip_address":"10.10.10.3","segregation_os_type":"any",
"enabled":"1", "collect_stats":"1","disable_failover":"1","connection_options":{"login":"login","password":"password","cluster_name":"OnApp", "distributed_virtual_switch_name":"dvSwitch"}}}'
-u account_email:API_key -H 'Accept: application/json' -H 'Content-type:application/json'

Where: 

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

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

enabled - optional parameter, set True to enable a compute resource

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

disable_failover - optional parameter. Set true to disable compute resource failover, otherwise false

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


Page History

v.5.9

  • removed the hypervisor_type parameter 
  • added the segregation_os_type parameter