diff --git a/ironic/drivers/drac.py b/ironic/drivers/drac.py index bef9b66017..73afa57d39 100644 --- a/ironic/drivers/drac.py +++ b/ironic/drivers/drac.py @@ -55,7 +55,8 @@ class IDRACHardware(generic.GenericHardware): # if it is enabled by an operator (implying that the service is # installed). return [drac_inspect.DracWSManInspect, drac_inspect.DracInspect, - inspector.Inspector, noop.NoInspect] + drac_inspect.DracRedfishInspect, inspector.Inspector, + noop.NoInspect] @property def supported_raid_interfaces(self): diff --git a/ironic/drivers/modules/drac/inspect.py b/ironic/drivers/modules/drac/inspect.py index f871a2e3dd..b944d3a2eb 100644 --- a/ironic/drivers/modules/drac/inspect.py +++ b/ironic/drivers/modules/drac/inspect.py @@ -26,6 +26,7 @@ from ironic.common import states from ironic.common import utils from ironic.drivers import base from ironic.drivers.modules.drac import common as drac_common +from ironic.drivers.modules.redfish import inspect as redfish_inspect from ironic import objects drac_exceptions = importutils.try_import('dracclient.exceptions') @@ -35,6 +36,17 @@ LOG = logging.getLogger(__name__) METRICS = metrics_utils.get_metrics_logger(__name__) +class DracRedfishInspect(redfish_inspect.RedfishInspect): + """iDRAC Redfish interface for inspection-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. + """ + pass + + class DracWSManInspect(base.InspectInterface): def get_properties(self): diff --git a/ironic/tests/unit/drivers/test_drac.py b/ironic/tests/unit/drivers/test_drac.py index 69dd89eb96..3dfe50424c 100644 --- a/ironic/tests/unit/drivers/test_drac.py +++ b/ironic/tests/unit/drivers/test_drac.py @@ -31,11 +31,12 @@ class IDRACHardwareTestCase(db_base.DbTestCase): super(IDRACHardwareTestCase, self).setUp() self.config(enabled_hardware_types=['idrac'], enabled_management_interfaces=[ - 'idrac', 'idrac-wsman', 'idrac-redfish'], + 'idrac', 'idrac-redfish', 'idrac-wsman'], enabled_power_interfaces=[ - 'idrac', 'idrac-wsman', 'idrac-redfish'], + 'idrac', 'idrac-redfish', 'idrac-wsman'], enabled_inspect_interfaces=[ - 'idrac', 'idrac-wsman', 'inspector', 'no-inspect'], + 'idrac', 'idrac-redfish', 'idrac-wsman', 'inspector', + 'no-inspect'], enabled_network_interfaces=['flat', 'neutron', 'noop'], enabled_raid_interfaces=[ 'idrac', 'idrac-wsman', 'no-raid'], @@ -140,3 +141,11 @@ class IDRACHardwareTestCase(db_base.DbTestCase): task.driver, management=drac.management.DracRedfishManagement, power=drac.power.DracRedfishPower) + + def test_override_with_redfish_inspect(self): + node = obj_utils.create_test_node(self.context, driver='idrac', + inspect_interface='idrac-redfish') + with task_manager.acquire(self.context, node.id) as task: + self._validate_interfaces( + task.driver, + inspect=drac.inspect.DracRedfishInspect) diff --git a/releasenotes/notes/idrac-add-redfish-inspect-support-ce74bd3d4a97b588.yaml b/releasenotes/notes/idrac-add-redfish-inspect-support-ce74bd3d4a97b588.yaml new file mode 100644 index 0000000000..e577a21fc3 --- /dev/null +++ b/releasenotes/notes/idrac-add-redfish-inspect-support-ce74bd3d4a97b588.yaml @@ -0,0 +1,18 @@ +--- +features: + - | + Adds ``idrac`` hardware type support of an inspect 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 inspect interface implementations + it has been supporting. The highest priority inspect interfaces + remain the same, those which rely on the Web Services Management + (WS-Man) OOB management protocol. The new 'idrac-redfish' + immediately follows those. It now supports the following inspect + interface implementations, listed in priority order from highest to + lowest: ``idrac-wsman``, ``idrac``, ``idrac-redfish``, + ``inspector``, and ``no-inspect``. diff --git a/setup.cfg b/setup.cfg index ada0c88cad..4a4c9c84ce 100644 --- a/setup.cfg +++ b/setup.cfg @@ -89,6 +89,7 @@ ironic.hardware.interfaces.deploy = ironic.hardware.interfaces.inspect = fake = ironic.drivers.modules.fake:FakeInspect idrac = ironic.drivers.modules.drac.inspect:DracInspect + idrac-redfish = ironic.drivers.modules.drac.inspect:DracRedfishInspect idrac-wsman = ironic.drivers.modules.drac.inspect:DracWSManInspect ilo = ironic.drivers.modules.ilo.inspect:IloInspect inspector = ironic.drivers.modules.inspector:Inspector