Edit 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...')
 
 
(Una revisione intermedia di un utente non mostrate)
Riga 3: Riga 3:
 
<br> PUT /virtual_machines/:id.xml PUT /virtual_machines/:id.json  
 
<br> PUT /virtual_machines/:id.xml PUT /virtual_machines/:id.json  
  
XML Request example  
+
'''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  
+
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://cloud.neen.it/virtual_machines/:id.xml  
  
JSON Request example  
+
'''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  
+
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://cloud.neen.it/virtual_machines/:id.json  
  
 
You can edit the following parameters:  
 
You can edit the following parameters:  
  
label - the VS name  
+
*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>
  
memory - the amount of RAM allocated to this VS in Mb
 
  
cpus - the number of CPUs of this VS
 
  
cpu_shares* - CPU priority percentage
+
[[Category:Neencloud]]
 
+
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 17:06, 20 feb 2014



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 '<?xml version="1.0" encoding="UTF-8"?><virtual_machine><label>Test_API_Edit</label><memory>512</memory><cpu_shares>40</cpu_shares><cpus>4</cpus><allow_migration>1</allow_migration><allow_cold_resize>1</allow_cold_resize><primary_disk_min_iops>600</primary_disk_min_iops><swap_disk_min_iops>600</swap_disk_min_iops></virtual_machine>' --url http://cloud.neen.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://cloud.neen.it/virtual_machines/:id.json

You can edit the following parameters:

Strumenti personali
Namespace
Varianti
Azioni
Navigazione
Strumenti