Interface for interacting with the Dell Storage Center array.
Bases: object
HttpClient
Helper for making the REST calls.
Bases: object
LegacyPayloadFilter
Simple class for creating filters for interacting with the Dell Storage API 15.1 and 15.2.
Bases: object
PayloadFilter
Simple class for creating filters for interacting with the Dell Storage API 15.3 and later.
Bases: object
StorageCenterApi
Handles calls to Dell SC and EM via the REST API interface.
1.0.0 - Initial driver 1.1.0 - Added extra spec support for Storage Profile selection 1.2.0 - Added consistency group support. 2.0.0 - Switched to inheriting functional objects rather than volume
driver.
2.1.0 - Added support for ManageableVD. 2.2.0 - Added API 2.2 support. 2.3.0 - Added Legacy Port Mode Support 2.3.1 - Updated error handling. 2.4.0 - Added Replication V2 support. 2.4.1 - Updated Replication support to V2.1. 2.5.0 - ManageableSnapshotsVD implemented.
This just breaks the replication.
If we find the source we just delete the replication. If the source is down then we find the destination and unmap it. Fail pretty much every time this goes south.
Parameters: | volumename – |
---|---|
Returns: |
Logout of Dell REST API.
Creates a volume named volumename from a copy of scvolume.
This is done by creating a replay and then a view volume from that replay. The replay is set to expire after an hour. It is only needed long enough to create the volume. (1 minute should be enough but we set an hour in case the world has gone mad.)
Parameters: |
|
---|---|
Returns: | The new volume’s Dell volume object. |
Takes a snapshot of a volume.
One could snap a volume before it has been activated, so activate by mapping and unmapping to a random server and let them. This should be a fail but the Tempest tests require it.
Parameters: |
|
---|---|
Returns: | The Dell replay object or None. |
Creates a replay profile on the Dell SC.
Parameters: | name – The ID of the consistency group. This will be matched to the name on the Dell SC. |
---|---|
Returns: | SC profile or None. |
Create repl from scvol to destssn.
Parameters: |
|
---|---|
Returns: | Dell SC replication object. |
Creates a Dell server object on the the Storage Center.
Adds the first HBA identified by wwnoriscsiname to it.
Parameters: |
|
---|---|
Returns: | Dell server object. |
Creates a server with multiple WWNS associated with it.
Same as create_server except it can take a list of HBAs.
Parameters: | wwns – A list of FC WWNs or iSCSI IQNs associated with this server. |
---|---|
Returns: | Dell server object. |
Creates a new volume named volname from the screplay.
Parameters: |
|
---|---|
Returns: | Dell volume object or None. |
Creates a new volume on the Storage Center.
It will create it in a folder called self.vfname. If self.vfname does not exist it will create it. If it cannot create it the volume will be created in the root.
Parameters: |
|
---|---|
Returns: | Dell Volume object or None. |
Finds a Dell cg replay by replayid string and expires it.
Once marked for expiration we do not return the replay as a snapshot even though it might still exist. (Backend requirements.)
Parameters: |
|
---|---|
Returns: | Boolean for success or failure. |
Finds a Dell replay by replayid string and expires it.
Once marked for expiration we do not return the replay as a snapshot even though it might still exist. (Backend requirements.)
Parameters: |
|
---|---|
Returns: | Boolean for success or failure. |
Delete the replay profile from the Dell SC.
Parameters: | profile – SC replay profile. |
---|---|
Returns: | Nothing. |
Raises: | VolumeBackendAPIException |
Deletes the SC replication object from scvolume to the destssn.
Parameters: |
|
---|---|
Returns: | True on success. False on fail. |
Deletes the volume from the SC backend array.
If the volume cannot be found we claim success.
Parameters: | name – Name of the volume to search for. This is the cinder volume ID. |
---|---|
Returns: | Boolean indicating success or failure. |
Expands scvolume to newsize GBs.
Parameters: |
|
---|---|
Returns: | The updated Dell volume object on success or None on failure. |
Finds target information for a given Dell scvolume object mapping.
The data coming back is both the preferred path and all the paths.
Parameters: |
|
---|---|
Returns: | iSCSI property dictionary. |
Raises: | VolumeBackendAPIException |
Find our replay destination volume on the destssn.
Parameters: |
|
---|---|
Returns: | SC Volume object or None |
Searches for the replay by replayid.
replayid is stored in the replay’s description attribute.
Parameters: |
|
---|---|
Returns: | Dell replay object or None. |
Finds the Dell SC replay profile object name.
Parameters: | name – Name of the replay profile object. This is the consistency group id. |
---|---|
Returns: | Dell SC replay profile or None. |
Raises: | VolumeBackendAPIException |
Check that the SC is there and being managed by EM.
Returns: | The SC SSN. |
---|---|
Raises: | VolumeBackendAPIException |
Hunts for a server on the Dell backend by instance_name.
The instance_name is the same as the server’s HBA. This is the IQN or WWN listed in the connector. If found, the server the HBA is attached to, if any, is returned.
Parameters: | instance_name – instance_name is a FC WWN or iSCSI IQN from the connector. In cinder a server is identified by its HBA. |
---|---|
Returns: | Dell server object or None. |
Search self.ssn for volume of name.
This searches the folder self.vfname (specified in the cinder.conf) for the volume first. If not found it searches the entire array for the volume.
Remember that in the case of a failover we have already been switched to our new SSN. So the initial searches are valid.
Parameters: | name – Name of the volume to search for. This is the cinder volume ID. |
---|---|
Returns: | Dell Volume object or None if not found. |
Raises VolumeBackendAPIException: | |
If multiple copies are found. |
Finds the lun and wwns of the mapped volume.
Parameters: |
|
---|---|
Returns: | Lun, wwns, initiator target map |
Find the screplication object for the volume on the dest backend.
Parameters: |
|
---|---|
Returns: |
Gets the storage usage object from the Dell backend.
This contains capacity and usage information for the SC.
Returns: | The SC storageusage object. |
---|
Looks up the volume named existing and returns its size string.
Parameters: | existing – Existing volume dict. |
---|---|
Returns: | The SC configuredSize string. |
Raises: | ManageExistingInvalidReference |
Returns the number of volumes attached to specified Dell server.
Parameters: | scserver – The Dell backend server object. |
---|---|
Returns: | Mapping count. -1 if there was an error. |
Finds the volume named existing and renames it.
This checks a few things. The volume has to exist. There can only be one volume by that name. Since cinder manages volumes by the GB it has to be defined on a GB boundry.
This renames existing to newname. newname is the guid from the cinder volume[‘id’]. The volume is moved to the defined cinder volume folder.
Parameters: |
|
---|---|
Returns: | Nothing. |
Raises: | VolumeBackendAPIException, ManageExistingInvalidReference |
Basically renames the screplay and sets it to never expire.
Parameters: |
|
---|---|
Returns: | True on success. False on fail. |
Maps the Dell backend volume object to the Dell server object.
The check for the Dell server object existence is elsewhere; does not create the Dell server object.
Parameters: |
|
---|---|
Returns: | SC mapping profile or None |
Authenticate with Dell REST interface.
Raises: | VolumeBackendAPIException. |
---|
Peels all the mappings off of scvol.
Parameters: | scvol – |
---|---|
Returns: |
Rename scvolume to name.
This is mostly used by update_migrated_volume.
Parameters: |
|
---|---|
Returns: | Boolean indicating success or failure. |
Splits a SC size string into GB and a remainder.
Space is returned in a string like ... 7.38197504E8 Bytes Need to split that apart and convert to GB.
Parameters: | spacestring – SC size string. |
---|---|
Returns: | Size in GB and remainder in byte. |
Snaps a replay of a consistency group.
Parameters: |
|
---|---|
Returns: | Dell SC replay object. |
Unmanage our volume.
We simply rename with with a prefix of ‘Unmanaged_‘. That’s it.
Parameters: | scvolume – The Dell SC volume object. |
---|---|
Returns: | Nothing. |
Raises: | VolumeBackendAPIException |
Basically sets the expireTime
Parameters: | screplay – DellSC object. |
---|---|
Returns: | True on success. False on fail. |
Unmaps the Dell volume object from the Dell server object.
Deletes all mappings to a Dell server object, not just the ones on the path defined in cinder.conf.
Parameters: |
|
---|---|
Returns: | True or False. |
Adds or removes the profile from the specified volumes
Parameters: |
|
---|---|
Returns: | True/False on success/failure. |
Update our replay profiles.
If the replay_profile_string is empty we look for the user’s default profiles. If those aren’t found we look for the Daily profile.
Note that this is in addition to the CG profiles which we do not touch.
Parameters: |
|
---|---|
Returns: | True/False. |
Enables or disables replicating the active replay for given vol.
Parameters: |
|
---|---|
Returns: | True or False |
Update a volume’s Storage Profile.
Changes the volume setting to use a different Storage Profile. If storage_profile is None, will reset to the default profile for the cinder user account.
Parameters: |
|
---|---|
Returns: | True if successful, False otherwise. |
Bases: object
StorageCenterApiHelper
Helper class for API access. Handles opening and closing the connection to the Dell REST API.
Creates the StorageCenterApi object.
Returns: | StorageCenterApi object. |
---|---|
Raises: | VolumeBackendAPIException |