Merge "VMAX driver - Fix AttributeError of dell emc driver"

This commit is contained in:
Zuul 2018-01-17 16:56:54 +00:00 committed by Gerrit Code Review
commit 907da1f54b
2 changed files with 11 additions and 7 deletions
cinder
tests/unit/volume/drivers/dell_emc/vmax
volume/drivers/dell_emc/vmax

@ -5010,6 +5010,16 @@ class VMAXCommonTest(test.TestCase):
mock_revert.assert_called_once_with(
array, device_id, snap_name, extra_specs)
def test_get_initiator_check_flag(self):
self.common.configuration.initiator_check = False
initiator_check = self.common._get_initiator_check_flag()
self.assertFalse(initiator_check)
def test_get_initiator_check_flag_true(self):
self.common.configuration.initiator_check = True
initiator_check = self.common._get_initiator_check_flag()
self.assertTrue(initiator_check)
class VMAXFCTest(test.TestCase):
def setUp(self):

@ -164,13 +164,7 @@ class VMAXCommon(object):
:returns: flag
"""
conf_string = (self.configuration.safe_get('initiator_check'))
ret_val = False
string_true = "True"
if conf_string:
if conf_string.lower() == string_true.lower():
ret_val = True
return ret_val
return self.configuration.safe_get('initiator_check')
def _get_replication_info(self):
"""Gather replication information, if provided."""