Ask Your Question

Revision history [back]

Why not just use Glance CLI this guide may assist http://docs.openstack.org/image-guide/content/image-metadata.html

# glance help image-update
usage: glance image-update [--name <NAME>] [--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>] [--purge-props]
                           [--human-readable] [--progress]
                           <IMAGE>

Update a specific image.

Positional arguments:
  <IMAGE>               Name or ID of image to modify.

Optional arguments:
  --name <NAME>         Name of image.
  --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).
  --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+http://tenant%3Aaccount:key@auth_
                        url/v2.0/container/obj'. (Note: '%3A' is ':' URL
                        encoded.)
  --file <FILE>         Local file that contains disk image to be uploaded
                        during update. Alternatively, images can be passed to
                        the client via stdin.
  --checksum <CHECKSUM>
                        Hash of image data used Glance can use for
                        verification.
  --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.
  --purge-props         If this flag is present, delete all image properties
                        not explicitly set in the update request. Otherwise,
                        those properties not referenced are preserved.
  --human-readable      Print image size in a human-friendly format.
  --progress            Show upload progress bar.