Update vscsi mapping to not include adapter
This change updates the vscsi.py to not send the adapter down when requesting that the scsi adapter be connected. This was due to a recent change in pypowervm, and the refactor was missed in the nova-powervm code. An additional unit test was added to cover this. Change-Id: Ic8555f49f213e3e7e46a59e1518984ef5e0f431b
This commit is contained in:
parent
2f99f2f4fe
commit
6a56fe8146
|
@ -75,6 +75,9 @@ class TestVSCSIAdapter(test.TestCase):
|
||||||
con_info)
|
con_info)
|
||||||
# Single mapping
|
# Single mapping
|
||||||
self.assertEqual(1, mock_add_vscsi_mapping.call_count)
|
self.assertEqual(1, mock_add_vscsi_mapping.call_count)
|
||||||
|
mock_add_vscsi_mapping.assert_called_with(
|
||||||
|
'host_uuid', '3443DB77-AED1-47ED-9AA5-3DB9C6CF7089', 'vm_uuid',
|
||||||
|
mock.ANY)
|
||||||
|
|
||||||
@mock.patch('pypowervm.tasks.hdisk.remove_hdisk')
|
@mock.patch('pypowervm.tasks.hdisk.remove_hdisk')
|
||||||
@mock.patch('pypowervm.tasks.scsi_mapper.remove_pv_mapping')
|
@mock.patch('pypowervm.tasks.scsi_mapper.remove_pv_mapping')
|
||||||
|
|
|
@ -264,7 +264,7 @@ class VscsiVolumeAdapter(v_driver.FibreChannelVolumeAdapter):
|
||||||
:param device_name: The The hdisk device name
|
:param device_name: The The hdisk device name
|
||||||
"""
|
"""
|
||||||
pv = pvm_stor.PV.bld(adapter, device_name)
|
pv = pvm_stor.PV.bld(adapter, device_name)
|
||||||
tsk_map.add_vscsi_mapping(adapter, host_uuid, vios_uuid, vm_uuid, pv)
|
tsk_map.add_vscsi_mapping(host_uuid, vios_uuid, vm_uuid, pv)
|
||||||
|
|
||||||
def _get_udid(self, instance, vios_uuid, volume_id):
|
def _get_udid(self, instance, vios_uuid, volume_id):
|
||||||
"""This method will return the hdisk udid stored in system metadata.
|
"""This method will return the hdisk udid stored in system metadata.
|
||||||
|
|
Loading…
Reference in New Issue