Package com.abiquo.ssm.plugin
Interface Storage<C extends com.abiquo.commons.plugin.IConnection>
-
- All Superinterfaces:
AutoCloseable,Closeable,com.abiquo.commons.plugin.Pluggable
- All Known Implementing Classes:
GenericISCSIPlugin
public interface Storage<C extends com.abiquo.commons.plugin.IConnection> extends com.abiquo.commons.plugin.PluggableDefines an storage plugin that performs the operations in the target storage devices.- Author:
- Ignasi Barrera
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VolumecreateVolume(C device, Pool pool, Volume volume)Creates a new volume.voiddeleteVolume(C device, Pool pool, String uuid)Deletes the given volume.PoolgetPool(C device, String poolName)Get the information of the given pool.VolumegetVolume(C device, Pool pool, String uuid)Gets the information of the given volume.AddressgrantAccess(C device, Pool pool, String volumeUuid, ClientDetails clientDetails)Allow the provided client to access the given volume.List<Pool>listPools(C device)Get all the pools defined in the given device.List<Volume>listVolumes(C device, Pool pool)Gets all the volumes in the given pool.VolumeresizeVolume(C device, Pool pool, Volume volume)Updates an existing volume.voidrevokeAccess(C device, Pool pool, String volumeUuid, ClientDetails clientDetails)Deny access for the provided client to the given volume.
-
-
-
Method Detail
-
listPools
List<Pool> listPools(C device) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Get all the pools defined in the given device.The storage pools are the containers for the volumes that will be created by Abiquo.
- Parameters:
device- The storage device where to find the pools.- Returns:
- The pools defined in the given device.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the pools can not be enumerated.
-
getPool
Pool getPool(C device, String poolName) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Get the information of the given pool.The storage pools are the containers for the volumes that will be created by Abiquo.
- Parameters:
device- The storage device where to find the pool.poolName- The name of the pool to retrieve.- Returns:
- The requested pool.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the requested pool cannot be retrieved.
-
listVolumes
List<Volume> listVolumes(C device, Pool pool) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Gets all the volumes in the given pool.Volumes are block devices that will be attached to the virtual machines.
- Parameters:
device- The device where the volumes are.pool- The pool where the volumes are.- Returns:
- The list of volumes in the pool.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the volumes can not be enumerated.
-
getVolume
Volume getVolume(C device, Pool pool, String uuid) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Gets the information of the given volume.Volumes are block devices that will be attached to the virtual machines.
- Parameters:
device- The device where the volumes is.pool- The pool where the volume is.uuid- The uuid of the volume to retrieve.- Returns:
- The information of the given volume.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the requested volume can not be retrieved.
-
createVolume
Volume createVolume(C device, Pool pool, Volume volume) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Creates a new volume.Volumes are block devices that will be attached to the virtual machines.
- Parameters:
device- The device where the volumes will be created.pool- The pool where the volume will be created.volume- The volume information.- Returns:
- The information of the created volume.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the volume cannot be created.
-
deleteVolume
void deleteVolume(C device, Pool pool, String uuid) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Deletes the given volume.Volumes are block devices that will be attached to the virtual machines.
- Parameters:
device- The device where the volumes is.pool- The pool where the volume is.uuid- The uuid of the volume to delete.- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the volume cannot be deleted.
-
resizeVolume
Volume resizeVolume(C device, Pool pool, Volume volume) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Updates an existing volume.Volumes are block devices that will be attached to the virtual machines.
- Parameters:
device- The device where the volumes is.pool- The pool where the volume is.volume- The new volume information.- Returns:
- The updated volume.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the volume cannot be modified.
-
grantAccess
Address grantAccess(C device, Pool pool, String volumeUuid, ClientDetails clientDetails) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Allow the provided client to access the given volume.This method is used to grant access to the given client to the volume identified by the given UUID.
- Parameters:
device- The device where the volumes is.pool- The pool where the volume is.volumeUuid- The uuid of the volume.clientDetails- The details of the client accessing the volume.- Returns:
- The address where the provided client initiator can reach the volume.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the access to the volume cannot be granted.
-
revokeAccess
void revokeAccess(C device, Pool pool, String volumeUuid, ClientDetails clientDetails) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Deny access for the provided client to the given volume.This method is used to revoke access for the given iSCSI client.
- Parameters:
device- The device where the volumes is.pool- The pool where the volume is.volumeUuid- The uuid of the volume.clientDetails- The details of the client accessing the volume.- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the access to the volume cannot be granted.
-
-