Class UpdateImageOptions

  • All Implemented Interfaces:
    HttpRequestOptions
    Direct Known Subclasses:
    CreateImageOptions

    public class UpdateImageOptions
    extends BaseHttpRequestOptions

    Usage The recommended way to instantiate a UpdateImageOptions object is to statically import UpdateImageOptions.Builder.* and invoke a static creation method for each option as needed:

    import static org.jclouds.openstack.glance.v1_0.options.UpdateImageOptions.Builder.* // this will adjust the image with id 'id' the name "newName", minimum required disk of 5GB, etc. details = api.update(id, name("newName"), minDisk(5), isPublic(true), property("mykey", "somevalue"));

    See Also:
    • Constructor Detail

      • UpdateImageOptions

        public UpdateImageOptions()
    • Method Detail

      • storeType

        public UpdateImageOptions storeType​(StoreType storeType)
        When present, Glance will attempt to store the disk image data in the backing store indicated by the value of the header. If the Glance node does not support the backing store, Glance will return a 400 Bad Request.
      • size

        public UpdateImageOptions size​(long size)
        When present, Glance assumes that the expected size of the request body will be the value of this header. If the length in bytes of the request body does not match the value of this header, Glance will return a 400 Bad Request.
      • checksum

        public UpdateImageOptions checksum​(String checksum)
        MD5 checksum of the image

        When present, Glance will verify the checksum generated from the backend store when storing your image against this value and return a 400 Bad Request if the values do not match.

      • isPublic

        public UpdateImageOptions isPublic​(boolean isPublic)
        Mark the image as public, meaning that any user may view its metadata and may read the disk image from Glance.
      • isProtected

        public UpdateImageOptions isProtected​(boolean isProtected)
        Mark the image as protected - if set to true the image cannot be deleted till it is unset.
      • minRam

        public UpdateImageOptions minRam​(long ram)
        The expected minimum ram required in megabytes to run this image on a server (default 0).
      • minDisk

        public UpdateImageOptions minDisk​(long disk)
        The expected minimum disk required in gigabytes to run this image on a server (default 0).
      • owner

        public UpdateImageOptions owner​(String owner)
        Glance normally sets the owner of an image to be the tenant or user (depending on the “owner_is_tenant” configuration option) of the authenticated user issuing the request. However, if the authenticated user has the Admin role, this default may be overridden by setting this header to null or to a string identifying the owner of the image.