Rebase on pypowervm slot_number => lpar_slot_num
Recently pypowervm refactored and expanded the slot number and LPAR ID properties on virtual storage adapters such that {vios|lpar}_{id|slot_num} always refers to the ID or slot number on the VIOS or LPAR, respectively, regardless of whether you're looking at the client or server side of the adapter. (Change-Id: Id626a1b23b9b2757e5e1f38fd6ed141d97fd0e74) The only non-backward-compatible change is the renaming of slot_number to lpar_slot_num. This change set rebases on that modification. Change-Id: I2d392781817b076b79cf93360588c6107dceaca4
This commit is contained in:
parent
b8199619f2
commit
723dc37bfc
|
@ -54,7 +54,7 @@ class TestMgmt(test.TestCase):
|
|||
'13fb2aa55a2d7b8d150cb1b7b6bc04d6')
|
||||
devlink = ('/dev/disk/by-id/scsi-SIBM_3303_NVDISK' + udid)
|
||||
mapping = mock.Mock()
|
||||
mapping.client_adapter.slot_number = 5
|
||||
mapping.client_adapter.lpar_slot_num = 5
|
||||
mapping.backing_storage.udid = udid
|
||||
# Realistically, first glob would return e.g. .../host0/.../host0/...
|
||||
# but it doesn't matter for test purposes.
|
||||
|
@ -75,7 +75,7 @@ class TestMgmt(test.TestCase):
|
|||
udid = ('275b5d5f88fa5611e48be9000098be9400'
|
||||
'13fb2aa55a2d7b8d150cb1b7b6bc04d6')
|
||||
mapping = mock.Mock()
|
||||
mapping.client_adapter.slot_number = 5
|
||||
mapping.client_adapter.lpar_slot_num = 5
|
||||
mapping.backing_storage.udid = udid
|
||||
# No disks found
|
||||
mock_glob.side_effect = lambda path: []
|
||||
|
|
|
@ -419,7 +419,7 @@ class TestNPIVAdapter(test_vol.TestVolumeAdapter):
|
|||
[('33', 'EE FF')]]
|
||||
|
||||
def mock_client_adpt(slot):
|
||||
return mock.Mock(client_adapter=mock.Mock(slot_number=slot))
|
||||
return mock.Mock(client_adapter=mock.Mock(lpar_slot_num=slot))
|
||||
|
||||
mock_find_vios_for_vfc_wwpns.side_effect = [
|
||||
(None, mock_client_adpt(1)), (None, mock_client_adpt(2)),
|
||||
|
@ -454,7 +454,7 @@ class TestNPIVAdapter(test_vol.TestVolumeAdapter):
|
|||
self.assertEqual(['b'], dest_mig_data.get('npiv_fabric_mapping_B'))
|
||||
|
||||
# Order of the mappings is not important.
|
||||
self.assertEqual(set(['b', 'a']),
|
||||
self.assertEqual({'b', 'a'},
|
||||
set(dest_mig_data.get('vfc_lpm_mappings')))
|
||||
|
||||
def test_set_fabric_meta(self):
|
||||
|
|
|
@ -83,7 +83,7 @@ def discover_vscsi_disk(mapping, scan_timeout=10):
|
|||
# TODO(IBM): Support for other host platforms.
|
||||
|
||||
# Calculate the Linux slot number from the client adapter slot number.
|
||||
lslot = 0x30000000 | mapping.client_adapter.slot_number
|
||||
lslot = 0x30000000 | mapping.client_adapter.lpar_slot_num
|
||||
# We'll match the device ID based on the UDID, which is actually the last
|
||||
# 32 chars of the field we get from PowerVM.
|
||||
udid = mapping.backing_storage.udid[-32:]
|
||||
|
|
|
@ -108,7 +108,7 @@ class NPIVVolumeAdapter(v_driver.FibreChannelVolumeAdapter):
|
|||
for port_map in npiv_port_maps:
|
||||
vfc_map = pvm_vfcm.find_vios_for_vfc_wwpns(
|
||||
vios_wraps, port_map[1].split())[1]
|
||||
client_slots.append(vfc_map.client_adapter.slot_number)
|
||||
client_slots.append(vfc_map.client_adapter.lpar_slot_num)
|
||||
|
||||
# Set the client slots into the fabric data to pass to the
|
||||
# destination.
|
||||
|
|
Loading…
Reference in New Issue