PowerMax Driver - Train San REST Port Removal
The PowerMax Cinder driver has removed the environment configuration option san_rest_port in favour of the Cinder standard option san_api_port after 2 release deprecation period. Change-Id: Ia47a953c56e7b41841d5da4acb66d79cdfe1384e
This commit is contained in:
parent
27db9d2ed8
commit
0d2f3d0d5d
@ -290,8 +290,6 @@ class FakeConfiguration(object):
|
||||
self.san_ip = value
|
||||
elif key == 'san_api_port':
|
||||
self.san_api_port = value
|
||||
elif key == 'san_rest_port':
|
||||
self.san_rest_port = value
|
||||
elif key == 'vmax_srp':
|
||||
self.vmax_srp = value
|
||||
elif key == 'vmax_service_level':
|
||||
|
@ -2302,21 +2302,7 @@ class PowerMaxCommonTest(test.TestCase):
|
||||
kwargs = self.common.get_attributes_from_cinder_config()
|
||||
self.assertIsNone(kwargs)
|
||||
|
||||
def test_get_attributes_from_cinder_config_with_port_override_old(self):
|
||||
kwargs_expected = (
|
||||
{'RestServerIp': '1.1.1.1', 'RestServerPort': 3448,
|
||||
'RestUserName': 'smc', 'RestPassword': 'smc', 'SSLVerify': False,
|
||||
'SerialNumber': self.data.array, 'srpName': 'SRP_1',
|
||||
'PortGroup': self.data.port_group_name_i})
|
||||
configuration = tpfo.FakeConfiguration(
|
||||
None, 'CommonTests', 1, 1, san_ip='1.1.1.1', san_login='smc',
|
||||
vmax_array=self.data.array, vmax_srp='SRP_1', san_password='smc',
|
||||
san_rest_port=3448, vmax_port_groups=[self.data.port_group_name_i])
|
||||
self.common.configuration = configuration
|
||||
kwargs_returned = self.common.get_attributes_from_cinder_config()
|
||||
self.assertEqual(kwargs_expected, kwargs_returned)
|
||||
|
||||
def test_get_attributes_from_cinder_config_with_port_override_new(self):
|
||||
def test_get_attributes_from_cinder_config_with_port(self):
|
||||
kwargs_expected = (
|
||||
{'RestServerIp': '1.1.1.1', 'RestServerPort': 3448,
|
||||
'RestUserName': 'smc', 'RestPassword': 'smc', 'SSLVerify': False,
|
||||
@ -2781,3 +2767,23 @@ class PowerMaxCommonTest(test.TestCase):
|
||||
exception.VolumeBackendAPIException,
|
||||
self.common._extend_vol_validation_checks,
|
||||
array, device_id, volume.name, extra_specs, volume.size, new_size)
|
||||
|
||||
def test_get_unisphere_port(self):
|
||||
# Test user set port ID
|
||||
configuration = tpfo.FakeConfiguration(
|
||||
None, 'CommonTests', 1, 1, san_ip='1.1.1.1', san_login='smc',
|
||||
vmax_array=self.data.array, vmax_srp='SRP_1', san_password='smc',
|
||||
san_api_port=1234, vmax_port_groups=[self.data.port_group_name_i])
|
||||
self.common.configuration = configuration
|
||||
port = self.common._get_unisphere_port()
|
||||
self.assertEqual(1234, port)
|
||||
|
||||
# Test no set port ID, use default port
|
||||
configuration = tpfo.FakeConfiguration(
|
||||
None, 'CommonTests', 1, 1, san_ip='1.1.1.1', san_login='smc',
|
||||
vmax_array=self.data.array, vmax_srp='SRP_1', san_password='smc',
|
||||
vmax_port_groups=[self.data.port_group_name_i])
|
||||
self.common.configuration = configuration
|
||||
ref_port = utils.DEFAULT_PORT
|
||||
port = self.common._get_unisphere_port()
|
||||
self.assertEqual(ref_port, port)
|
||||
|
@ -74,14 +74,6 @@ powermax_opts = [
|
||||
default=False,
|
||||
help='Use this value to enable '
|
||||
'the initiator_check.'),
|
||||
cfg.PortOpt(utils.VMAX_SERVER_PORT_OLD,
|
||||
deprecated_for_removal=True,
|
||||
deprecated_since="13.0.0",
|
||||
deprecated_reason='Unisphere port should now be '
|
||||
'set using the common san_api_port '
|
||||
'config option instead.',
|
||||
default=8443,
|
||||
help='REST server port number.'),
|
||||
cfg.StrOpt(utils.VMAX_ARRAY,
|
||||
help='DEPRECATED: vmax_array.',
|
||||
deprecated_for_removal=True,
|
||||
@ -229,10 +221,8 @@ class PowerMaxCommon(object):
|
||||
self.pool_info['reserved_percentage'] = (
|
||||
self.configuration.safe_get('reserved_percentage'))
|
||||
LOG.debug(
|
||||
"Updating volume stats on file %(emcConfigFileName)s on "
|
||||
"backend %(backendName)s.",
|
||||
{'emcConfigFileName': self.pool_info['config_file'],
|
||||
'backendName': self.pool_info['backend_name']})
|
||||
"Updating volume stats on Cinder backend %(backendName)s.",
|
||||
{'backendName': self.pool_info['backend_name']})
|
||||
|
||||
def _get_u4p_failover_info(self):
|
||||
"""Gather Unisphere failover target information, if provided."""
|
||||
@ -1071,8 +1061,8 @@ class PowerMaxCommon(object):
|
||||
:param rep_enabled: if replication is enabled for backend
|
||||
:returns: r1_ode: (bool) If R1 array supports ODE
|
||||
:returns: r1_ode_metro: (bool) If R1 array supports ODE with Metro vols
|
||||
:returns: r2_ode: (bool) If R1 array supports ODE
|
||||
:returns: r2_ode_metro: (bool) If R1 array supports ODE with Metro vols
|
||||
:returns: r2_ode: (bool) If R2 array supports ODE
|
||||
:returns: r2_ode_metro: (bool) If R2 array supports ODE with Metro vols
|
||||
"""
|
||||
r1_ucode = self.ucode_level.split('.')
|
||||
r1_ode, r1_ode_metro = False, False
|
||||
@ -5258,10 +5248,8 @@ class PowerMaxCommon(object):
|
||||
|
||||
:returns: unisphere port
|
||||
"""
|
||||
if self.configuration.safe_get(utils.VMAX_SERVER_PORT_OLD):
|
||||
return self.configuration.safe_get(utils.VMAX_SERVER_PORT_OLD)
|
||||
elif self.configuration.safe_get(utils.VMAX_SERVER_PORT_NEW):
|
||||
return self.configuration.safe_get(utils.VMAX_SERVER_PORT_NEW)
|
||||
if self.configuration.safe_get(utils.U4P_SERVER_PORT):
|
||||
return self.configuration.safe_get(utils.U4P_SERVER_PORT)
|
||||
else:
|
||||
LOG.debug("PowerMax/VMAX port is not set, using default port: %s",
|
||||
utils.DEFAULT_PORT)
|
||||
|
@ -112,6 +112,7 @@ class PowerMaxFCDriver(san.SanDriver, driver.FibreChannelDriver):
|
||||
- Support for Rapid TDEV Delete (bp powermax-tdev-deallocation)
|
||||
- PowerMax OS Metro formatted volumes fix (bug #1829876)
|
||||
- Support for Metro ODE (bp/powermax-metro-ode)
|
||||
- Removal of san_rest_port from PowerMax cinder.conf config
|
||||
"""
|
||||
|
||||
VERSION = "4.1.0"
|
||||
|
@ -117,6 +117,7 @@ class PowerMaxISCSIDriver(san.SanISCSIDriver):
|
||||
- Support for Rapid TDEV Delete (bp powermax-tdev-deallocation)
|
||||
- PowerMax OS Metro formatted volumes fix (bug #1829876)
|
||||
- Support for Metro ODE (bp/powermax-metro-ode)
|
||||
- Removal of san_rest_port from PowerMax cinder.conf config
|
||||
"""
|
||||
|
||||
VERSION = "4.1.0"
|
||||
|
@ -92,8 +92,7 @@ UNMANAGED_SG = 'OS-Unmanaged'
|
||||
VMAX_SERVER_IP = 'san_ip'
|
||||
VMAX_USER_NAME = 'san_login'
|
||||
VMAX_PASSWORD = 'san_password'
|
||||
VMAX_SERVER_PORT_NEW = 'san_api_port'
|
||||
VMAX_SERVER_PORT_OLD = 'san_rest_port'
|
||||
U4P_SERVER_PORT = 'san_api_port'
|
||||
VMAX_ARRAY = 'vmax_array'
|
||||
VMAX_WORKLOAD = 'vmax_workload'
|
||||
VMAX_SRP = 'vmax_srp'
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The PowerMax Cinder driver has removed the environment configuration
|
||||
option san_rest_port in favour of the Cinder standard option san_api_port.
|
Loading…
x
Reference in New Issue
Block a user