org.jclouds.openstack.nova.v2_0.extensions
Interface VolumeTypeApi


@Beta
public interface VolumeTypeApi

Provides access to the OpenStack Compute (Nova) Volume Type extension API.

See Also:
VolumeApi

Method Summary
 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()
           
 boolean updateExtraSpec(String id, String key, String value)
          Creates or updates a single extra spec value
 boolean updateExtraSpecs(String id, Map<String,String> specs)
          Creates or updates the extra metadata for a given flavor
 

Method Detail

list

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

get

@Named(value="volumeType:get")
@Nullable
VolumeType get(String id)
Gets a volume type

Parameters:
id - the id of the volume type to retrieve
Returns:
the requested volume type

create

@Named(value="volumeType:create")
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(value="volumeType:delete")
boolean delete(String id)
Deletes a volume type

Parameters:
id - the id of the volume type to delete

getExtraSpecs

@Named(value="volumeType:getExtraSpecs")
Map<String,String> getExtraSpecs(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(value="volumeType:updateExtraSpecs")
boolean updateExtraSpecs(String id,
                               Map<String,String> specs)
Creates or updates the extra metadata for a given flavor


getExtraSpec

@Named(value="volumeType:getExtraSpec")
@Nullable
String getExtraSpec(String id,
                                   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(value="volumeType:updateExtraSpec")
boolean updateExtraSpec(String id,
                              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(value="volumeType:deleteExtraSpec")
boolean deleteExtraSpec(String id,
                              String key)
Deletes an existing extra spec

Parameters:
id - the id of the volume type
key - the key of the extra spec to delete


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.