Class UpdateImageOptions
- java.lang.Object
-
- org.jclouds.http.options.BaseHttpRequestOptions
-
- org.jclouds.openstack.glance.v1_0.options.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"));
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UpdateImageOptions.Builder
-
Field Summary
-
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
-
Constructor Summary
Constructors Constructor Description UpdateImageOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateImageOptions
checksum(String checksum)
MD5 checksum of the imageUpdateImageOptions
containerFormat(ContainerFormat containerFormat)
UpdateImageOptions
diskFormat(DiskFormat diskFormat)
UpdateImageOptions
isProtected(boolean isProtected)
Mark the image as protected - if set to true the image cannot be deleted till it is unset.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.UpdateImageOptions
location(String location)
UpdateImageOptions
minDisk(long disk)
The expected minimum disk required in gigabytes to run this image on a server (default 0).UpdateImageOptions
minRam(long ram)
The expected minimum ram required in megabytes to run this image on a server (default 0).UpdateImageOptions
name(String name)
Adjust the name of the imageUpdateImageOptions
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.UpdateImageOptions
property(String key, String value)
Custom, free-form image properties stored with the image.UpdateImageOptions
size(long size)
When present, Glance assumes that the expected size of the request body will be the value of this header.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.-
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildPathSuffix, buildQueryParameters, buildRequestHeaders, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstQueryOrNull, hashCode, replaceHeader, toString
-
-
-
-
Method Detail
-
name
public UpdateImageOptions name(String name)
Adjust the name of the image
-
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.
-
diskFormat
public UpdateImageOptions diskFormat(DiskFormat diskFormat)
-
containerFormat
public UpdateImageOptions containerFormat(ContainerFormat containerFormat)
-
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.
-
location
public UpdateImageOptions location(String location)
-
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.
-
property
public UpdateImageOptions property(String key, String value)
Custom, free-form image properties stored with the image.
-
-