Merge "PowerMax Driver - Get manageable volumes fix" into stable/xena

This commit is contained in:
Zuul 2023-03-01 04:44:44 +00:00 committed by Gerrit Code Review
commit b94f55a0ea
4 changed files with 20 additions and 0 deletions

View File

@ -1274,6 +1274,12 @@ class PowerMaxData(object):
'getDynamicRDFCapability': 'RDF1_Capable', 'RDFA': False},
'timeFinderInfo': {'snapVXTgt': False, 'snapVXSrc': False}}]
priv_vol_func_response_multi_sg = deepcopy(priv_vol_func_response_single)
priv_vol_func_response_multi_sg[0].get('volumeHeader').update(
{'numStorageGroups': 2})
priv_vol_func_response_multi_sg[0].get('volumeHeader').update(
{'storageGroup': ['SG1', 'SG2']})
volume_create_info_dict = {utils.ARRAY: array, utils.DEVICE_ID: device_id}
volume_info_dict = {

View File

@ -590,6 +590,11 @@ class PowerMaxUtilsTest(test.TestCase):
self.assertFalse(
self.utils.is_volume_manageable(volume))
def test_is_volume_manageable_multi_sg(self):
for volume in self.data.priv_vol_func_response_multi_sg:
self.assertFalse(
self.utils.is_volume_manageable(volume))
def test_is_snapshot_manageable(self):
for volume in self.data.priv_vol_func_response_multi:
self.assertTrue(

View File

@ -1057,6 +1057,9 @@ class PowerMaxUtils(object):
if vol_head['userDefinedIdentifier'][0:3] == 'OS-':
return False
if vol_head.get('numStorageGroups', 0) > 1:
return False
return True
@staticmethod

View File

@ -0,0 +1,6 @@
---
fixes:
- |
PowerMax driver `bug #1979668
<https://bugs.launchpad.net/cinder/+bug/1979668>`_: Fixed
visibility of manageable volumes in multiple storage groups.