From 95f17098ca26e90b969dbaa1f6ef2f7533968796 Mon Sep 17 00:00:00 2001 From: "Haomeng, Wang" Date: Fri, 28 Nov 2014 08:22:17 +0000 Subject: [PATCH] boot_devices.PXE value should match with pyghmi define pyghmi ipmicmd.get_bootdev() returns 'network' for pxe boot mode. However ipminative defines 'net' as the name, so it does not match with pyghmi return value. In this patch, we redefine boot_devices.PXE value to 'network' which match pyghmi. Change-Id: Ic19597d2e577098a08e5ca2c5c6f0660200fc1cb Closes-Bug: 1397212 --- ironic/drivers/modules/ipminative.py | 2 +- ironic/tests/drivers/test_ipminative.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ironic/drivers/modules/ipminative.py b/ironic/drivers/modules/ipminative.py index c7739b137e..c629b39766 100644 --- a/ironic/drivers/modules/ipminative.py +++ b/ironic/drivers/modules/ipminative.py @@ -71,7 +71,7 @@ CONSOLE_PROPERTIES = { _BOOT_DEVICES_MAP = { boot_devices.DISK: 'hd', - boot_devices.PXE: 'net', + boot_devices.PXE: 'network', boot_devices.CDROM: 'cdrom', boot_devices.BIOS: 'setup', } diff --git a/ironic/tests/drivers/test_ipminative.py b/ironic/tests/drivers/test_ipminative.py index d11f127e93..df1b856cfe 100644 --- a/ironic/tests/drivers/test_ipminative.py +++ b/ironic/tests/drivers/test_ipminative.py @@ -298,8 +298,8 @@ class IPMINativeDriverTestCase(db_base.DbTestCase): with task_manager.acquire(self.context, self.node.uuid) as task: self.driver.management.set_boot_device(task, boot_devices.PXE) - # PXE is converted to 'net' internally by ipminative - ipmicmd.set_bootdev.assert_called_once_with('net', persist=False) + # PXE is converted to 'network' internally by ipminative + ipmicmd.set_bootdev.assert_called_once_with('network', persist=False) def test_set_boot_device_bad_device(self): with task_manager.acquire(self.context, self.node.uuid) as task: