Add 'force_persistent_boot_device' to pxe props

Adds 'force_persistent_boot_device' to the pxe driver/interface's
list of properties.  This property was added as part of commit
049fd40719.

Change-Id: Ie4549fe437c0a2b06a7d5e2dc0725d0990ed6d67
Related-Bug: 1703945
This commit is contained in:
Ruby Loo 2017-08-17 20:40:49 -04:00
parent 1946eb939f
commit 43b53ab28f
3 changed files with 15 additions and 5 deletions

View File

@ -49,7 +49,14 @@ REQUIRED_PROPERTIES = {
'deploy_ramdisk': _("UUID (from Glance) of the ramdisk that is "
"mounted at boot time. Required."),
}
COMMON_PROPERTIES = REQUIRED_PROPERTIES
OPTIONAL_PROPERTIES = {
'force_persistent_boot_device': _("True to enable persistent behavior "
"when the boot device is set during "
"deploy and cleaning operations. "
"Defaults to False. Optional."),
}
COMMON_PROPERTIES = REQUIRED_PROPERTIES.copy()
COMMON_PROPERTIES.update(OPTIONAL_PROPERTIES)
def _parse_driver_info(node):

View File

@ -5029,7 +5029,7 @@ class ManagerTestProperties(mgr_utils.ServiceSetUpMixin, db_base.DbTestCase):
def test_driver_properties_fake_pxe(self):
expected = ['deploy_kernel', 'deploy_ramdisk',
'deploy_forces_oob_reboot']
'force_persistent_boot_device', 'deploy_forces_oob_reboot']
self._check_driver_properties("fake_pxe", expected)
def test_driver_properties_fake_snmp(self):
@ -5043,12 +5043,14 @@ class ManagerTestProperties(mgr_utils.ServiceSetUpMixin, db_base.DbTestCase):
'ipmi_username', 'ipmi_bridging', 'ipmi_transit_channel',
'ipmi_transit_address', 'ipmi_target_channel',
'ipmi_target_address', 'ipmi_local_address',
'deploy_kernel', 'deploy_ramdisk', 'ipmi_protocol_version',
'deploy_kernel', 'deploy_ramdisk',
'force_persistent_boot_device', 'ipmi_protocol_version',
'ipmi_force_boot_device', 'deploy_forces_oob_reboot']
self._check_driver_properties("pxe_ipmitool", expected)
def test_driver_properties_pxe_snmp(self):
expected = ['deploy_kernel', 'deploy_ramdisk',
'force_persistent_boot_device',
'snmp_driver', 'snmp_address', 'snmp_port', 'snmp_version',
'snmp_community', 'snmp_security', 'snmp_outlet',
'deploy_forces_oob_reboot']
@ -5107,7 +5109,7 @@ class ManagerTestHardwareTypeProperties(mgr_utils.ServiceSetUpMixin,
def test_hardware_type_properties_manual_management(self):
expected = ['deploy_kernel', 'deploy_ramdisk',
'deploy_forces_oob_reboot']
'force_persistent_boot_device', 'deploy_forces_oob_reboot']
self._check_hardware_type_properties('manual-management', expected)

View File

@ -66,7 +66,8 @@ class ManualManagementHardwareTestCase(db_base.DbTestCase):
def test_get_properties(self):
# These properties are from vendor (agent) and boot (pxe) interfaces
expected_prop_keys = [
'deploy_forces_oob_reboot', 'deploy_kernel', 'deploy_ramdisk']
'deploy_forces_oob_reboot', 'deploy_kernel', 'deploy_ramdisk',
'force_persistent_boot_device']
hardware_type = driver_factory.get_hardware_type("manual-management")
properties = hardware_type.get_properties()
self.assertEqual(sorted(expected_prop_keys), sorted(properties.keys()))