Add Redfish inspect interface to idrac HW type

This change 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.

Co-Authored-By: Richard G. Pioso <richard.pioso@dell.com>
Change-Id: I6d8f5cd629e2e17eb86b6f8154a605050e0c7abe
This commit is contained in:
mpardhi23 2019-09-12 09:22:45 -04:00 committed by Richard Pioso
parent 03471be1ed
commit 62579800fb
5 changed files with 45 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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

View File

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