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:
Status Codes:

es example:

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 using start, stop or reboot 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:
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:
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:
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:
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:
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:

es example:

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"
    }
}