PowerMax Driver - Fix pylint errors in test_common and provision
Fix assignment-from-no-return and no-member pylint errors in test_powermax_common.py. Fix unsupported-membership-test in provision.py. Change-Id: Iec2d104c6953de71b4f217f34a2c0ac71dab91e7
This commit is contained in:
parent
c6b2ea4253
commit
281dd75d36
|
@ -634,8 +634,7 @@ class PowerMaxCommonTest(test.TestCase):
|
|||
self, mck_unmap, mck_info):
|
||||
volume = deepcopy(self.data.test_volume)
|
||||
connector = deepcopy(self.data.connector)
|
||||
ret = self.common._unmap_lun_promotion(volume, connector)
|
||||
self.assertIsNone(ret)
|
||||
self.common._unmap_lun_promotion(volume, connector)
|
||||
self.assertEqual(0, mck_unmap.call_count)
|
||||
self.assertEqual(0, mck_info.call_count)
|
||||
|
||||
|
@ -4250,8 +4249,8 @@ class PowerMaxCommonTest(test.TestCase):
|
|||
rep_driver_data = dict()
|
||||
group_name = self.common._add_to_group(
|
||||
source_volume, self.data, source_volume.name,
|
||||
self.data.test_group_1.id, self.data.test_group_1, extra_specs,
|
||||
rep_driver_data)
|
||||
self.data.test_group_1.fields.get('id'), self.data.test_group_1,
|
||||
extra_specs, rep_driver_data)
|
||||
self.assertEqual('my_group', group_name)
|
||||
mock_group.assert_called_once()
|
||||
|
||||
|
@ -4266,7 +4265,7 @@ class PowerMaxCommonTest(test.TestCase):
|
|||
rep_driver_data = dict()
|
||||
group_name = self.common._add_to_group(
|
||||
source_volume, self.data, source_volume.name,
|
||||
self.data.test_group_1.id, None, extra_specs,
|
||||
self.data.test_group_1.fields.get('id'), None, extra_specs,
|
||||
rep_driver_data)
|
||||
self.assertIsNone(group_name)
|
||||
mock_group.assert_not_called()
|
||||
|
|
|
@ -723,7 +723,7 @@ class PowerMaxProvision(object):
|
|||
array, source_device_id, "", snap_name, extra_specs,
|
||||
snap_id=snap_id, restore=True)
|
||||
except exception.VolumeBackendAPIException as ex:
|
||||
if utils.REVERT_SS_EXC in str(ex):
|
||||
if utils.REVERT_SS_EXC in ex.message:
|
||||
exception_message = _(
|
||||
"Link must be fully copied for this operation to proceed. "
|
||||
"Please reset the volume state from error to available "
|
||||
|
|
Loading…
Reference in New Issue