set_boot_properties does NOT take the bd anymore
The block_device is now gathered from block_device_info which is now available as class variable. Change-Id: Icebdd6ed76a1384e11019f79e0c9d0f20162a005
This commit is contained in:
parent
112c4cda58
commit
255d62a20b
|
@ -310,9 +310,8 @@ class VmPartitionInstanceTestCase(TestCase):
|
|||
'wwpn': wwpn}[prop]
|
||||
mock_get_hba.return_value = mock_hba
|
||||
|
||||
bdm = [BLOCK_DEVICE]
|
||||
|
||||
self.partition_inst.set_boot_properties(bdm)
|
||||
self.partition_inst.block_device_info = [BLOCK_DEVICE]
|
||||
self.partition_inst.set_boot_properties()
|
||||
|
||||
mock_gtw.assert_called_once_with(wwpn)
|
||||
|
||||
|
|
|
@ -314,13 +314,16 @@ class PartitionInstance(object):
|
|||
partition_wwpns.append(wwpn.replace('0x', ''))
|
||||
return partition_wwpns
|
||||
|
||||
def set_boot_properties(self, bdm):
|
||||
def _get_boot_bd(self):
|
||||
# block_device_info is a list of block devices.
|
||||
# In DPM case we are mapping only the first device for now.
|
||||
# TODO(andreas_s): Need to check whether this bd is marked as bootable
|
||||
return BlockDevice(self.block_device_info[0])
|
||||
|
||||
def set_boot_properties(self):
|
||||
LOG.debug('set_boot_properties')
|
||||
# block_device_mapping is a list of mapped block devices.
|
||||
# In dpm case we are mapping only the first device for now
|
||||
# So block_device_mapping contains one item in the list
|
||||
# i.e. block_device_mapping[0]
|
||||
bd = BlockDevice(bdm[0])
|
||||
|
||||
bd = self._get_boot_bd()
|
||||
|
||||
boot_hba = self.get_boot_hba()
|
||||
boot_properties = {
|
||||
|
|
Loading…
Reference in New Issue