summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAija Jauntēva <aija.jaunteva@dell.com>2020-09-01 06:52:34 -0400
committerDmitry Tantsur <dtantsur@protonmail.com>2020-09-23 13:34:50 +0000
commit796e2302c3d7dc5f010b837b33b85819f4dcacb1 (patch)
tree3350bee0e4e9793e7abeadf241dad8fc74b06640
parent65d50663941ffe66be587e09d0c63528f970dabd (diff)
downloadironic-796e2302c3d7dc5f010b837b33b85819f4dcacb1.tar.gz
Add Redfish BIOS interface to idrac HW type
This change adds idrac hardware type support of a BIOS interface implementation that utilizes the Redfish out-of-band (OOB) management protocol and is compatible with the integrated Dell Remote Access Controller (iDRAC) baseboard management controller (BMC). 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. Co-Authored-By: Eric Barrera <eric_barrera@dell.com> Co-Authored-By: Richard G. Pioso <richard.pioso@dell.com> Co-Authored-By: Mike Raineri <mraineri@gmail.com> Story: 2008100 Task: 40803 Depends-On: https://review.opendev.org/#/c/750020/ Change-Id: Ic5a1da418dccb0f3ec92914909aacd7c339d8837
-rw-r--r--doc/source/admin/drivers/idrac.rst14
-rw-r--r--ironic/drivers/drac.py2
-rw-r--r--ironic/drivers/modules/drac/bios.py11
-rw-r--r--ironic/tests/unit/drivers/test_drac.py14
-rw-r--r--releasenotes/notes/idrac-add-redfish-bios-support-3633d2fc94d31f62.yaml19
-rw-r--r--setup.cfg1
6 files changed, 53 insertions, 8 deletions
diff --git a/doc/source/admin/drivers/idrac.rst b/doc/source/admin/drivers/idrac.rst
index 796b09edb..54e904320 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 453f17876..9c58ea079 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 cb306f7fb..bc09c0176 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 8a551070b..94210e21f 100644
--- a/ironic/tests/unit/drivers/test_drac.py
+++ b/ironic/tests/unit/drivers/test_drac.py
@@ -48,7 +48,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(
@@ -65,6 +65,10 @@ class IDRACHardwareTestCase(db_base.DbTestCase):
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))
@@ -152,6 +156,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 000000000..58d575632
--- /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
+ <https://storyboard.openstack.org/#!/story/2008100>`_.
diff --git a/setup.cfg b/setup.cfg
index c314e21a5..5a5e6107f 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