diff --git a/doc/source/admin/drivers/idrac.rst b/doc/source/admin/drivers/idrac.rst index 796b09edb7..54e904320c 100644 --- a/doc/source/admin/drivers/idrac.rst +++ b/doc/source/admin/drivers/idrac.rst @@ -54,7 +54,7 @@ Enabling The iDRAC driver supports WSMAN for the bios, inspect, management, power, raid, and vendor interfaces. In addition, it supports Redfish for -the inspect, management, and power interfaces. The iDRAC driver +the bios, inspect, management, and power interfaces. The iDRAC driver allows you to mix and match WSMAN and Redfish interfaces. The ``idrac-wsman`` implementation must be enabled to use WSMAN for @@ -62,7 +62,7 @@ an interface. The ``idrac-redfish`` implementation must be enabled to use Redfish for an interface. .. NOTE:: - Redfish is supported for only the inspect, management, and power + Redfish is supported for only the bios, inspect, management, and power interfaces at the present time. To enable the ``idrac`` hardware type with the minimum interfaces, @@ -83,7 +83,7 @@ following configuration: [DEFAULT] enabled_hardware_types=idrac - enabled_bios_interfaces=idrac-wsman + enabled_bios_interfaces=idrac-redfish enabled_inspect_interfaces=idrac-redfish enabled_management_interfaces=idrac-redfish enabled_power_interfaces=idrac-redfish @@ -96,7 +96,7 @@ order: ================ =================================================== Interface Supported Implementations ================ =================================================== -``bios`` ``idrac-wsman``, ``no-bios`` +``bios`` ``idrac-wsman``, ``idrac-redfish``, ``no-bios`` ``boot`` ``ipxe``, ``pxe`` ``console`` ``no-console`` ``deploy`` ``iscsi``, ``direct``, ``ansible``, ``ramdisk`` @@ -174,6 +174,7 @@ hardware type using Redfish for all interfaces: --driver-info redfish_password=pa$$w0rd \ --driver-info redfish_address=drac.host \ --driver-info redfish_system_id=/redfish/v1/Systems/System.Embedded.1 \ + --bios-interface idrac-redfish \ --inspect-interface idrac-redfish \ --management-interface idrac-redfish \ --power-interface idrac-redfish \ @@ -193,6 +194,7 @@ hardware type assuming a mix of Redfish and WSMAN interfaces are used: --driver-info redfish_password=pa$$w0rd \ --driver-info redfish_address=drac.host \ --driver-info redfish_system_id=/redfish/v1/Systems/System.Embedded.1 \ + --bios-interface idrac-redfish \ --inspect-interface idrac-redfish \ --management-interface idrac-redfish \ --power-interface idrac-redfish @@ -205,8 +207,8 @@ hardware type assuming a mix of Redfish and WSMAN interfaces are used: BIOS Interface ============== -The BIOS interface implementation for idrac-wsman allows BIOS to be -configured with the standard clean/deploy step approach. +The BIOS interface implementations supported by the ``idrac`` hardware type +allows BIOS to be configured with the standard clean/deploy step approach. Example ------- diff --git a/ironic/drivers/drac.py b/ironic/drivers/drac.py index 453f178764..9c58ea079e 100644 --- a/ironic/drivers/drac.py +++ b/ironic/drivers/drac.py @@ -59,7 +59,7 @@ class IDRACHardware(generic.GenericHardware): @property def supported_bios_interfaces(self): """List of supported bios interfaces.""" - return [bios.DracWSManBIOS, noop.NoBIOS] + return [bios.DracWSManBIOS, bios.DracRedfishBIOS, noop.NoBIOS] @property def supported_inspect_interfaces(self): diff --git a/ironic/drivers/modules/drac/bios.py b/ironic/drivers/modules/drac/bios.py index cb306f7fb4..bc09c0176c 100644 --- a/ironic/drivers/modules/drac/bios.py +++ b/ironic/drivers/modules/drac/bios.py @@ -29,6 +29,7 @@ from ironic.drivers import base from ironic.drivers.modules import deploy_utils from ironic.drivers.modules.drac import common as drac_common from ironic.drivers.modules.drac import job as drac_job +from ironic.drivers.modules.redfish import bios as redfish_bios from ironic import objects drac_exceptions = importutils.try_import('dracclient.exceptions') @@ -38,6 +39,16 @@ LOG = logging.getLogger(__name__) METRICS = metrics_utils.get_metrics_logger(__name__) +class DracRedfishBIOS(redfish_bios.RedfishBIOS): + """iDRAC Redfish interface for BIOS settings-related actions. + + Presently, this class entirely defers to its base class, a generic, + vendor-independent Redfish interface. Future resolution of Dell EMC- + specific incompatibilities and introduction of vendor value added + should be implemented by this class. + """ + + class DracWSManBIOS(base.BIOSInterface): """BIOSInterface Implementation for iDRAC.""" diff --git a/ironic/tests/unit/drivers/test_drac.py b/ironic/tests/unit/drivers/test_drac.py index a53bb76cac..554c04eaec 100644 --- a/ironic/tests/unit/drivers/test_drac.py +++ b/ironic/tests/unit/drivers/test_drac.py @@ -47,7 +47,7 @@ class IDRACHardwareTestCase(db_base.DbTestCase): enabled_vendor_interfaces=[ 'idrac', 'idrac-wsman', 'no-vendor'], enabled_bios_interfaces=[ - 'idrac-wsman', 'no-bios']) + 'idrac-wsman', 'idrac-redfish', 'no-bios']) def _validate_interfaces(self, driver, **kwargs): self.assertIsInstance( @@ -63,6 +63,10 @@ class IDRACHardwareTestCase(db_base.DbTestCase): driver.power, kwargs.get('power', drac.power.DracWSManPower)) + self.assertIsInstance( + driver.bios, + kwargs.get('bios', drac.bios.DracWSManBIOS)) + self.assertIsInstance( driver.console, kwargs.get('console', noop.NoConsole)) @@ -142,6 +146,14 @@ class IDRACHardwareTestCase(db_base.DbTestCase): management=drac.management.DracRedfishManagement, power=drac.power.DracRedfishPower) + def test_override_with_redfish_bios(self): + node = obj_utils.create_test_node(self.context, driver='idrac', + bios_interface='idrac-redfish') + with task_manager.acquire(self.context, node.id) as task: + self._validate_interfaces( + task.driver, + bios=drac.bios.DracRedfishBIOS) + def test_override_with_redfish_inspect(self): node = obj_utils.create_test_node(self.context, driver='idrac', inspect_interface='idrac-redfish') diff --git a/releasenotes/notes/idrac-add-redfish-bios-support-3633d2fc94d31f62.yaml b/releasenotes/notes/idrac-add-redfish-bios-support-3633d2fc94d31f62.yaml new file mode 100644 index 0000000000..58d5756322 --- /dev/null +++ b/releasenotes/notes/idrac-add-redfish-bios-support-3633d2fc94d31f62.yaml @@ -0,0 +1,19 @@ +--- +features: + - | + Adds support for managing BIOS settings via the Redfish out-of-band + (OOB) management protocol to the ``idrac`` hardware type. The new + hardware BIOS interface implementation which offers it is named + ``idrac-redfish``. + + The ``idrac`` hardware type declares support for that new interface + implementation, in addition to all BIOS interface implementations it + has been supporting. The highest priority BIOS interface remains the + same, the one which relies on the Web Services Management (WS-Man) + OOB management protocol. The new ``idrac-redfish`` immediately + follows it. It now supports the following BIOS interface + implementations, listed in priority order from highest to lowest: + ``idrac-wsman``, ``idrac-redfish``, and ``no-bios``. + + For more information, see `story 2008100 + `_. diff --git a/setup.cfg b/setup.cfg index f4beb96a5e..75da36990f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,6 +57,7 @@ ironic.dhcp = ironic.hardware.interfaces.bios = fake = ironic.drivers.modules.fake:FakeBIOS + idrac-redfish = ironic.drivers.modules.drac.bios:DracRedfishBIOS idrac-wsman = ironic.drivers.modules.drac.bios:DracWSManBIOS ilo = ironic.drivers.modules.ilo.bios:IloBIOS irmc = ironic.drivers.modules.irmc.bios:IRMCBIOS