Merge "Use the active WWPNs for connections"

This commit is contained in:
Jenkins 2015-05-01 13:33:13 +00:00 committed by Gerrit Code Review
commit 98df25ee67
2 changed files with 3 additions and 4 deletions

View File

@ -53,7 +53,6 @@ class TestVios(test.TestCase):
def test_get_physical_wwpns(self):
self.adpt.read.return_value = self.vios_feed_resp
expected = set(['21000024FF649105', '21000024FF649104',
'21000024FF649107', '21000024FF649106'])
expected = set(['21000024FF649104'])
result = set(vios.get_physical_wwpns(self.adpt, 'fake_uuid'))
self.assertSetEqual(expected, result)

View File

@ -61,12 +61,12 @@ def is_vios_active(vios):
def get_physical_wwpns(adapter, ms_uuid):
"""Returns the WWPNs of the FC adapters across all VIOSes on system."""
"""Returns the active WWPNs of the FC ports across all VIOSes on system."""
resp = adapter.read(pvm_ms.System.schema_type, root_id=ms_uuid,
child_type=pvm_vios.VIOS.schema_type,
xag=[pvm_vios.VIOS.xags.STORAGE])
vios_feed = pvm_vios.VIOS.wrap(resp)
wwpn_list = []
for vios in vios_feed:
wwpn_list.extend(vios.get_pfc_wwpns())
wwpn_list.extend(vios.get_active_pfc_wwpns())
return wwpn_list