@Consumes(value="application/json")
@Path(value="/images")
public interface ImageApi
Modifier and Type | Method and Description |
---|---|
ImageDetails |
create(String name,
Payload payload,
CreateImageOptions... options)
Creates a new image
|
boolean |
delete(String id)
Deletes the image with the specified id
|
ImageDetails |
get(String id)
Returns metadata about an image with id
|
InputStream |
getAsStream(String id)
Returns image data for image with id
|
PagedIterable<Image> |
list()
Lists all images (IDs, names, links)
|
PaginatedCollection<Image> |
list(ListImageOptions options) |
PagedIterable<ImageDetails> |
listInDetail()
Lists all images (all details)
|
PaginatedCollection<ImageDetails> |
listInDetail(ListImageOptions options) |
ImageDetails |
reserve(String name,
CreateImageOptions... options)
Reserves a new image to be uploaded later
|
ImageDetails |
update(String id,
UpdateImageOptions... options)
Adjusts the metadata stored for an existing image
|
ImageDetails |
upload(String id,
Payload imageData,
UpdateImageOptions... options)
Uploads image data for a previously-reserved image
If an image was previously reserved, and thus is in the queued state, then image data can be added using this method. |
@Named(value="image:list") @GET PagedIterable<Image> list()
@Named(value="image:list") @GET PaginatedCollection<Image> list(ListImageOptions options)
@Named(value="image:listInDetail") @GET @Path(value="/detail") PagedIterable<ImageDetails> listInDetail()
@Named(value="image:listInDetail") @GET @Path(value="/detail") PaginatedCollection<ImageDetails> listInDetail(ListImageOptions options)
@Named(value="image:get") @HEAD @Path(value="/{id}") @Nullable ImageDetails get(@PathParam(value="id") String id)
@Named(value="image:getAsStream") @GET @Path(value="/{id}") @Nullable InputStream getAsStream(@PathParam(value="id") String id)
@Named(value="image:create") @POST @Produces(value="application/octet-stream") ImageDetails create(@HeaderParam(value="x-image-meta-name") String name, Payload payload, CreateImageOptions... options)
@Named(value="image:reserve") @POST ImageDetails reserve(@HeaderParam(value="x-image-meta-name") String name, CreateImageOptions... options)
upload(java.lang.String, org.jclouds.io.Payload, org.jclouds.openstack.glance.v1_0.options.UpdateImageOptions...)
@Named(value="image:upload") @PUT @Path(value="/{id}") @Produces(value="application/octet-stream") ImageDetails upload(@PathParam(value="id") String id, Payload imageData, UpdateImageOptions... options)
If an image was previously reserved, and thus is in the queued state, then image data can be added using this method. If the image already as data associated with it (e.g. not in the queued state), then you will receive a 409 Conflict exception.
imageData
- the new image to uploadoptions
- can be used to adjust the metadata stored for the image in the
same callreserve(java.lang.String, org.jclouds.openstack.glance.v1_0.options.CreateImageOptions...)
@Named(value="image:update") @PUT @Path(value="/{id}") ImageDetails update(@PathParam(value="id") String id, UpdateImageOptions... options)
@Named(value="image:delete") @DELETE @Path(value="/{id}") boolean delete(@PathParam(value="id") String id)
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.