Interface ImageApi
-
@Consumes("application/json") @Path("/images") public interface ImageApiImage Services for the OpenStack Image (Glance) v1 API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImageDetailscreate(String name, Payload payload, CreateImageOptions... options)Creates a new imagebooleandelete(String id)Deletes the image with the specified idImageDetailsget(String id)Returns metadata about an image with idInputStreamgetAsStream(String id)Returns image data for image with idPagedIterable<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)ImageDetailsreserve(String name, CreateImageOptions... options)Reserves a new image to be uploaded laterImageDetailsupdate(String id, UpdateImageOptions... options)Adjusts the metadata stored for an existing imageImageDetailsupload(String id, Payload imageData, UpdateImageOptions... options)Uploads image data for a previously-reserved image
-
-
-
Method Detail
-
list
@Named("image:list") @GET PagedIterable<Image> list()Lists all images (IDs, names, links)- Returns:
- all images (IDs, names, links)
-
list
@Named("image:list") @GET PaginatedCollection<Image> list(ListImageOptions options)
-
listInDetail
@Named("image:listInDetail") @GET @Path("/detail") PagedIterable<ImageDetails> listInDetail()Lists all images (all details)- Returns:
- all images (all details)
-
listInDetail
@Named("image:listInDetail") @GET @Path("/detail") PaginatedCollection<ImageDetails> listInDetail(ListImageOptions options)
-
get
@Named("image:get") @HEAD @Path("/{id}") @Nullable ImageDetails get(@PathParam("id") String id)Returns metadata about an image with id
-
getAsStream
@Named("image:getAsStream") @GET @Path("/{id}") @Nullable InputStream getAsStream(@PathParam("id") String id)Returns image data for image with id
-
create
@Named("image:create") @POST @Produces("application/octet-stream") ImageDetails create(@HeaderParam("x-image-meta-name") String name, Payload payload, CreateImageOptions... options)Creates a new image- Returns:
- detailed metadata about the newly stored image
-
reserve
@Named("image:reserve") @POST ImageDetails reserve(@HeaderParam("x-image-meta-name") String name, CreateImageOptions... options)Reserves a new image to be uploaded later- Returns:
- detailed metadata about the newly stored image
- See Also:
upload(java.lang.String, org.jclouds.io.Payload, org.jclouds.openstack.glance.v1_0.options.UpdateImageOptions...)
-
upload
@Named("image:upload") @PUT @Path("/{id}") @Produces("application/octet-stream") ImageDetails upload(@PathParam("id") 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. If the image already as data associated with it (e.g. not in the queued state), then you will receive a 409 Conflict exception.- Parameters:
imageData- the new image to uploadoptions- can be used to adjust the metadata stored for the image in the same call- Returns:
- detailed metadata about the updated image
- See Also:
reserve(java.lang.String, org.jclouds.openstack.glance.v1_0.options.CreateImageOptions...)
-
update
@Named("image:update") @PUT @Path("/{id}") ImageDetails update(@PathParam("id") String id, UpdateImageOptions... options)Adjusts the metadata stored for an existing image- Returns:
- detailed metadata about the updated image
-
delete
@Named("image:delete") @DELETE @Path("/{id}") boolean delete(@PathParam("id") String id)Deletes the image with the specified id- Returns:
- true if successful
-
-