Glance commands

The glance client is the command-line interface (CLI) for the OpenStack Image Service API and its extensions.

For help on a specific glance command, enter:

$ glance help COMMAND

glance usage

[--cert-file CERT_FILE] [--key-file KEY_FILE]

[--os-cacert <ca-certificate-file>] [--ca-file OS_CACERT]

[--timeout TIMEOUT] [--no-ssl-compression] [-f] [--dry-run]

[--ssl] [-H ADDRESS] [-p PORT] [--os-username OS_USERNAME]

[-I OS_USERNAME] [--os-password OS_PASSWORD] [-K OS_PASSWORD]

[--os-tenant-id OS_TENANT_ID] [--os-tenant-name OS_TENANT_NAME]

[-T OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL] [-N OS_AUTH_URL]

[--os-region-name OS_REGION_NAME] [-R OS_REGION_NAME]

[--os-auth-token OS_AUTH_TOKEN] [-A OS_AUTH_TOKEN]

[--os-image-url OS_IMAGE_URL] [-U OS_IMAGE_URL]

[--os-image-api-version OS_IMAGE_API_VERSION]

[--os-service-type OS_SERVICE_TYPE]

[--os-endpoint-type OS_ENDPOINT_TYPE] [-S OS_AUTH_STRATEGY]

<subcommand> ...

Subcommands

Command Description
image-create Create a new image.
image-delete Delete specified image(s).
image-download Download a specific image.
image-list List images you can access.
image-show Describe a specific image.
member-create Share a specific image with a tenant.
member-delete Remove a shared image from a tenant.
member-list Describe sharing permissions by image or tenant.
help Display help about this program or one of its subcommands.

glance optional arguments

Command Description
--version show program's version number and exit
-d, --debug Defaults to env[GLANCECLIENT_DEBUG]
-v, --verbose Print more verbose output
--get-schema Force retrieving the schema used to generate portions of the help text rather than using a cached copy. Ignored with api version 1
-k, --insecure Explicitly allow glanceclient to perform "insecure SSL" (https) requests. The server's certificate will not be verified against any certificate authorities. This option should be used with caution.
--cert-file CERT_FILE Path of certificate file to use in SSL connection. This file can optionally be prepended with the private key.
--key-file KEY_FILE Path of client key to use in SSL connection. This option is not necessary if your key is prepended to your cert file.
--os-cacert <ca-certificate-file> Path of CA TLS certificate(s) used to verify the remote server's certificate. Without this option glance looks for the default system CA certificates.
--ca-file OS_CACERT DEPRECATED! Use --os-cacert.
--timeout TIMEOUT Number of seconds to wait for a response
--no-ssl-compression Disable SSL compression when using https.
-f, --force Prevent select actions from requesting user confirmation.
--dry-run DEPRECATED! Only used for deprecated legacy commands.
--ssl DEPRECATED! Send a fully-formed endpoint using --os- image-url instead.
-H ADDRESS, --host ADDRESS DEPRECATED! Send a fully-formed endpoint using --os- image-url instead.
-p PORT, --port PORT DEPRECATED! Send a fully-formed endpoint using --os- image-url instead.
--os-username OS_USERNAME Defaults to env[OS_USERNAME]
-I OS_USERNAME DEPRECATED! Use --os-username.
--os-password OS_PASSWORD Defaults to env[OS_PASSWORD]
-K OS_PASSWORD DEPRECATED! Use --os-password.
--os-tenant-id OS_TENANT_ID Defaults to env[OS_TENANT_ID]
--os-tenant-name OS_TENANT_NAME Defaults to env[OS_TENANT_NAME]
-T OS_TENANT_NAME DEPRECATED! Use --os-tenant-name.
--os-auth-url OS_AUTH_URL Defaults to env[OS_AUTH_URL]
-N OS_AUTH_URL DEPRECATED! Use --os-auth-url.
--os-region-name OS_REGION_NAME Defaults to env[OS_REGION_NAME]
-R OS_REGION_NAME DEPRECATED! Use --os-region-name.
--os-auth-token OS_AUTH_TOKEN Defaults to env[OS_AUTH_TOKEN]
-A OS_AUTH_TOKEN, --auth_token OS_AUTH_TOKEN DEPRECATED! Use --os-auth-token.
--os-image-url OS_IMAGE_URL Defaults to env[OS_IMAGE_URL]
-U OS_IMAGE_URL, --url OS_IMAGE_URL DEPRECATED! Use --os-image-url.
--os-image-api-version OS_IMAGE_API_VERSION Defaults to env[OS_IMAGE_API_VERSION] or 1
--os-service-type OS_SERVICE_TYPE Defaults to env[OS_SERVICE_TYPE]
--os-endpoint-type OS_ENDPOINT_TYPE Defaults to env[OS_ENDPOINT_TYPE]
-S OS_AUTH_STRATEGY, --os_auth_strategy OS_AUTH_STRATEGY DEPRECATED! This option is completely ignored.

glance image-create command

usage: glance image-create [--id <IMAGE_ID>] [--name <NAME>] [--store <STORE>]

[--disk-format <DISK_FORMAT>]

[--container-format <CONTAINER_FORMAT>]

[--owner <TENANT_ID>] [--size <SIZE>]

[--min-disk <DISK_GB>] [--min-ram <DISK_RAM>]

[--location <IMAGE_URL>] [--file <FILE>]

[--checksum <CHECKSUM>] [--copy-from <IMAGE_URL>]

[--is-public {True,False}]

[--is-protected {True,False}]

[--property <key=value>] [--human-readable]

[--progress]

Create a new image.

Optional arguments

Command Description
--id <IMAGE_ID> ID of image to reserve.
--name <NAME> Name of image.
--store <STORE> Store to upload image to.
--disk-format <DISK_FORMAT> Disk format of image. Acceptable formats: ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso.
--container-format <CONTAINER_FORMAT> Container format of image. Acceptable formats: ami, ari, aki, bare, and ovf.
--owner <TENANT_ID> Tenant who should own image.
--size <SIZE> Size of image data (in bytes). Only used with '-- location' and '--copy_from'.
--min-disk <DISK_GB> Minimum size of disk needed to boot image (in gigabytes).
--min-ram <DISK_RAM> Minimum amount of ram needed to boot image (in megabytes).
--location <IMAGE_URL> URL where the data for this image already resides. For example, if the image data is stored in swift, you could specify 'swift://account:key@example.com/container/obj'.
--file <FILE> Local file that contains disk image to be uploaded during creation. Alternatively, images can be passed to the client via stdin.
--checksum <CHECKSUM> Hash of image data used Glance can use for verification. Provide a md5 checksum here.
--copy-from <IMAGE_URL> Similar to '--location' in usage, but this indicates that the Glance server should immediately copy the data and store it in its configured image store.
--is-public {True,False} Make image accessible to the public.
--is-protected {True,False} Prevent image from being deleted.
--property <key=value> Arbitrary property to associate with image. May be used multiple times.
--human-readable Print image size in a human-friendly format.
--progress Show upload progress bar.

glance image-delete command

usage: glance image-delete <IMAGE> [<IMAGE> ...]

Delete specified image(s).

Positional arguments

Command Description
<IMAGE> Name or ID of image(s) to delete.

glance image-list command

usage: glance image-list [--name <NAME>] [--status <STATUS>]

[--container-format <CONTAINER_FORMAT>]

[--disk-format <DISK_FORMAT>] [--size-min <SIZE>]

[--size-max <SIZE>] [--property-filter <KEY=VALUE>]

[--page-size <SIZE>] [--human-readable]

[--sort-key {name,status,container_format,disk_format,size,id,created_at,updated_at}]

[--sort-dir {asc,desc}] [--is-public {True,False}]

[--owner <TENANT_ID>] [--all-tenants]

List images you can access.

Optional arguments

Command Description
--name <NAME> Filter images to those that have this name.
--status <STATUS> Filter images to those that have this status.
--container-format <CONTAINER_FORMAT> Filter images to those that have this container format. Acceptable formats: ami, ari, aki, bare, and ovf.
--disk-format <DISK_FORMAT> Filter images to those that have this disk format. Acceptable formats: ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso.
--size-min <SIZE> Filter images to those with a size greater than this.
--size-max <SIZE> Filter images to those with a size less than this.
--property-filter <KEY=VALUE> Filter images by a user-defined image property.
--page-size <SIZE> Number of images to request in each paginated request.
--human-readable Print image size in a human-friendly format.
--sort-key {name,status,container_format,disk_format,size,id,created_at,updated_at} Sort image list by specified field.
--sort-dir {asc,desc} Sort image list in specified direction.
--is-public {True,False} Allows the user to select a listing of public or non public images.
--owner <TENANT_ID> Display only images owned by this tenant id. Filtering occurs on the client side so may be inefficient. This option is mainly intended for admin use. Use an empty string ('') to list images with no owner. Note: This option overrides the --is-public argument if present. Note: the v2 API supports more efficient server-side owner based filtering.
--all-tenants Allows the admin user to list all images irrespective of the image's owner or is_public value.

glance image-show command

usage: glance image-show [--human-readable] <IMAGE>

Describe a specific image.

Positional arguments

Command Description
<IMAGE> Name or ID of image to describe.

Optional arguments

Command Description
--human-readable Print image size in a human-friendly format.

glance member-create command

usage: glance member-create [--can-share] <IMAGE> <TENANT_ID>

Share a specific image with a tenant.

Positional arguments

Command Description
<IMAGE> Image to add member to.
<TENANT_ID> Tenant to add as member

Optional arguments

Command Description
--can-share Allow the specified tenant to share this image.

glance member-delete command

usage: glance member-delete <IMAGE> <TENANT_ID>

Remove a shared image from a tenant.

Positional arguments

Command Description
<IMAGE> Image from which to remove member
<TENANT_ID> Tenant to remove as member

glance member-list command

usage: glance member-list [--image-id <IMAGE_ID>] [--tenant-id <TENANT_ID>]

Describe sharing permissions by image or tenant.

Optional arguments

Command Description
--image-id <IMAGE_ID> Filter results by an image ID.
--tenant-id <TENANT_ID> Filter results by a tenant ID.
  • AURO
  • Latest News

AURO Cloud Computing expands support to include Managed Amazon Web Services infrastructure

Canadian Cloud Leader AURO adds Managed AWS services to provide a hyper cloud solution compliant with Canadian data privacy laws. These offerings allows customers to receive a customized AWS support solution, fulfilling both their infrastructure requirements and business goals.

  • Download
  • Free Whitepapers

Get the guides, facts, reports, and diagrams you need.

Download Now

See more resources

  • Get in Touch
  • 1.855.226.4678

Call Free anytime:

MORE CONTACT OPTIONS