Set_boot_properties retrieves boot-hba-uri on its own
The set_boot_hba uri method can determine the boot-hba-uri on its own as this information is available in the object instance. Change-Id: I39f15db7865457a7e91452e7a024bc4944a5317b
This commit is contained in:
parent
a9c2c15fdd
commit
bce9106265
|
@ -247,9 +247,9 @@ class VmPartitionInstanceTestCase(TestCase):
|
|||
|
||||
wwpn = '500507680B214AC1'
|
||||
lun = 1
|
||||
booturi = '/api/partitions/1/hbas/1'
|
||||
booturi = '/api/partitions/4/hbas/1'
|
||||
partition = self.cpc.partitions.find(**{"name": self.part_name})
|
||||
self.partition_inst.set_boot_properties(wwpn, lun, booturi)
|
||||
self.partition_inst.set_boot_properties(wwpn, lun)
|
||||
self.assertEqual(
|
||||
'storage-adapter',
|
||||
partition.get_property('boot-device'))
|
||||
|
|
|
@ -353,15 +353,10 @@ class DPMDriver(driver.ComputeDriver):
|
|||
nic_boot_string += self._get_nic_string_for_guest_os(nic, vif)
|
||||
inst.set_boot_os_specific_parameters(nic_boot_string)
|
||||
|
||||
hba_uri = inst.get_boot_hba().get_property("element-uri")
|
||||
|
||||
LOG.debug("HBA boot uri %s for the instance %s", hba_uri,
|
||||
instance.hostname)
|
||||
|
||||
target_wwpn, lun = self.get_fc_boot_props(
|
||||
block_device_info, inst)
|
||||
|
||||
inst.set_boot_properties(target_wwpn, lun, hba_uri)
|
||||
inst.set_boot_properties(target_wwpn, lun)
|
||||
inst.launch()
|
||||
|
||||
def get_fc_boot_props(self, block_device_info, inst):
|
||||
|
|
|
@ -273,8 +273,9 @@ class PartitionInstance(object):
|
|||
partition_wwpns.append(wwpn.replace('0x', ''))
|
||||
return partition_wwpns
|
||||
|
||||
def set_boot_properties(self, wwpn, lun, booturi):
|
||||
def set_boot_properties(self, wwpn, lun):
|
||||
LOG.debug('set_boot_properties')
|
||||
booturi = self.get_boot_hba().get_property("element-uri")
|
||||
bootProperties = {'boot-device': 'storage-adapter',
|
||||
'boot-storage-device': booturi,
|
||||
'boot-world-wide-port-name': wwpn,
|
||||
|
|
Loading…
Reference in New Issue