@Beta
@Consumes(value="application/json")
@Path(value="/os-volume-types")
public interface VolumeTypeApi
VolumeApi
Modifier and Type | Method and Description |
---|---|
VolumeType |
create(String name,
CreateVolumeTypeOptions... options)
Creates a new volume type
|
boolean |
delete(String id)
Deletes a volume type
|
boolean |
deleteExtraSpec(String id,
String key)
Deletes an existing extra spec
|
VolumeType |
get(String id)
Gets a volume type
|
String |
getExtraSpec(String id,
String key)
Retrieve a single extra spec value
|
Map<String,String> |
getExtraSpecs(String id)
Gets the extra specs for a volume type
|
com.google.common.collect.FluentIterable<VolumeType> |
list() |
void |
updateExtraSpec(String id,
String key,
String value)
Creates or updates a single extra spec value
|
void |
updateExtraSpecs(String id,
Map<String,String> specs)
Creates or updates the extra metadata for a given flavor
|
@Named(value="volumeType:list") @GET com.google.common.collect.FluentIterable<VolumeType> list()
@Named(value="volumeType:get") @GET @Path(value="/{id}") @Nullable VolumeType get(@PathParam(value="id") String id)
id
- the id of the volume type to retrieve@Named(value="volumeType:create") @POST @Produces(value="application/json") VolumeType create(String name, CreateVolumeTypeOptions... options)
name
- the name of the new volume typeoptions
- optional settings for the new volume type@Named(value="volumeType:delete") @DELETE @Path(value="/{id}") boolean delete(@PathParam(value="id") String id)
id
- the id of the volume type to delete@Named(value="volumeType:getExtraSpecs") @GET @Path(value="/{id}/extra_specs") Map<String,String> getExtraSpecs(@PathParam(value="id") String id)
id
- the id of the volume type@Named(value="volumeType:updateExtraSpecs") @POST @Path(value="/{id}/extra_specs") @Produces(value="application/json") void updateExtraSpecs(@PathParam(value="id") String id, Map<String,String> specs)
@Named(value="volumeType:getExtraSpec") @GET @Path(value="/{id}/extra_specs/{key}") @Nullable String getExtraSpec(@PathParam(value="id") String id, @PathParam(value="key") String key)
id
- the id of the volume typekey
- the key of the extra spec item to retrieve@Named(value="volumeType:updateExtraSpec") @PUT @Path(value="/{id}/extra_specs/{key}") @Produces(value="application/json") void updateExtraSpec(@PathParam(value="id") String id, @PathParam(value="key") String key, String value)
id
- the id of the volume typekey
- the extra spec key (when creating ensure this does not include whitespace or other difficult characters)value
- the new value to store associate with the key@Named(value="volumeType:deleteExtraSpec") @DELETE @Path(value="/{id}/extra_specs/{key}") boolean deleteExtraSpec(@PathParam(value="id") String id, @PathParam(value="key") String key)
id
- the id of the volume typekey
- the key of the extra spec to deleteCopyright © 2009–2021 The Apache Software Foundation. All rights reserved.