Skip to content

Commit

Permalink
Merge "VMAX driver - Implement Tiramisu feature on VMAX"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Dec 5, 2017
2 parents b883221 + c6b0c4b commit a4034b9
Show file tree
Hide file tree
Showing 8 changed files with 1,198 additions and 204 deletions.
551 changes: 462 additions & 89 deletions cinder/tests/unit/volume/drivers/dell_emc/vmax/test_vmax.py

Large diffs are not rendered by default.

475 changes: 405 additions & 70 deletions cinder/volume/drivers/dell_emc/vmax/common.py

Large diffs are not rendered by default.

39 changes: 37 additions & 2 deletions cinder/volume/drivers/dell_emc/vmax/fc.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ class VMAXFCDriver(driver.FibreChannelDriver):
- Support for volume replication
- Support for live migration
- Support for Generic Volume Group
3.1.0 - Support for replication groups (Tiramisu)
"""

VERSION = "3.0.0"
VERSION = "3.1.0"

# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"
Expand Down Expand Up @@ -465,8 +466,9 @@ def create_group(self, context, group):
:param context: the context
:param group: the group object
:returns: model_update
"""
self.common.create_group(context, group)
return self.common.create_group(context, group)

def delete_group(self, context, group, volumes):
"""Deletes a generic volume group.
Expand Down Expand Up @@ -526,3 +528,36 @@ def create_group_from_src(
return self.common.create_group_from_src(
context, group, volumes, group_snapshot, snapshots, source_group,
source_vols)

def enable_replication(self, context, group, volumes):
"""Enable replication for a group.
:param context: the context
:param group: the group object
:param volumes: the list of volumes
:returns: model_update, None
"""
return self.common.enable_replication(context, group, volumes)

def disable_replication(self, context, group, volumes):
"""Disable replication for a group.
:param context: the context
:param group: the group object
:param volumes: the list of volumes
:returns: model_update, None
"""
return self.common.disable_replication(context, group, volumes)

def failover_replication(self, context, group, volumes,
secondary_backend_id=None):
"""Failover replication for a group.
:param context: the context
:param group: the group object
:param volumes: the list of volumes
:param secondary_backend_id: the secondary backend id - default None
:returns: model_update, vol_model_updates
"""
return self.common.failover_replication(
context, group, volumes, secondary_backend_id)
39 changes: 37 additions & 2 deletions cinder/volume/drivers/dell_emc/vmax/iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ class VMAXISCSIDriver(driver.ISCSIDriver):
- Support for volume replication
- Support for live migration
- Support for Generic Volume Group
3.1.0 - Support for replication groups (Tiramisu)
"""

VERSION = "3.0.0"
VERSION = "3.1.0"

# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"
Expand Down Expand Up @@ -412,8 +413,9 @@ def create_group(self, context, group):
:param context: the context
:param group: the group object
:returns: model_update
"""
self.common.create_group(context, group)
return self.common.create_group(context, group)

def delete_group(self, context, group, volumes):
"""Deletes a generic volume group.
Expand Down Expand Up @@ -473,3 +475,36 @@ def create_group_from_src(
return self.common.create_group_from_src(
context, group, volumes, group_snapshot, snapshots, source_group,
source_vols)

def enable_replication(self, context, group, volumes):
"""Enable replication for a group.
:param context: the context
:param group: the group object
:param volumes: the list of volumes
:returns: model_update, None
"""
return self.common.enable_replication(context, group, volumes)

def disable_replication(self, context, group, volumes):
"""Disable replication for a group.
:param context: the context
:param group: the group object
:param volumes: the list of volumes
:returns: model_update, None
"""
return self.common.disable_replication(context, group, volumes)

def failover_replication(self, context, group, volumes,
secondary_backend_id=None):
"""Failover replication for a group.
:param context: the context
:param group: the group object
:param volumes: the list of volumes
:param secondary_backend_id: the secondary backend id - default None
:returns: model_update, vol_model_updates
"""
return self.common.failover_replication(
context, group, volumes, secondary_backend_id)
64 changes: 64 additions & 0 deletions cinder/volume/drivers/dell_emc/vmax/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,3 +596,67 @@ def _unlink_grp():
timer = loopingcall.FixedIntervalLoopingCall(_unlink_grp)
rc = timer.start(interval=UNLINK_INTERVAL).wait()
return rc

def enable_group_replication(self, array, storagegroup_name,
rdf_group_num, extra_specs):
"""Resume rdf replication on a storage group.
Replication is enabled by default. This allows resuming
replication on a suspended group.
:param array: the array serial number
:param storagegroup_name: the storagegroup name
:param rdf_group_num: the rdf group number
:param extra_specs: the extra specifications
"""
action = "Resume"
self.rest.modify_storagegroup_rdf(
array, storagegroup_name, rdf_group_num, action, extra_specs)

def disable_group_replication(self, array, storagegroup_name,
rdf_group_num, extra_specs):
"""Suspend rdf replication on a storage group.
This does not delete the rdf pairs, that can only be done
by deleting the group. This method suspends all i/o activity
on the rdf links.
:param array: the array serial number
:param storagegroup_name: the storagegroup name
:param rdf_group_num: the rdf group number
:param extra_specs: the extra specifications
"""
action = "Suspend"
self.rest.modify_storagegroup_rdf(
array, storagegroup_name, rdf_group_num, action, extra_specs)

def failover_group(self, array, storagegroup_name,
rdf_group_num, extra_specs, failover=True):
"""Failover or failback replication on a storage group.
:param array: the array serial number
:param storagegroup_name: the storagegroup name
:param rdf_group_num: the rdf group number
:param extra_specs: the extra specifications
:param failover: flag to indicate failover/ failback
"""
action = "Failover" if failover else "Failback"
self.rest.modify_storagegroup_rdf(
array, storagegroup_name, rdf_group_num, action, extra_specs)

def delete_group_replication(self, array, storagegroup_name,
rdf_group_num, extra_specs):
"""Split replication for a group and delete the pairs.
:param array: the array serial number
:param storagegroup_name: the storage group name
:param rdf_group_num: the rdf group number
:param extra_specs: the extra specifications
"""
action = "Split"
LOG.debug("Splitting remote replication for group %(sg)s",
{'sg': storagegroup_name})
self.rest.modify_storagegroup_rdf(
array, storagegroup_name, rdf_group_num, action, extra_specs)
LOG.debug("Deleting remote replication for group %(sg)s",
{'sg': storagegroup_name})
self.rest.delete_storagegroup_rdf(
array, storagegroup_name, rdf_group_num)
Loading

0 comments on commit a4034b9

Please sign in to comment.