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, String poolProviderId, Volume volume)Creates a new volume.voiddeleteVolume(C device, String poolProviderId, String uuid)Deletes the given volume.PoolgetPool(C device, String poolProviderId)Get the information of the given pool.VolumegetVolume(C device, String poolProviderId, String uuid)Gets the information of the given volume.AddressgrantAccess(C device, String poolProviderId, 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, String poolProviderId)Gets all the volumes in the given pool.List<Volume>listVolumesAllTiers(C device)Gets all the volumes from all tiers.VolumeresizeVolume(C device, String poolProviderId, Volume volume)Updates an existing volume.voidrevokeAccess(C device, String poolProviderId, 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 poolProviderId) 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.poolProviderId- The provider identifier of the pool where the volume is.- Returns:
- The requested pool.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the requested pool cannot be retrieved.
-
listVolumes
List<Volume> listVolumes(C device, String poolProviderId) 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.poolProviderId- The provider identifier of the pool where the volume is.- Returns:
- The list of volumes in the pool.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the volumes can not be enumerated.
-
listVolumesAllTiers
List<Volume> listVolumesAllTiers(C device) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Gets all the volumes from all tiers.Volumes are block devices that will be attached to the virtual machines.
- Parameters:
device- The device where the volumes are.- Returns:
- The list of volumes in all the polls.
- Throws:
com.abiquo.commons.plugin.exception.HypervisorPluginException- If the volumes can not be enumerated.
-
getVolume
Volume getVolume(C device, String poolProviderId, 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.poolProviderId- The provider identifier of 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, String poolProviderId, 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.poolProviderId- The provider identifier of the pool where the volume is.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, String poolProviderId, 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.poolProviderId- The provider identifier of 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, String poolProviderId, 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.poolProviderId- The provider identifier of 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, String poolProviderId, 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.poolProviderId- The provider identifier of 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, String poolProviderId, 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.poolProviderId- The provider identifier of 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.
-
-