Interface ImageApi
@Consumes("application/json")
@Path("/images")
public interface ImageApi
Provides access to the OpenStack Compute (Nova) Image API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDelete the specified imagevoiddeleteMetadata(String id, String key) Delete a metadata item from an image.List details of the specified imagegetMetadata(String id) List all metadata for an image.getMetadata(String id, String key) Update the metadata for an image.org.jclouds.collect.PagedIterable<Resource>list()List all images (IDs, names, links)list(PaginationOptions options) org.jclouds.collect.PagedIterable<Image>List all images (all details)listInDetail(PaginationOptions options) setMetadata(String id, Map<String, String> metadata) Sets the metadata for an image.updateMetadata(String id, String key, String value) Set a metadata item for an image.updateMetadata(String id, Map<String, String> metadata) Update the metadata for a server.
-
Method Details
-
list
List all images (IDs, names, links)- Returns:
- all images (IDs, names, links)
-
list
-
listInDetail
List all images (all details)- Returns:
- all images (all details)
-
listInDetail
@Named("image:list") @GET @Path("/detail") PaginatedCollection<Image> listInDetail(PaginationOptions options) -
get
List details of the specified image- Parameters:
id- id of the server- Returns:
- server or null if not found
-
delete
Delete the specified image- Parameters:
id- id of the image
-
getMetadata
@Named("image:getMetadata") @GET @Path("/{id}/metadata") Map<String,String> getMetadata(@PathParam("id") String id) List all metadata for an image.- Parameters:
id- id of the image- Returns:
- the metadata as a Map<String, String>
-
setMetadata
@Named("image:setMetadata") @PUT @Path("/{id}/metadata") @Produces("application/json") Map<String,String> setMetadata(@PathParam("id") String id, Map<String, String> metadata) Sets the metadata for an image.- Parameters:
id- id of the imagemetadata- a Map containing the metadata- Returns:
- the metadata as a Map<String, String>
-
updateMetadata
@Named("image:updateMetadata") @POST @Path("/{id}/metadata") @Produces("application/json") Map<String,String> updateMetadata(@PathParam("id") String id, Map<String, String> metadata) Update the metadata for a server.- Parameters:
id- id of the imagemetadata- a Map containing the metadata- Returns:
- the metadata as a Map<String, String>
-
getMetadata
@Named("image:getMetadata") @GET @Path("/{id}/metadata/{key}") @Nullable String getMetadata(@PathParam("id") String id, @PathParam("key") String key) Update the metadata for an image.- Parameters:
id- id of the imagemetadata- a Map containing the metadata- Returns:
- the value or null if not present
-
updateMetadata
@Named("image:updateMetadata") @PUT @Path("/{id}/metadata/{key}") @Nullable String updateMetadata(@PathParam("id") String id, @PathParam("key") String key, @PathParam("value") String value) Set a metadata item for an image.- Parameters:
id- id of the imagekey- the name of the metadata itemvalue- the value of the metadata item- Returns:
- the value you updated
-
deleteMetadata
@Named("image:deleteMetadata") @DELETE @Path("/{id}/metadata/{key}") void deleteMetadata(@PathParam("id") String id, @PathParam("key") String key) Delete a metadata item from an image.- Parameters:
id- id of the imagekey- the name of the metadata item
-