Add storage XAG to npiv
The NPIV flow needs both the FC mapping data as well as the backing storage devices. Since pypowervm switched to a default of group=None, that exposed an issue in the query in the npiv.py file where it was not retrieving the Fibre Ports. This update extends the XAG request to include Storage, as well as the original FC_Mappings. Change-Id: Iaf08b15183383fc1df8d9b294d2a18140e7b3e31
This commit is contained in:
parent
513712e362
commit
42f7c09bd6
|
@ -20,6 +20,7 @@ from nova.compute import task_states
|
|||
from nova import test
|
||||
import os
|
||||
from pypowervm.tests.wrappers.util import pvmhttp
|
||||
from pypowervm.wrappers import virtual_io_server as pvm_vios
|
||||
|
||||
from nova_powervm.tests.virt.powervm import fixtures as fx
|
||||
from nova_powervm.virt.powervm.volume import npiv
|
||||
|
@ -159,6 +160,8 @@ class TestNPIVAdapter(test.TestCase):
|
|||
self.assertListEqual(['aa', 'bb'], wwpns)
|
||||
self.assertEqual('21000024FF649104,AA,BB',
|
||||
inst.system_metadata[meta_key])
|
||||
xags = [pvm_vios.VIOS.xags.FC_MAPPING, pvm_vios.VIOS.xags.STORAGE]
|
||||
self.adpt.read.assert_called_once_with('VirtualIOServer', xag=xags)
|
||||
|
||||
def test_wwpns_on_sys_meta(self):
|
||||
"""Tests that previously stored WWPNs are returned."""
|
||||
|
|
|
@ -171,7 +171,8 @@ class NPIVVolumeAdapter(v_driver.PowerVMVolumeAdapter):
|
|||
#
|
||||
# This should be done on a per-fabric basis.
|
||||
vios_resp = adapter.read(pvm_vios.VIOS.schema_type,
|
||||
xag=[pvm_vios.VIOS.xags.FC_MAPPING])
|
||||
xag=[pvm_vios.VIOS.xags.FC_MAPPING,
|
||||
pvm_vios.VIOS.xags.STORAGE])
|
||||
vios_wraps = pvm_vios.VIOS.wrap(vios_resp)
|
||||
resp_wwpns = []
|
||||
for fabric in self._fabric_names():
|
||||
|
|
Loading…
Reference in New Issue