Interface VolumeTypeApi


@Beta @Consumes("application/json") @Path("/os-volume-types") public interface VolumeTypeApi
Provides access to the OpenStack Compute (Nova) Volume Type extension API. This extension is no longer supported in OpenStack Liberty. You can use the Block Storage API and endpoint to list volume types, see volume types v2.
See Also:
  • Method Details

    • list

      @Named("volumeType:list") @GET com.google.common.collect.FluentIterable<VolumeType> list()
      Returns:
      set of all volume types
    • get

      @Named("volumeType:get") @GET @Path("/{id}") @Nullable VolumeType get(@PathParam("id") String id)
      Gets a volume type
      Parameters:
      id - the id of the volume type to retrieve
      Returns:
      the requested volume type
    • create

      @Named("volumeType:create") @POST @Produces("application/json") VolumeType create(String name, CreateVolumeTypeOptions... options)
      Creates a new volume type
      Parameters:
      name - the name of the new volume type
      options - optional settings for the new volume type
      Returns:
      the new volume type
    • delete

      @Named("volumeType:delete") @DELETE @Path("/{id}") boolean delete(@PathParam("id") String id)
      Deletes a volume type
      Parameters:
      id - the id of the volume type to delete
    • getExtraSpecs

      @Named("volumeType:getExtraSpecs") @GET @Path("/{id}/extra_specs") Map<String,String> getExtraSpecs(@PathParam("id") String id)
      Gets the extra specs for a volume type
      Parameters:
      id - the id of the volume type
      Returns:
      the set of extra metadata for the flavor
    • updateExtraSpecs

      @Named("volumeType:updateExtraSpecs") @POST @Path("/{id}/extra_specs") @Produces("application/json") void updateExtraSpecs(@PathParam("id") String id, Map<String,String> specs)
      Creates or updates the extra metadata for a given flavor
    • getExtraSpec

      @Named("volumeType:getExtraSpec") @GET @Path("/{id}/extra_specs/{key}") @Nullable String getExtraSpec(@PathParam("id") String id, @PathParam("key") String key)
      Retrieve a single extra spec value
      Parameters:
      id - the id of the volume type
      key - the key of the extra spec item to retrieve
    • updateExtraSpec

      @Named("volumeType:updateExtraSpec") @PUT @Path("/{id}/extra_specs/{key}") @Produces("application/json") void updateExtraSpec(@PathParam("id") String id, @PathParam("key") String key, String value)
      Creates or updates a single extra spec value
      Parameters:
      id - the id of the volume type
      key - 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
    • deleteExtraSpec

      @Named("volumeType:deleteExtraSpec") @DELETE @Path("/{id}/extra_specs/{key}") boolean deleteExtraSpec(@PathParam("id") String id, @PathParam("key") String key)
      Deletes an existing extra spec
      Parameters:
      id - the id of the volume type
      key - the key of the extra spec to delete