machine-images

machine-images add-tags

Usage

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

Description

Add tags to a machine image.

Mandatory

positional arguments:
  machine_image_id      ID of image to which to add the tags
  --tags                List of tags to add to image. Supports both the
                        old format of [key=value OR key= OR key, ...] and the
                        new JSON format '{"key": "key1", "value": "value1"}'

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: symp machine-images create-machine-image-from-file
[-f {adaptive_table,json,shell,table,value,yaml}]
                                                            [-c COLUMN]
                                                            [--max-width <integer>]
                                                            [--noindent]
                                                            [--prefix PREFIX]
                                                            [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                            [--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.

Returns

Returns dict: A machine image

Mandatory

positional arguments:
  file
  name                  The name of the new 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: <MagicMock name='mock.consts.BlockDeviceMappingBusType.all()' id='139907514168848'>)
  --disk-type DISK_TYPE
                        The disk_type of the snapshot of the new machine image that will be created (allowed values: <MagicMock name='mock.consts.BlockDeviceMappingDiskType.all()' id='139907514261712'>)
  --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: symp machine-images create-machine-image-from-snapshot
       [-h] [-f {adaptive_table,json,shell,table,value,yaml}] [-c COLUMN]
       [--max-width <integer>] [--noindent] [--prefix PREFIX]
       [-m [NAME=VALUE [NAME=VALUE ...]]]
       [--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).

Returns

Returns dict: A machine image

Mandatory

positional arguments:
  name                  The name of the new machine image
  block_device_mapping  The mapping of the new machine image to its different snapshots. 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 and disk_type.
                        - The value of bus_type must be either "virtio" or "ide",
                        - The value of disk_type must be either "disk" or "cdrom"
                        - The value of storage_pool indicates the ID of a storage pool. If it is not given, the machine image
                        is created in the default storage pool.
                        For example,
                        '[{"snapshot_id": <ID>, "volume_size_gib": #, "storage_pool": <ID>, "bus_type": "virtio"|"ide", "disk_type": "disk"|"cdrom"}, {...}]'

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: symp machine-images create-machine-image-from-vm
[-f {adaptive_table,json,shell,table,value,yaml}]
                                                          [-c COLUMN]
                                                          [--max-width <integer>]
                                                          [--noindent]
                                                          [--prefix PREFIX]
                                                          [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                          [--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.

Some values are provided here, others are obtained directly from the VM This includes the firmware, block device mapping including storage_pool, disk_type, and bus_type (the values provided here only override those found in the VM), and architecture (for internal API only)

Returns

Returns dict: A machine image

Mandatory

positional arguments:
  vm_id                 The ID of the source VM
  name                  The name of the new 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: symp machine-images delete
[-f {adaptive_table,json,shell,table,value,yaml}]
                                    [-c COLUMN] [--max-width <integer>]
                                    [--noindent] [--prefix PREFIX]
                                    [-m [NAME=VALUE [NAME=VALUE ...]]]
                                    [--override-protection]
                                    [--delete-image-snapshot]
                                    machine_image_id

Description

Deletes a machine image with the given ID.

Mandatory

positional arguments:
  machine_image_id      The ID of the requested machine image

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

Description

Returns a machine image with the given ID.

Returns

Returns dict: A machine image

Mandatory

positional arguments:
  machine_image_id      The ID of the requested 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: symp machine-images health get
[-f {adaptive_table,json,shell,table,value,yaml}]
                                        [-c COLUMN] [--max-width <integer>]
                                        [--noindent] [--prefix PREFIX]
                                        [-m [NAME=VALUE [NAME=VALUE ...]]]
                                        [--extended]
                                        [--check-timeout CHECK_TIMEOUT]

Description

Returns the health status.

Note:

This endpoint will be used continuously by cluster manager in order to determine if the service is up and running and ready to serve requests.

Returns

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: symp machine-images import-machine-image-from-url
[-f {adaptive_table,json,shell,table,value,yaml}]
                                                           [-c COLUMN]
                                                           [--max-width <integer>]
                                                           [--noindent]
                                                           [--prefix PREFIX]
                                                           [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                           [--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.

Returns

Returns dict: A Machine image

Mandatory

positional arguments:
  name                  The name of the new machine image
  block_device_mapping  The mapping of the new machine image to its different snapshots. The format is a JSON string
                        containing a list of blocks. Each of the blocks is a dictionary with the following keys: url, auth,
                        no_verify_ssl, storage_pool, bus_type, disk_type.
                        - The value of auth should contain a list with two elements: username and a password. If it is
                        omitted the URL is accessed without any authentication.
                        - The value of no_verify_ssl is boolean (true or false)
                        - The value of storage_pool indicates the ID of a storage pool. If it is not given, the machine image
                        is created in the default storage pool
                        - The bus_type must be either "virtio" or "ide"
                        - The disk_type must be either "disk" or "cdrom"
                        For example,
                        '[{"url": <URL>, "auth": <AUTH>, "no_verify_ssl": true|false, "storage_pool": <ID>, "bus_type": "virtio"|"ide", "disk_type": "disk"|"cdrom"}, {...}]'

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: symp machine-images list
[-f {adaptive_table,csv,json,table,value,yaml}]
                                  [-c COLUMN] [--max-width <integer>]
                                  [--noindent]
                                  [--quote {all,minimal,none,nonnumeric}]
                                  [-m [NAME=VALUE [NAME=VALUE ...]]]
                                  [--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.

Returns

Returns list: List of machine images

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

Description

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

Returns

Returns list: List of all tags

Optional

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

machine-images os-types get

Usage

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

Description

Returns a OS-types with the given ID.

Returns

Returns dict: An OS-type

Mandatory

positional arguments:
  os_type_id            The ID of the requested OS-type

Optional

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

machine-images os-types list

Usage

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

Description

Returns all OS-types.

Returns

Returns list: List of OS-types

Optional

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

machine-images remove-tags

Usage

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

Description

Remove tags from a machine image.

Mandatory

positional arguments:
  machine_image_id      ID of image to which to remove the tags
  --tags                Tags to remove from image. Supports both the
                        old format of [key=value OR key= OR key, ...] and the
                        new JSON format '{"key": "key1", "value": ["value1", "value2"]}'

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: symp machine-images update
[-f {adaptive_table,json,shell,table,value,yaml}]
                                    [-c COLUMN] [--max-width <integer>]
                                    [--noindent] [--prefix PREFIX]
                                    [-m [NAME=VALUE [NAME=VALUE ...]]]
                                    [--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.

Returns

Returns dict: A machine image

Mandatory

positional arguments:
  machine_image_id      ID of the requested 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