api.vm.status
¶
/vm/status¶
-
api.vm.status.views.
vm_status_list
(*args, **kwargs)¶ List (
GET
) VMs with their current status.-
GET
/vm/status
¶ DC-bound?: Permissions: Asynchronous?: Parameters: - data.order_by (string) – Available fields for sorting:
hostname
(default:hostname
)
Status Codes: - 200 OK – SUCCESS
- 403 Forbidden – Forbidden
- data.order_by (string) – Available fields for sorting:
es get /vm/status
{ "url": "https://my.erigones.com/api/vm/status/", "status": 200, "method": "GET", "text": { "status": "SUCCESS", "result": [ { "status": "running", "alias": "example", "hostname": "example.cust.erigones.com", "status_change": "2012-01-22T23:23:23.365Z", "tasks": {} }, ], "task_id": "0-6f75849b-fdaf-4e6e-b580" } }
-
/vm/(hostname_or_uuid)/status/(action)¶
-
api.vm.status.views.
vm_status
(*args, **kwargs)¶ Get (
GET
) or set (PUT
) VM status by usingstart
,stop
orreboot
action.-
GET
/vm/
(hostname_or_uuid)/status
¶ Retrieves current status from database.
DC-bound?: Permissions: Asynchronous?: Parameters: - hostname_or_uuid (string) – required - Server hostname or uuid
Status Codes: - 200 OK – SUCCESS
- 400 Bad Request – FAILURE
- 403 Forbidden – Forbidden
- 404 Not Found – VM not found
- 423 Locked – Node is not operational / VM is not operational
-
GET
/vm/
(hostname_or_uuid)/status/current
¶ Retrieves current VM status from compute node.
DC-bound?: Permissions: Asynchronous?: Parameters: - hostname_or_uuid (string) – required - Server hostname or uuid
Status Codes: - 200 OK – SUCCESS
- 201 Created – PENDING
- 400 Bad Request – FAILURE
- 403 Forbidden – Forbidden
- 404 Not Found – VM not found
- 423 Locked – Node is not operational / VM is not operational
-
PUT
/vm/
(hostname_or_uuid)/status/current
¶ Retrieves current VM status from compute node and updates status value in DB for the VM.
Warning
This API call is intended for internal administrative purposes only and should be used with care.
DC-bound?: Permissions: Asynchronous?: Parameters: - hostname_or_uuid (string) – required - Server hostname or uuid
- data.force (boolean) – Force change of the current status (default: false)
Status Codes: - 200 OK – SUCCESS
- 201 Created – PENDING
- 400 Bad Request – FAILURE
- 403 Forbidden – Forbidden
- 404 Not Found – VM not found
- 423 Locked – Node is not operational
- 428 – Force parameter must be used
-
PUT
/vm/
(hostname_or_uuid)/status/start
¶ DC-bound?: Permissions: Asynchronous?: Parameters: - hostname_or_uuid (string) – required - Server hostname or uuid
- data.update (boolean) – Update VM configuration (if changed) on compute node (default: true)
- data.cdimage (string) – Name of the primary ISO image to boot from (default: null)
- data.cdimage_once (boolean) – Boot only once from the primary ISO image (default: true)
- data.cdimage2 (string) – Name of the secondary ISO image to boot from. Can be only used along with cdimage (default: null)
Status Codes: - 200 OK – SUCCESS
- 201 Created – PENDING
- 400 Bad Request – FAILURE
- 403 Forbidden – Forbidden
- 404 Not Found – VM not found
- 409 Conflict – VM has pending tasks (update=true)
- 417 Expectation Failed – Bad action
- 423 Locked – Node is not operational / VM is not operational
- 428 – VM must be updated first / VM is not installed
-
PUT
/vm/
(hostname_or_uuid)/status/stop
¶ DC-bound?: Permissions: Asynchronous?: Parameters: - hostname_or_uuid (string) – required - Server hostname or uuid
- data.force (boolean) – Force change of the status (default: false)
- data.update (boolean) – Update VM configuration (if changed) after stopping VM on compute node (default: false)
- data.timeout (integer) – Time period (in seconds) for a graceful shutdown, after which the force shutdown is send to the VM (KVM only) (default: 180 seconds / 300 seconds for Windows VM)
- data.freeze (boolean) – Set frozen status after successful stop action (default: false)
- data.unfreeze (boolean) – Remove frozen status and set it back to stopped (default: false)
Status Codes: - 200 OK – SUCCESS
- 201 Created – PENDING
- 400 Bad Request – FAILURE
- 403 Forbidden – Forbidden
- 404 Not Found – VM not found
- 409 Conflict – VM has pending tasks (update=true)
- 417 Expectation Failed – Bad action / VM has snapshots (disk size update)
- 423 Locked – Node is not operational / VM is not operational / VM is already stopping
- 428 – Cannot perform update while VM is stopping
-
PUT
/vm/
(hostname_or_uuid)/status/reboot
¶ DC-bound?: Permissions: Asynchronous?: Parameters: - hostname_or_uuid (string) – required - Server hostname or uuid
- data.force (boolean) – Force change of the status (default: false)
- data.update (boolean) – Update VM configuration (if changed) before starting (after stop) VM on compute node (default: true)
- data.timeout (integer) – Time period (in seconds) for a graceful reboot, after which the force reboot is send to the VM (KVM only) (default: 180 seconds / 300 seconds for Windows VM)
Status Codes: - 200 OK – SUCCESS
- 201 Created – PENDING
- 400 Bad Request – FAILURE
- 403 Forbidden – Forbidden
- 404 Not Found – VM not found
- 409 Conflict – VM has pending tasks (update=true)
- 417 Expectation Failed – Bad action / VM has snapshots (disk size update)
- 423 Locked – Node is not operational / VM is not operational / VM is already stopping
- 428 – Cannot perform update while VM is stopping
es set /vm/example.cust.erigones.com/status/start
{ "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/status/start/", "status": 200, "method": "PUT", "text": { "status": "SUCCESS", "result": { "message": "Successfully started VM example.cust.erigones.com", "returncode": 0 }, "task_id": "0-a2327793-2600-423d-9f07" } }
-