self.standard_logout)
self.assertNotIn('initiator_target_map', conn_info['data'])
+ def test_get_3par_host_from_wwn_iqn(self):
+ mock_client = self.setup_driver()
+ mock_client.getHosts.return_value = {
+ 'name': self.FAKE_HOST,
+ 'FCPaths': [{'driverVersion': None,
+ 'firmwareVersion': None,
+ 'hostSpeed': 0,
+ 'model': None,
+ 'portPos': {'cardPort': 1, 'node': 1,
+ 'slot': 2},
+ 'vendor': None,
+ 'wwn': '123ab6789012345'}]}
+ with mock.patch.object(hpecommon.HPE3PARCommon,
+ '_create_client') as mock_create_client:
+ mock_create_client.return_value = mock_client
+ hostname = mock_client._get_3par_hostname_from_wwn_iqn(
+ wwns=['123AB6789012345', '123CD6789054321'],
+ iqns=None)
+ self.assertIsNotNone(hostname)
+
def test_get_volume_stats1(self):
# setup_mock_client drive with the configuration
# and return the mock HTTP 3PAR client
3.0.11 - Fix the image cache capability bug #1491088
3.0.12 - Remove client version checks for replication
3.0.13 - Support creating a cg from a source cg
+ 3.0.14 - Comparison of WWNs now handles case difference. bug #1546453
"""
- VERSION = "3.0.13"
+ VERSION = "3.0.14"
stats = {}
fc_paths = host['FCPaths']
for fc in fc_paths:
for wwn in wwns:
- if wwn == fc['wwn']:
+ if wwn.upper() == fc['wwn'].upper():
return host['name']
def terminate_connection(self, volume, hostname, wwn=None, iqn=None):