api.vm.base

/vm

api.vm.base.views.vm_list(*args, **kwargs)

List (GET) existing VMs.

GET /vm
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of objects with some VM details (default: false)
  • data.extended (boolean) – Return list of objects with extended VM details (default: false)
  • data.active (boolean) – Display currently active (on compute node) VM details (default: false)
  • data.order_by (string) – Available fields for sorting: hostname (default: hostname)
Status Codes:

es example:

es get /vm
{
    "url": "https://my.erigones.com/api/vm/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            "example2.cust.erigones.com",
            "example.cust.erigones.com"
        ],
        "task_id": "0-6f75849b-f2e0-4f1d-a891"
    }
}

/vm/(hostname_or_uuid)

api.vm.base.views.vm_manage(*args, **kwargs)

Get (GET), create (deploy) (POST), update (PUT) or delete (DELETE) a VM on a compute node. The VM must be defined.

GET /vm/(hostname_or_uuid)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.extended (boolean) – Display extended VM details (default: false)
  • data.active (boolean) – Display currently active (on compute node) VM details (default: false)
Status Codes:
POST /vm/(hostname_or_uuid)
DC-bound?:
Permissions:
Asynchronous?:
  • - Update on compute node, when VM definition has changed
  • - Update in DB only, when VM definition was not changed
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.recreate (boolean) – Delete and create the VM from scratch (default: false)
  • data.force (boolean) – Must be true to force recreate (default: false)
Status Codes:
PUT /vm/(hostname_or_uuid)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.force (boolean) – If true, update VM definition according to current VM configuration on compute node
  • data.node (string) – (EXPERIMENTAL feature) Name of the compute node on which VM is located - must be used used with force (requires SuperAdmin permission)
Status Codes:

Warning

The node parameter should only be used in special cases, i.e. disaster recovery from backups, when the VM was restored manually on a different compute node. This action does not perform any resource checking on the target node in DB.

DELETE /vm/(hostname_or_uuid)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
Status Codes:

es example:

es create /vm/example.cust.erigones.com
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/",
    "status": 200,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "message": "Successfully created VM example.cust.erigones.com",
            "returncode": 0
        },
        "task_id": "0-e0b6801c-dad9-4481-9bb2"
    }
}