api.image.base

/image

api.image.base.views.image_list(*args, **kwargs)

List (GET) all server disk images.

GET /image
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of objects with all server disk image details (default: false)
  • data.extended (boolean) – Return list of objects with extended server disk image details (default: false)
  • data.order_by (string) – Available fields for sorting: name, created (default: name)
Status Codes:

/image/(name)

api.image.base.views.image_manage(*args, **kwargs)

Show (GET), import (POST), update (PUT) or delete (DELETE) a server disk image.

GET /image/(name)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Server disk image name
  • data.extended (boolean) – Display extended disk image details (default: false)
Status Codes:

Note

The behaviour of the following API functions depends on whether a global image server (VMS_IMAGE_VM) is configured in the system. With no image server configured all operations will be performed at database level only.

POST /image/(name)

Note

You can also import images from remote disk image repositories by using the POST /imagestore/(name)/image/(uuid) API function.

DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
  • - Image server support is enabled in the system (default)
  • - Image server support is disabled in the system
Parameters:
  • name (string) – required - Server disk image name
  • data.manifest_url (string) – required - Disk image manifest URL
  • data.file_url (string) – Optional image file URL (will be assembled from manifest URL if not provided)
  • data.alias (string) – Short image name (default: name)
  • data.access (integer) – Access type (1 - Public, 3 - Private, 4 - Deleted) (default: 3)
  • data.owner (string) – User that owns the image (default: logged in user)
  • data.desc (string) – Image description (default: read from manifest)
  • data.version (string) – Image version (default: read from manifest)
  • data.resize (boolean) – Whether the image is able to resize the disk during an initial start or deploy process (default: read from manifest / true for OS zones, otherwise false)
  • data.deploy (boolean) – Whether the image is able to shut down the server after an initial start (default: read from manifest / false)
  • data.tags (array) – Image tags will be inherited by VMs which will use this image (default: read from manifest)
  • data.dc_bound (boolean) – Whether the disk image is bound to a datacenter (requires SuperAdmin permission) (default: true)
  • data.dc (string) – Name of the datacenter the disk image will be attached to (required if DC-bound)
Status Codes:
PUT /image/(name)
DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
  • - Image is updated on image server when at least one attribute except dc_bound has changed and image server support is enabled in the system
  • - Image is updated in DB only when only the dc_bound attribute has changed or image server support is disabled in the system
Parameters:
  • name (string) – required - Server disk image name
  • data.alias (string) – Short image name
  • data.access (integer) – Access type (1 - Public, 3 - Private, 4 - Deleted)
  • data.owner (string) – User that owns the image
  • data.desc (string) – Image description
  • data.version (string) – Image version
  • data.resize (boolean) – Whether the image is able to resize the disk during an initial start or deploy process
  • data.deploy (boolean) – Whether the image is able to shut down the server after an initial start
  • data.tags (array) – Image tags will be inherited by VMs which will use this image
  • data.dc_bound (boolean) – Whether the image is bound to a datacenter (requires SuperAdmin permission)
Status Codes:
DELETE /image/(name)

Note

A server disk image cannot be deleted when it is used by even one virtual server. In order to disable further use of such a disk image, the image can be marked as deleted by changing its access property to deleted (4).

DC-bound?:
  • - dc_bound=true
  • - dc_bound=false
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Server disk image name
Status Codes:

/vm/(hostname_or_uuid)/snapshot/(snapname)/image/(name)

api.image.base.views.image_snapshot(*args, **kwargs)

Create (POST) a server disk image from a disk snapshot.

Note

A global image server (VMS_IMAGE_VM) must be configured in the system.

POST /vm/(hostname_or_uuid)/snapshot/(snapname)/image/(name)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • name (string) – required - Server disk image name
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • snapname (string) – required - Snapshot name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.alias (string) – Short image name (default: name)
  • data.access (integer) – Access type (1 - Public, 3 - Private, 4 - Deleted) (default: 3)
  • data.owner (string) – User that owns the image (default: logged in user)
  • data.desc (string) – Image description
  • data.version (string) – Image version (default: 1.0)
  • data.resize (boolean) – Whether the image is able to resize the disk during an initial start or deploy process (default: false)
  • data.deploy (boolean) – Whether the image is able to shut down the server after an initial start (default: false)
Status Codes: