Class GenericISCSIPlugin
- java.lang.Object
-
- com.abiquo.ssm.plugin.iscsi.GenericISCSIPlugin
-
- All Implemented Interfaces:
com.abiquo.commons.plugin.Pluggable,Storage<Device>,Closeable,AutoCloseable
@PluginMetadata(type="GENERIC_ISCSI", friendlyName="generic iSCSI storage", version="4.0.0", supportedVersions="4.0.0") public class GenericISCSIPlugin extends Object implements Storage<Device>Simulates a Storage plugin to provide generic iSCSI storage functionallity.This plugin cannot not be used to create or manage volumes. It is only present to provide the common storage behavior for the generic iSCSI feature.
Volumes will be manually created in the target storage pool and Abiquo will only assign them to the mock pool that is returned by the plugin.
- Author:
- Ignasi Barrera
-
-
Field Summary
Fields Modifier and Type Field Description static StringMOCK_POOL_NAMEstatic StringPLUGIN_TYPEstatic LongPOOL_SIZE
-
Constructor Summary
Constructors Constructor Description GenericISCSIPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VolumecreateVolume(Device device, String poolProviderId, Volume volume)Creates a new volume.voiddeleteVolume(Device device, String poolProviderId, String uuid)Deletes the given volume.StringgetConstraint(String key)PoolgetPool(Device device, String poolName)Get the information of the given pool.VolumegetVolume(Device device, String poolProviderId, String uuid)Gets the information of the given volume.AddressgrantAccess(Device device, String poolProviderId, String volumeUuid, ClientDetails clientDetails)Allow the provided client to access the given volume.List<Pool>listPools(Device device)Get all the pools defined in the given device.List<Volume>listVolumes(Device device, String poolProviderId)Gets all the volumes in the given pool.List<Volume>listVolumesAllTiers(Device device)Gets all the volumes from all tiers.VolumeresizeVolume(Device device, String poolProviderId, Volume volume)Updates an existing volume.voidrevokeAccess(Device device, String poolProviderId, String volumeUuid, ClientDetails clientDetails)Deny access for the provided client to the given volume.voidvalidateConfiguration()
-
-
-
Field Detail
-
PLUGIN_TYPE
public static final String PLUGIN_TYPE
- See Also:
- Constant Field Values
-
MOCK_POOL_NAME
public static String MOCK_POOL_NAME
-
POOL_SIZE
public static final Long POOL_SIZE
-
-
Method Detail
-
getConstraint
public String getConstraint(String key)
- Specified by:
getConstraintin interfacecom.abiquo.commons.plugin.Pluggable
-
validateConfiguration
public void validateConfiguration() throws IllegalStateException- Specified by:
validateConfigurationin interfacecom.abiquo.commons.plugin.Pluggable- Throws:
IllegalStateException
-
getPool
public Pool getPool(Device device, String poolName) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageGet the information of the given pool.The storage pools are the containers for the volumes that will be created by Abiquo.
- Specified by:
getPoolin interfaceStorage<Device>- Parameters:
device- The storage device where to find the pool.poolName- 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.
-
listPools
public List<Pool> listPools(Device device) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageGet all the pools defined in the given device.The storage pools are the containers for the volumes that will be created by Abiquo.
-
createVolume
@UnsupportedOperation public Volume createVolume(Device device, String poolProviderId, Volume volume) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageCreates a new volume.Volumes are block devices that will be attached to the virtual machines.
- Specified by:
createVolumein interfaceStorage<Device>- 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.
-
resizeVolume
@UnsupportedOperation public Volume resizeVolume(Device device, String poolProviderId, Volume volume) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageUpdates an existing volume.Volumes are block devices that will be attached to the virtual machines.
- Specified by:
resizeVolumein interfaceStorage<Device>- 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.
-
deleteVolume
@UnsupportedOperation public void deleteVolume(Device device, String poolProviderId, String uuid) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageDeletes the given volume.Volumes are block devices that will be attached to the virtual machines.
- Specified by:
deleteVolumein interfaceStorage<Device>- 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.
-
listVolumes
@UnsupportedOperation public List<Volume> listVolumes(Device device, String poolProviderId) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageGets all the volumes in the given pool.Volumes are block devices that will be attached to the virtual machines.
- Specified by:
listVolumesin interfaceStorage<Device>- 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
@UnsupportedOperation public List<Volume> listVolumesAllTiers(Device device) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageGets all the volumes from all tiers.Volumes are block devices that will be attached to the virtual machines.
- Specified by:
listVolumesAllTiersin interfaceStorage<Device>- 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
@UnsupportedOperation public Volume getVolume(Device device, String poolProviderId, String uuid) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageGets the information of the given volume.Volumes are block devices that will be attached to the virtual machines.
- Specified by:
getVolumein interfaceStorage<Device>- 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.
-
grantAccess
@UnsupportedOperation public Address grantAccess(Device device, String poolProviderId, String volumeUuid, ClientDetails clientDetails) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageAllow 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.
- Specified by:
grantAccessin interfaceStorage<Device>- 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
@UnsupportedOperation public void revokeAccess(Device device, String poolProviderId, String volumeUuid, ClientDetails clientDetails) throws com.abiquo.commons.plugin.exception.HypervisorPluginException
Description copied from interface:StorageDeny access for the provided client to the given volume.This method is used to revoke access for the given iSCSI client.
- Specified by:
revokeAccessin interfaceStorage<Device>- 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.
-
-