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.
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: |
|
---|---|
Returns: | Replication SC volume object. |
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. |
This create’s a live volume instead of a replication.
Servers are not created at this point so we cannot map up a remote server immediately.
Parameters: |
|
---|---|
Returns: | ScLiveVolume object or None on failure. |
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 server with multiple WWNS associated with it.
Same as create_server except it can take a list of HBAs.
Parameters: |
|
---|---|
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. |
Deletes the live volume.
Parameters: | sclivevolume – ScLiveVolume object to be whacked. |
---|---|
Returns: | Boolean on success/fail. |
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: |
|
---|---|
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 the common replay between two volumes.
This assumes that one volume was replicated from the other. This should return the most recent replay.
Parameters: |
|
---|---|
Returns: | Common replay or None. |
Finds target information for a given Dell scvolume object mapping.
The data coming back is both the preferred path and all the paths.
Parameters: | scvolume – The dell sc volume object. |
---|---|
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: |
|
---|---|
Returns: | Dell server object or None. |
Find the volume by name or instanceId.
We check if we can use provider_id before using it. If so then we expect to find it by provider_id.
We also conclude our failover at this point. If we are failed over we run _import_one to rename the volume.
Parameters: |
|
---|---|
Returns: | sc volume object or None. |
Raises VolumeBackendAPIException: | |
if unable to import. |
Finds the lun and wwns of the mapped volume.
Parameters: |
|
---|---|
Returns: | Lun, wwns, initiator target map |
Enables replication from current destination volume to source.
Parameters: |
|
---|---|
Returns: | True/False. |
Get’s the live ScLiveVolume object for the vol with primaryid.
Parameters: | primaryid – InstanceId of the primary volume. |
---|---|
Parma name: | Volume name associated with this live volume. |
Returns: | ScLiveVolume object or None |
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 scvolume associated with provider_id.
Parameters: | provider_id – This is the instanceId |
---|---|
Returns: | Dell SCVolume object. |
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 boundary.
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: | scvolume. |
Raises: | VolumeBackendAPIException, ManageExistingInvalidReference |
Basically renames the screplay and sets it to never expire.
Parameters: |
|
---|---|
Returns: | True on success. False on fail. |
Map’s the secondary volume or a LiveVolume to destsrv.
Parameters: |
|
---|---|
Returns: | ScMappingProfile object or None on failure. |
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 – Storage Center volume object. |
---|---|
Returns: | True/False on Success/Failure. |
Rename scvolume to name.
This is mostly used by update_migrated_volume.
Parameters: |
|
---|---|
Returns: | Boolean indicating success or failure. |
Reverses a replication between two volumes.
Parameters: |
|
---|---|
Returns: | ScReplication object or None. |
Get’s the current progress of the replication.
Parameters: | screplid – instanceId of the ScReplication object. |
---|---|
Returns: | Boolean for synced, float of remaining bytes. (Or None, None.) |
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. |
Starts a replication between volumes.
Requires the dvolume to be in an appropriate state to start this.
Parameters: |
|
---|---|
Returns: | ScReplication object or None. |
Swap live volume roles.
Parameters: | sclivevolume – Dell SC live volume object. |
---|---|
Returns: | True/False on success/failure. |
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 |