org.dasein.cloud.vcloud.compute
Class DiskSupport

java.lang.Object
  extended by org.dasein.cloud.vcloud.compute.DiskSupport
All Implemented Interfaces:
AccessControlledService, VolumeSupport

public class DiskSupport
extends Object
implements VolumeSupport

Implements support for disks in vCloud 5.1 and beyond.

Created by George Reese: 2/10/13 12:10 PM

Author:
George Reese

Field Summary
 
Fields inherited from interface org.dasein.cloud.compute.VolumeSupport
ANY, ATTACH, CREATE_VOLUME, DETACH, GET_VOLUME, LIST_VOLUME, REMOVE_VOLUME
 
Method Summary
 void attach(String volumeId, String toServer, String deviceId)
           
 String create(String fromSnapshot, int sizeInGb, String inZone)
           
 String createVolume(VolumeCreateOptions options)
           
 void detach(String volumeId)
           
 void detach(String volumeId, boolean force)
           
protected  ProviderContext getContext()
           
 int getMaximumVolumeCount()
           
 Storage<Gigabyte> getMaximumVolumeSize()
           
 Storage<Gigabyte> getMinimumVolumeSize()
           
protected  CloudProvider getProvider()
           
 String getProviderTermForVolume(Locale locale)
           
 Volume getVolume(String volumeId)
           
 Requirement getVolumeProductRequirement()
           
 boolean isSubscribed()
           
 boolean isVolumeSizeDeterminedByProduct()
           
 Iterable<String> listPossibleDeviceIds(Platform platform)
           
 Iterable<VolumeFormat> listSupportedFormats()
           
 Iterable<VolumeProduct> listVolumeProducts()
           
 Iterable<Volume> listVolumes()
           
 Iterable<ResourceStatus> listVolumeStatus()
           
 String[] mapServiceAction(ServiceAction action)
           
 void remove(String volumeId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContext

@Nonnull
protected ProviderContext getContext()
                              throws CloudException
Throws:
CloudException

getProvider

@Nonnull
protected final CloudProvider getProvider()

attach

public void attach(@Nonnull
                   String volumeId,
                   @Nonnull
                   String toServer,
                   @Nonnull
                   String deviceId)
            throws InternalException,
                   CloudException
Specified by:
attach in interface VolumeSupport
Throws:
InternalException
CloudException

create

@Nonnull
public String create(@Nullable
                             String fromSnapshot,
                             @Nonnegative
                             int sizeInGb,
                             @Nonnull
                             String inZone)
              throws InternalException,
                     CloudException
Specified by:
create in interface VolumeSupport
Throws:
InternalException
CloudException

createVolume

@Nonnull
public String createVolume(@Nonnull
                                   VolumeCreateOptions options)
                    throws InternalException,
                           CloudException
Specified by:
createVolume in interface VolumeSupport
Throws:
InternalException
CloudException

detach

public void detach(@Nonnull
                   String volumeId)
            throws InternalException,
                   CloudException
Specified by:
detach in interface VolumeSupport
Throws:
InternalException
CloudException

detach

public void detach(@Nonnull
                   String volumeId,
                   boolean force)
            throws InternalException,
                   CloudException
Specified by:
detach in interface VolumeSupport
Throws:
InternalException
CloudException

getMaximumVolumeCount

public int getMaximumVolumeCount()
                          throws InternalException,
                                 CloudException
Specified by:
getMaximumVolumeCount in interface VolumeSupport
Throws:
InternalException
CloudException

getMaximumVolumeSize

public Storage<Gigabyte> getMaximumVolumeSize()
                                       throws InternalException,
                                              CloudException
Specified by:
getMaximumVolumeSize in interface VolumeSupport
Throws:
InternalException
CloudException

getMinimumVolumeSize

@Nonnull
public Storage<Gigabyte> getMinimumVolumeSize()
                                       throws InternalException,
                                              CloudException
Specified by:
getMinimumVolumeSize in interface VolumeSupport
Throws:
InternalException
CloudException

getProviderTermForVolume

@Nonnull
public String getProviderTermForVolume(@Nonnull
                                               Locale locale)
Specified by:
getProviderTermForVolume in interface VolumeSupport

getVolume

public Volume getVolume(@Nonnull
                        String volumeId)
                 throws InternalException,
                        CloudException
Specified by:
getVolume in interface VolumeSupport
Throws:
InternalException
CloudException

getVolumeProductRequirement

@Nonnull
public Requirement getVolumeProductRequirement()
                                        throws InternalException,
                                               CloudException
Specified by:
getVolumeProductRequirement in interface VolumeSupport
Throws:
InternalException
CloudException

isVolumeSizeDeterminedByProduct

public boolean isVolumeSizeDeterminedByProduct()
                                        throws InternalException,
                                               CloudException
Specified by:
isVolumeSizeDeterminedByProduct in interface VolumeSupport
Throws:
InternalException
CloudException

listPossibleDeviceIds

@Nonnull
public Iterable<String> listPossibleDeviceIds(@Nonnull
                                                      Platform platform)
                                       throws InternalException,
                                              CloudException
Specified by:
listPossibleDeviceIds in interface VolumeSupport
Throws:
InternalException
CloudException

listSupportedFormats

@Nonnull
public Iterable<VolumeFormat> listSupportedFormats()
                                            throws InternalException,
                                                   CloudException
Specified by:
listSupportedFormats in interface VolumeSupport
Throws:
InternalException
CloudException

listVolumeProducts

@Nonnull
public Iterable<VolumeProduct> listVolumeProducts()
                                           throws InternalException,
                                                  CloudException
Specified by:
listVolumeProducts in interface VolumeSupport
Throws:
InternalException
CloudException

listVolumeStatus

@Nonnull
public Iterable<ResourceStatus> listVolumeStatus()
                                          throws CloudException,
                                                 InternalException
Specified by:
listVolumeStatus in interface VolumeSupport
Throws:
CloudException
InternalException

listVolumes

@Nonnull
public Iterable<Volume> listVolumes()
                             throws InternalException,
                                    CloudException
Specified by:
listVolumes in interface VolumeSupport
Throws:
InternalException
CloudException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Specified by:
isSubscribed in interface VolumeSupport
Throws:
CloudException
InternalException

remove

public void remove(@Nonnull
                   String volumeId)
            throws InternalException,
                   CloudException
Specified by:
remove in interface VolumeSupport
Throws:
InternalException
CloudException

mapServiceAction

@Nonnull
public String[] mapServiceAction(@Nonnull
                                         ServiceAction action)
Specified by:
mapServiceAction in interface AccessControlledService


Copyright © 2013 enStratus Networks Inc. All Rights Reserved.