machine-images

machine-images add-tags

Usage

usage: -c machine-images add-tags [-h]
                               [-f {adaptive_table,json,shell,table,value,yaml}]
                               [-c COLUMN]
                               [-m [NAME=VALUE [NAME=VALUE ...]]]
                               [--max-width <integer>] [--noindent]
                               [--prefix PREFIX] [--project-id PROJECT_ID]
                               [--system-tag]
                               machine_image_id --tags [--tags ...]

Description

Add tags to a machine image.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--project-id PROJECT_ID
                      If passed with appropriate permissions, tag registered to this project
--system-tag          If True and user is system_admin, tag will be added as system tag (overrides project_id)

machine-images create-machine-image-from-file

Usage

usage: -c machine-images create-machine-image-from-file [-h]
                                                     [-f {adaptive_table,json,shell,table,value,yaml}]
                                                     [-c COLUMN]
                                                     [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                     [--max-width <integer>]
                                                     [--noindent]
                                                     [--prefix PREFIX]
                                                     [--storage-pool STORAGE_POOL]
                                                     [--volume-size-gib VOLUME_SIZE_GIB]
                                                     [--bus-type BUS_TYPE]
                                                     [--disk-type DISK_TYPE]
                                                     [--machine-image-id MACHINE_IMAGE_ID]
                                                     [--description DESCRIPTION]
                                                     [--firmware FIRMWARE]
                                                     [--guest-os GUEST_OS]
                                                     [--scope SCOPE]
                                                     [--project-id PROJECT_ID]
                                                     [--tags [TAGS [TAGS ...]]]
                                                     [--os-type-id OS_TYPE_ID]
                                                     file name

Description

Creates a new machine image.

Return

Returns dict: A machine image

Optional

 optional arguments:
-h, --help            show this help message and exit
--storage-pool STORAGE_POOL
                      The storage pool in which the snapshot of the new machine image will be created.
                      If not provided, the image will be created in the default storage pool
--volume-size-gib VOLUME_SIZE_GIB
                      The size, in GiB, of the snapshot of the new machine image that will be created
--bus-type BUS_TYPE   The bus_type of the snapshot of the new machine image that will be created (allowed values: ['ide', 'virtio'])
--disk-type DISK_TYPE
                      The disk_type of the snapshot of the new machine image that will be created (allowed values: ['cdrom', 'disk'])
--machine-image-id MACHINE_IMAGE_ID
                      ID for the newly created image
--description DESCRIPTION
                      The description of the new machine image
--firmware FIRMWARE   The firmware of the VMs created from the new machine image: bios (the default) or uefi
--guest-os GUEST_OS   The operating system of the VMs created from the new machine image: linux, windows, solaris, or other (the default)
--scope SCOPE         The scope of the new machine image: public, account or project (the default). Only admin can set the scope to public,
                      and only account admin can set it to account
--project-id PROJECT_ID
                      The project ID of the new machine image
--tags [TAGS [TAGS ...]]
                      Tags to be associated with the machine image
--os-type-id OS_TYPE_ID
                      The operating system id of the VMs created from the new machine image

machine-images create-machine-image-from-snapshot

Usage

usage: -c machine-images create-machine-image-from-snapshot
    [-h] [-f {adaptive_table,json,shell,table,value,yaml}] [-c COLUMN]
    [-m [NAME=VALUE [NAME=VALUE ...]]] [--max-width <integer>] [--noindent]
    [--prefix PREFIX] [--machine-image-id MACHINE_IMAGE_ID]
    [--description DESCRIPTION] [--firmware FIRMWARE] [--guest-os GUEST_OS]
    [--scope SCOPE] [--project-id PROJECT_ID] [--tags [TAGS [TAGS ...]]]
    [--duplicate-snapshot] [--os-type-id OS_TYPE_ID]
    name block_device_mapping

Description

Creates a new machine image from existing snapshot(s).

Return

Returns dict: A machine image

Optional

 optional arguments:
-h, --help            show this help message and exit
--machine-image-id MACHINE_IMAGE_ID
                      ID for the newly created image
--description DESCRIPTION
                      The description of the new machine image
--firmware FIRMWARE   The firmware of the VMs created from the new machine image: bios (the default) or uefi
--guest-os GUEST_OS   The operating system of the VMs created from the new machine image: linux, windows, solaris, or other (the default)
--scope SCOPE         The scope of the new machine image: public, account or project (the default). Only admin can set the scope to public,
                      and only account admin can set it to account
--project-id PROJECT_ID
                      The project ID that should own this image. This makes sense only for cloud admin (who can pass any project ID)
                      or account admin (who can pass any project ID in the account). A user may also pass it, but the project ID must
                      be the same project ID that the user is logged into
--tags [TAGS [TAGS ...]]
                      Tags to be associated with the machine image. Supports both the
                      old format of [key=value OR key= OR key, ...] and the
                      new JSON format '{"key": "key1", "value": "value1"}'
--duplicate-snapshot  By default, creating image from snapshot just creates a reference between the new-image to the existing snapshot.
                      If this option is set, and new snapshot will be created from the provided snapshot, and the image will be referenced
                      with the new snapshot
--os-type-id OS_TYPE_ID
                      The operating system id of the VMs created from the new machine image

machine-images create-machine-image-from-vm

Usage

usage: -c machine-images create-machine-image-from-vm [-h]
                                                   [-f {adaptive_table,json,shell,table,value,yaml}]
                                                   [-c COLUMN]
                                                   [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                   [--max-width <integer>]
                                                   [--noindent]
                                                   [--prefix PREFIX]
                                                   [--machine-image-id MACHINE_IMAGE_ID]
                                                   [--description DESCRIPTION]
                                                   [--block-device-mapping BLOCK_DEVICE_MAPPING]
                                                   [--no-reboot]
                                                   [--guest-os GUEST_OS]
                                                   [--scope SCOPE]
                                                   [--project-id PROJECT_ID]
                                                   [--tags [TAGS [TAGS ...]]]
                                                   [--os-type-id OS_TYPE_ID]
                                                   vm_id name

Description

Creates a new machine image from a VM.

Return

Returns dict: A machine image

Optional

 optional arguments:
-h, --help            show this help message and exit
--machine-image-id MACHINE_IMAGE_ID
                      ID for the newly created image
--description DESCRIPTION
                      The description of the new machine image
--block-device-mapping BLOCK_DEVICE_MAPPING
                      A list of modifications to the VM's block devices. Each of the blocks can contains only those
                      attributes which are to be different in the machine image, and the rest of the attributes are taken
                      from the block devices of the VM. The format is a JSON string containing a list of blocks. Each of
                      the blocks is a dictionary with the following keys: snapshot_id, volume_size_gib, storage_pool,
                      bus_type, disk_type, no_device.
                      - The value of bus_type (if given) must be either "virtio" or "ide",
                      - The value of disk_type (if given) must be either "disk" or "cdrom".
                      - If no_device is specified then the block is skipped, and will not be part of the machine image. The
                      value given is ignored.
                      For example:
                      '[{"snapshot_id": <ID>, "volume_size_gib": #, "storage_pool": <ID>, "bus_type": "virtio"|"ide", "disk_type": "disk"|"cdrom"}, {"no_device":true}, {...}]'
                      or
                      '[{"volume_size_gib" #}, {"no_device":true}, {"disk_bus": "ide"}]'
--no-reboot           By default, the VM is shut down and rebooted the image. If this option is set, the VM is not shut
                      down but the file system integrity on the created image can't be guaranteed
--guest-os GUEST_OS   The operating system of the VMs created from the new machine image: linux, windows, solaris, or other (the default)
--scope SCOPE         The scope of the new machine image: public, account or project (the default). Only admin can set the scope to public,
                      and only account admin can set it to account
--project-id PROJECT_ID
                      The project ID that should own this image. This makes sense only for cloud admin (who can pass any
                      project ID) or account admin (who can pass any project ID in the account). A user may also pass it,
                      but the project ID must be the same project ID that the user is logged into
--tags [TAGS [TAGS ...]]
                      Tags to be associated with the new machine image. Supports both the
                      old format of [key=value OR key= OR key, ...] and the
                      new JSON format '{"key": "key1", "value": "value1"}'
--os-type-id OS_TYPE_ID
                      The operating system id of the VMs created from the new machine image

machine-images delete

Usage

usage: -c machine-images delete [-h]
                             [-f {adaptive_table,json,shell,table,value,yaml}]
                             [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                             [--max-width <integer>] [--noindent]
                             [--prefix PREFIX] [--override-protection]
                             [--delete-image-snapshot]
                             machine_image_id

Description

Deletes a machine image with the given ID.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--override-protection
                      If True, will delete even if the machine image is protected from deletion (admin only)
--delete-image-snapshot
                      If True, will delete the image-snapshot during the image deletion (only if no other image is using this snapshot)

machine-images get

Usage

usage: -c machine-images get [-h]
                          [-f {adaptive_table,json,shell,table,value,yaml}]
                          [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                          [--max-width <integer>] [--noindent]
                          [--prefix PREFIX] [--with-tags]
                          machine_image_id

Description

Returns a machine image with the given ID.

Return

Returns dict: A machine image

Optional

 optional arguments:
-h, --help            show this help message and exit
--with-tags           A flag that indicates whether list should get ports-tags or not

machine-images health get

Usage

usage: -c machine-images health get [-h]
                                 [-f {adaptive_table,json,shell,table,value,yaml}]
                                 [-c COLUMN]
                                 [-m [NAME=VALUE [NAME=VALUE ...]]]
                                 [--max-width <integer>] [--noindent]
                                 [--prefix PREFIX] [--extended]
                                 [--check-timeout CHECK_TIMEOUT]

Description

Returns the health status.

Return

Returns dict: Health status

Optional

 optional arguments:
-h, --help            show this help message and exit
--extended            If set an extended health check will initiate
--check-timeout CHECK_TIMEOUT
                      Timeout in seconds for each of the connection tests

machine-images import-machine-image-from-url

Usage

usage: -c machine-images import-machine-image-from-url [-h]
                                                    [-f {adaptive_table,json,shell,table,value,yaml}]
                                                    [-c COLUMN]
                                                    [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                    [--max-width <integer>]
                                                    [--noindent]
                                                    [--prefix PREFIX]
                                                    [--machine-image-id MACHINE_IMAGE_ID]
                                                    [--description DESCRIPTION]
                                                    [--firmware FIRMWARE]
                                                    [--guest-os GUEST_OS]
                                                    [--scope SCOPE]
                                                    [--project-id PROJECT_ID]
                                                    [--tags [TAGS [TAGS ...]]]
                                                    [--os-type-id OS_TYPE_ID]
                                                    name
                                                    block_device_mapping

Description

Creates a new machine image by importing from one or more URLs.

Return

Returns dict: A Machine image

Optional

 optional arguments:
-h, --help            show this help message and exit
--machine-image-id MACHINE_IMAGE_ID
                      ID for the newly created image
--description DESCRIPTION
                      The description of the new machine image
--firmware FIRMWARE   The firmware of the VMs created from the new machine image: bios (the default) or uefi
--guest-os GUEST_OS   The operating system of the VMs created from the new machine image: linux, windows, solaris, or other (the default)
--scope SCOPE         The scope of the new machine image: public, account or project (the default). Only admin can set the scope to public,
                      and only account admin can set it to account
--project-id PROJECT_ID
                      The project ID of the new machine image
--tags [TAGS [TAGS ...]]
                      Tags to be associated with the machine image. Supports both the
                      old format of [key=value OR key= OR key, ...] and the
                      new JSON format '{"key": "key1", "value": "value1"}'
--os-type-id OS_TYPE_ID
                      The operating system id of the VMs created from the new machine image

machine-images list

Usage

usage: -c machine-images list [-h]
                           [-f {adaptive_table,csv,json,table,value,yaml}]
                           [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                           [--max-width <integer>] [--noindent]
                           [--quote {all,minimal,none,nonnumeric}]
                           [--id [ID [ID ...]]]
                           [--user-id [USER_ID [USER_ID ...]]]
                           [--project-id [PROJECT_ID [PROJECT_ID ...]]]
                           [--account-id [ACCOUNT_ID [ACCOUNT_ID ...]]]
                           [--name [NAME [NAME ...]]]
                           [--description [DESCRIPTION [DESCRIPTION ...]]]
                           [--firmware [FIRMWARE [FIRMWARE ...]]]
                           [--guest-os [GUEST_OS [GUEST_OS ...]]]
                           [--block-device-mapping-snapshot-id [BLOCK_DEVICE_MAPPING_SNAPSHOT_ID [BLOCK_DEVICE_MAPPING_SNAPSHOT_ID ...]]]
                           [--block-device-mapping-volume-size-gib [BLOCK_DEVICE_MAPPING_VOLUME_SIZE_GIB [BLOCK_DEVICE_MAPPING_VOLUME_SIZE_GIB ...]]]
                           [--block-device-mapping-bus-type [BLOCK_DEVICE_MAPPING_BUS_TYPE [BLOCK_DEVICE_MAPPING_BUS_TYPE ...]]]
                           [--block-device-mapping-disk-type [BLOCK_DEVICE_MAPPING_DISK_TYPE [BLOCK_DEVICE_MAPPING_DISK_TYPE ...]]]
                           [--state [STATE [STATE ...]]]
                           [--scope [SCOPE [SCOPE ...]]]
                           [--tag-keys [TAG_KEYS [TAG_KEYS ...]]]
                           [--tag-values [TAG_VALUES [TAG_VALUES ...]]]
                           [--tag [TAG [TAG ...]]] [--with-tags]

Description

Returns all machine images.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--id [ID [ID ...]]    Filter by the ID of the machine image
--user-id [USER_ID [USER_ID ...]]
                      Filter by the user ID of the machine image
--project-id [PROJECT_ID [PROJECT_ID ...]]
                      Filter by the project ID of the machine image
--account-id [ACCOUNT_ID [ACCOUNT_ID ...]]
                      Filter by the account ID of the machine image
--name [NAME [NAME ...]]
                      Filter by the name of the machine image
--description [DESCRIPTION [DESCRIPTION ...]]
                      Filter by the description of the machine image
--firmware [FIRMWARE [FIRMWARE ...]]
                      Filter by the firmware of the machine image
--guest-os [GUEST_OS [GUEST_OS ...]]
                      Filter by the operating system of the machine image
--block-device-mapping-snapshot-id [BLOCK_DEVICE_MAPPING_SNAPSHOT_ID [BLOCK_DEVICE_MAPPING_SNAPSHOT_ID ...]]
                      Filter by the snapshot ID in the block device mapping of the machine image
--block-device-mapping-volume-size-gib [BLOCK_DEVICE_MAPPING_VOLUME_SIZE_GIB [BLOCK_DEVICE_MAPPING_VOLUME_SIZE_GIB ...]]
                      Filter by the volume size in GiB in the block device mapping of the machine image
--block-device-mapping-bus-type [BLOCK_DEVICE_MAPPING_BUS_TYPE [BLOCK_DEVICE_MAPPING_BUS_TYPE ...]]
                      Filter by the bus type in the block device mapping of the machine image
--block-device-mapping-disk-type [BLOCK_DEVICE_MAPPING_DISK_TYPE [BLOCK_DEVICE_MAPPING_DISK_TYPE ...]]
                      Filter by the disk type in the block device mapping of the machine image
--state [STATE [STATE ...]]
                      Filter by the state of the machine image
--scope [SCOPE [SCOPE ...]]
                      Filter by the scope of the machine image
--tag-keys [TAG_KEYS [TAG_KEYS ...]]
                      Filter by the tag keys of the machine image,
                      format ["key1", "key2, key3", "key4", ...]
--tag-values [TAG_VALUES [TAG_VALUES ...]]
                      Filter by the tag values of the machine image,
                      format ["value1, value2", "value3", "value4",...]
--tag [TAG [TAG ...]]
                      Filter by the machine tags. Supports both the
                      old format of [key=value OR key= OR key, ...] and the
                      new JSON format '{"key": "key1", "value": ["value1","value2"]}'
--with-tags           A flag that indicates whether list should get ports-tags or not

machine-images list-tags

Usage

usage: -c machine-images list-tags [-h]
                                [-f {adaptive_table,csv,json,table,value,yaml}]
                                [-c COLUMN]
                                [-m [NAME=VALUE [NAME=VALUE ...]]]
                                [--max-width <integer>] [--noindent]
                                [--quote {all,minimal,none,nonnumeric}]

Description

List tags of all machine images (restricted by user scope).

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit

machine-images os-types get

Usage

usage: -c machine-images os-types get [-h]
                                   [-f {adaptive_table,json,shell,table,value,yaml}]
                                   [-c COLUMN]
                                   [-m [NAME=VALUE [NAME=VALUE ...]]]
                                   [--max-width <integer>] [--noindent]
                                   [--prefix PREFIX]
                                   os_type_id

Description

Returns a OS-types with the given ID.

Return

Returns dict: An OS-type

Optional

 optional arguments:
-h, --help            show this help message and exit

machine-images os-types list

Usage

usage: -c machine-images os-types list [-h]
                                    [-f {adaptive_table,csv,json,table,value,yaml}]
                                    [-c COLUMN]
                                    [-m [NAME=VALUE [NAME=VALUE ...]]]
                                    [--max-width <integer>] [--noindent]
                                    [--quote {all,minimal,none,nonnumeric}]

Description

Returns all OS-types.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit

machine-images remove-tags

Usage

usage: -c machine-images remove-tags [-h]
                                  [-f {adaptive_table,json,shell,table,value,yaml}]
                                  [-c COLUMN]
                                  [-m [NAME=VALUE [NAME=VALUE ...]]]
                                  [--max-width <integer>] [--noindent]
                                  [--prefix PREFIX]
                                  [--project-id PROJECT_ID] [--system-tag]
                                  machine_image_id --tags [--tags ...]

Description

Remove tags from a machine image.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--project-id PROJECT_ID
                      If passed with appropriate permissions, tag removed from this project
--system-tag          If True and user is system_admin, tag will be removed from system tags (overrides project_id)

machine-images update

Usage

usage: -c machine-images update [-h]
                             [-f {adaptive_table,json,shell,table,value,yaml}]
                             [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                             [--max-width <integer>] [--noindent]
                             [--prefix PREFIX] [--name NAME]
                             [--description DESCRIPTION]
                             [--firmware FIRMWARE] [--guest-os GUEST_OS]
                             [--scope SCOPE] [--override-protection]
                             [--os-type-id OS_TYPE_ID]
                             machine_image_id

Description

Update machine image’s parameters.

Return

Returns dict: A machine image

Optional

 optional arguments:
-h, --help            show this help message and exit
--name NAME           The new name of the machine image
--description DESCRIPTION
                      The new description of the machine image
--firmware FIRMWARE   The new firmware type of the machine image: bios or uefi
--guest-os GUEST_OS   The new operating system of the machine image: linux, windows, solaris or other
--scope SCOPE         The scope of the new machine image: public, account or project. Only admin can set the scope to public,
                      and only account admin can set it to account
--override-protection
                      If True, will update even if the machine image is protected from update (admin only)
--os-type-id OS_TYPE_ID
                      The operating system id of the VMs created from the new machine image