org.jclouds.cloudstack.features
Interface VolumeClient


public interface VolumeClient

Provides synchronous access to CloudStack Event features.

Author:
Vijay Kiran
See Also:

Method Summary
 AsyncCreateResponse attachVolume(long volumeId, long virtualMachineId)
          Attaches a disk volume to a virtual machine.
 AsyncCreateResponse createVolumeFromDiskOfferingInZone(String name, long diskOfferingId, long zoneId)
          Create a volume with given name and diskOfferingId
 AsyncCreateResponse createVolumeFromSnapshotInZone(String name, long snapshotId, long zoneId)
          Create a volume with given name and snapshotId
 void deleteVolume(long id)
          Deletes a attached disk volume
 AsyncCreateResponse detachVolume(long volumeId)
          Detaches a disk volume to a virtual machine.
 Volume getVolume(long id)
          Get volume by id
 Set<Volume> listVolumes(ListVolumesOptions... options)
          List volumes
 

Method Detail

createVolumeFromDiskOfferingInZone

AsyncCreateResponse createVolumeFromDiskOfferingInZone(String name,
                                                       long diskOfferingId,
                                                       long zoneId)
Create a volume with given name and diskOfferingId

Parameters:
name - name of the volume
diskOfferingId - the ID of the disk offering.
zoneId - the ID of the availability zone
Returns:
AsyncCreateResponse job response used to track creation

createVolumeFromSnapshotInZone

AsyncCreateResponse createVolumeFromSnapshotInZone(String name,
                                                   long snapshotId,
                                                   long zoneId)
Create a volume with given name and snapshotId

Parameters:
name - name of the volume
snapshotId - Snapshot id to be used while creating the volume
zoneId - the ID of the availability zone
Returns:
AsyncCreateResponse job response used to track creation

listVolumes

Set<Volume> listVolumes(ListVolumesOptions... options)
List volumes

Returns:
volume list, empty if not found

getVolume

Volume getVolume(long id)
Get volume by id

Parameters:
id - the volume id to retrieve
Returns:
volume or null if not found

deleteVolume

void deleteVolume(long id)
Deletes a attached disk volume

Parameters:
id - id of the volume

attachVolume

AsyncCreateResponse attachVolume(long volumeId,
                                 long virtualMachineId)
Attaches a disk volume to a virtual machine.

Parameters:
volumeId - the ID of the disk volume
virtualMachineId - the ID of the virtual machine
Returns:
AsyncCreateResponse job response used to track creation

detachVolume

AsyncCreateResponse detachVolume(long volumeId)
Detaches a disk volume to a virtual machine.

Parameters:
volumeId - the ID of the disk volume
Returns:
AsyncCreateResponse job response used to track creation


Copyright © 2009-2012 jclouds. All Rights Reserved.