Modifica VS

Da Wiki Neen.
(Differenze fra le revisioni)
(Creata pagina con '<br> <br> PUT /virtual_machines/:id.xml PUT /virtual_machines/:id.json XML Request example curl -i -X PUT -H 'Accept: application/xml' -H 'Content-type: application/xml' -u...')
 
(Pagina svuotata)
 
Riga 1: Riga 1:
<br>
 
  
<br> PUT /virtual_machines/:id.xml PUT /virtual_machines/:id.json
 
 
XML Request example
 
 
curl -i -X PUT -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;virtual_machine&gt;&lt;label&gt;Test_API_Edit&lt;/label&gt;&lt;memory&gt;512&lt;/memory&gt;&lt;cpu_shares&gt;40&lt;/cpu_shares&gt;&lt;cpus&gt;4&lt;/cpus&gt;&lt;allow_migration&gt;1&lt;/allow_migration&gt;&lt;allow_cold_resize&gt;1&lt;/allow_cold_resize&gt;&lt;primary_disk_min_iops&gt;600&lt;/primary_disk_min_iops&gt;&lt;swap_disk_min_iops&gt;600&lt;/swap_disk_min_iops&gt;&lt;/virtual_machine&gt;' --url http://<span style="background-color: navy; color: white;" />neen.cloud.it/virtual_machines/:id.xml
 
 
JSON Request example
 
 
curl -i -X PUT -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"virtual_machine":{"label":"Test_API_Edit","memory":"512","cpu_shares":"40","cpus":"4","allow_migration":"1","primary_disk_min_iops":"600","swap_disk_min_iops":"600","allow_cold_resize":"1"}}' --url http://<span style="background-color: navy; color: white;" />neen.cloud.it/virtual_machines/:id.json
 
 
You can edit the following parameters:
 
 
label - the VS name
 
 
memory - the amount of RAM allocated to this VS in Mb
 
 
cpus - the number of CPUs of this VS
 
 
cpu_shares* - CPU priority percentage
 
 
allow_migration - set 1 to migrate a VS to a hypervisor with sufficient resources if a hypervisor has insufficient space to resize. Otherwise, set 0.
 
 
allow_cold_resize – set 1 to switch to cold resize when hot resize failed
 
 
primary_disk_min_iops - minimum number of IO operations per second for primary disk (this is a SolidFire related parameter)
 
 
swap_disk_min_iops - minimum number of IO operations per second for swap disk (this is a SolidFire related parameter)
 
 
If the VS is modified successfully, an HTTP 204 response is returned. If scheduling for changes fails, an HTTP 422 response is returned.
 
 
<br>
 

Versione attuale delle 14:43, 20 feb 2014

Strumenti personali
Namespace
Varianti
Azioni
Navigazione
Strumenti