Merge "PowerMax Driver - Force array and srp configuration"
This commit is contained in:
commit
41e0aec51a
|
@ -1626,6 +1626,16 @@ class PowerMaxCommonTest(test.TestCase):
|
|||
mck_s.assert_called_once_with(
|
||||
self.data.vol_type_extra_specs, pool_record, True)
|
||||
|
||||
def test_raise_exception_if_array_not_configured(self):
|
||||
self.driver.configuration.powermax_array = None
|
||||
self.assertRaises(exception.InvalidConfigurationValue,
|
||||
self.common.get_attributes_from_cinder_config)
|
||||
|
||||
def test_raise_exception_if_srp_not_configured(self):
|
||||
self.driver.configuration.powermax_srp = None
|
||||
self.assertRaises(exception.InvalidConfigurationValue,
|
||||
self.common.get_attributes_from_cinder_config)
|
||||
|
||||
def test_delete_volume_from_srp_success(self):
|
||||
array = self.data.array
|
||||
device_id = self.data.device_id
|
||||
|
@ -3269,7 +3279,8 @@ class PowerMaxCommonTest(test.TestCase):
|
|||
u4p_failover_target=(self.data.u4p_failover_config[
|
||||
'u4p_failover_targets']), u4p_failover_backoff_factor='2',
|
||||
u4p_failover_retries='3', u4p_failover_timeout='10',
|
||||
u4p_primary='10.10.10.10')
|
||||
u4p_primary='10.10.10.10', powermax_array=self.data.array,
|
||||
powermax_srp=self.data.srp)
|
||||
self.common.configuration = configuration
|
||||
self.common._get_u4p_failover_info()
|
||||
self.assertTrue(self.rest.u4p_failover_enabled)
|
||||
|
|
|
@ -6544,10 +6544,14 @@ class PowerMaxCommon(object):
|
|||
if username and password:
|
||||
serial_number = self.configuration.safe_get(utils.POWERMAX_ARRAY)
|
||||
if serial_number is None:
|
||||
LOG.error("Array Serial Number must be set in cinder.conf")
|
||||
msg = _("Powermax Array Serial must be set in cinder.conf")
|
||||
LOG.error(msg)
|
||||
raise exception.InvalidConfigurationValue(message=msg)
|
||||
srp_name = self.configuration.safe_get(utils.POWERMAX_SRP)
|
||||
if srp_name is None:
|
||||
LOG.error("SRP Name must be set in cinder.conf")
|
||||
msg = _("Powermax SRP must be set in cinder.conf")
|
||||
LOG.error(msg)
|
||||
raise exception.InvalidConfigurationValue(message=msg)
|
||||
slo = self.configuration.safe_get(utils.POWERMAX_SERVICE_LEVEL)
|
||||
workload = self.configuration.safe_get(utils.VMAX_WORKLOAD)
|
||||
port_groups = self.configuration.safe_get(
|
||||
|
|
Loading…
Reference in New Issue