Edit Static Compute Resource Devices
To edit static compute resource devices, use the following request:
PUT /settings/hypervisors/:hypervisor_id/devices
PUT /settings/hypervisors/:hypervisor_id/devices
XML Request Example
curl -i -X PUT http://onapp.test/settings/hypervisors/11/devices -d'<hypervisor_devices>586<format>false</format><status>0</status>587<format>false</format><status>0</status>588<format>false</format><status>1</status>599<format>false</format><status>2</status>593<status>1</status></hypervisor_devices><hypervisor><cache_mirrors>1</cache_mirrors><cache_stripes>1</cache_stripes></hypervisor><hypervisor_id>11<hypervisor_id>' -u account_email:API_key -H 'Accept: application/json' -H 'Content-type: application/json'
JSON Request Example
curl -i -X PUT http://onapp.test/settings/hypervisors/11/devices -d'{"hypervisor_devices":{"586":{"format":"false", "status":"0"}, "587":{"format":"false", "status":"0"}, "588":{"format":"false", "status":"1"}, "599":{"format":"false", "status":"2"}, "593":{"status":"1"}}, "hypervisor":{"cache_mirrors":"1", "cache_stripes":"1"}, "hypervisor_id":"11"}' -u account_email:API_key -H 'Accept: application/json' -H 'Content-type: application/json'
Where:
hypervisor_devices - an array of compute resource device details:
- name - the name of the disk
- format - set true to enable disk formatting, otherwise, false
- status - status of the disk:
- 0 - unassigned
- 1 - assigned to storage
- 2 - assigned to cache
hypervisor - an array of compute resource details:
cache_mirrors - the number of mirrors
cache_stripes - the number of stripes
hypervisor_id - the ID of the compute resource