Merge "Add Redfish BIOS interface to idrac HW type"

This commit is contained in:
Zuul 2020-09-25 02:32:22 +00:00 committed by Gerrit Code Review
commit 484dcd5b60
6 changed files with 53 additions and 8 deletions

View File

@ -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
-------

View File

@ -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):

View File

@ -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."""

View File

@ -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')

View File

@ -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>`_.

View File

@ -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