idrac: inherit driver interface from redfish
With the removal of the wsman interfaces in the idrac driver and only redfish being supported, the idrac driver should inherit from the redfish driver to ensure that it properly supports all the redfish supported interfaces. Furthermore with several of the interfaces being no-op passthru to the redfish implementation there is no reason to not let the user select those interfaces as well. With an eye towards not having to support these in the future, direct users to use the stock redfish versions in the docs as well. Change-Id: I79ab44f31660e6d5311db46223e8bd60d2b3f213 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
parent
58a79bedfa
commit
52fdbb743d
@ -26,7 +26,8 @@ Key features of the Dell iDRAC driver include:
|
|||||||
Ironic Features
|
Ironic Features
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The ``idrac`` hardware type supports the following Ironic interfaces:
|
The ``idrac`` hardware type extends the ``redfish`` hardware type
|
||||||
|
and supports the following Ironic interfaces:
|
||||||
|
|
||||||
* `BIOS Interface`_: BIOS management
|
* `BIOS Interface`_: BIOS management
|
||||||
* `Inspect Interface`_: Hardware inspection
|
* `Inspect Interface`_: Hardware inspection
|
||||||
@ -61,7 +62,7 @@ To enable the ``idrac`` hardware type, add the following to your
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
enabled_hardware_types=idrac
|
enabled_hardware_types=idrac
|
||||||
enabled_management_interfaces=idrac-redfish
|
enabled_management_interfaces=idrac-redfish
|
||||||
enabled_power_interfaces=idrac-redfish
|
enabled_power_interfaces=redfish
|
||||||
|
|
||||||
To enable all optional features (BIOS, inspection, RAID, and vendor passthru),
|
To enable all optional features (BIOS, inspection, RAID, and vendor passthru),
|
||||||
use the following configuration:
|
use the following configuration:
|
||||||
@ -70,7 +71,7 @@ use the following configuration:
|
|||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
enabled_hardware_types=idrac
|
enabled_hardware_types=idrac
|
||||||
enabled_bios_interfaces=idrac-redfish
|
enabled_bios_interfaces=redfish
|
||||||
enabled_firmware_interfaces=redfish
|
enabled_firmware_interfaces=redfish
|
||||||
enabled_inspect_interfaces=idrac-redfish
|
enabled_inspect_interfaces=idrac-redfish
|
||||||
enabled_management_interfaces=idrac-redfish
|
enabled_management_interfaces=idrac-redfish
|
||||||
@ -85,7 +86,8 @@ order:
|
|||||||
Interface Supported Implementations
|
Interface Supported Implementations
|
||||||
================ ===================================================
|
================ ===================================================
|
||||||
``bios`` ``idrac-redfish``, ``no-bios``
|
``bios`` ``idrac-redfish``, ``no-bios``
|
||||||
``boot`` ``ipxe``, ``pxe``, ``idrac-redfish-virtual-media``
|
``boot`` ``ipxe``, ``pxe``, ``http-ipxe``, ``http``,
|
||||||
|
``redfish-https``, ``idrac-redfish-virtual-media``
|
||||||
``console`` ``no-console``
|
``console`` ``no-console``
|
||||||
``deploy`` ``direct``, ``ansible``, ``ramdisk``
|
``deploy`` ``direct``, ``ansible``, ``ramdisk``
|
||||||
``firmware`` ``redfish``, ``no-firmware``
|
``firmware`` ``redfish``, ``no-firmware``
|
||||||
@ -93,11 +95,11 @@ Interface Supported Implementations
|
|||||||
``inspector``, ``no-inspect``
|
``inspector``, ``no-inspect``
|
||||||
``management`` ``idrac-redfish``
|
``management`` ``idrac-redfish``
|
||||||
``network`` ``flat``, ``neutron``, ``noop``
|
``network`` ``flat``, ``neutron``, ``noop``
|
||||||
``power`` ``idrac-redfish``
|
``power`` ``redfish``, ``idrac-redfish``
|
||||||
``raid`` ``idrac-redfish``, ``no-raid``
|
``raid`` ``idrac-redfish``, ``no-raid``
|
||||||
``rescue`` ``no-rescue``, ``agent``
|
``rescue`` ``no-rescue``, ``agent``
|
||||||
``storage`` ``noop``, ``cinder``, ``external``
|
``storage`` ``noop``, ``cinder``, ``external``
|
||||||
``vendor`` ``idrac-redfish``,
|
``vendor`` ``redfish``, ``idrac-redfish``,
|
||||||
``no-vendor``
|
``no-vendor``
|
||||||
================ ===================================================
|
================ ===================================================
|
||||||
|
|
||||||
@ -135,12 +137,12 @@ hardware type using Redfish for all interfaces:
|
|||||||
--driver-info redfish_password=pa$$w0rd \
|
--driver-info redfish_password=pa$$w0rd \
|
||||||
--driver-info redfish_address=drac.host \
|
--driver-info redfish_address=drac.host \
|
||||||
--driver-info redfish_system_id=/redfish/v1/Systems/System.Embedded.1 \
|
--driver-info redfish_system_id=/redfish/v1/Systems/System.Embedded.1 \
|
||||||
--bios-interface idrac-redfish \
|
--bios-interface redfish \
|
||||||
--inspect-interface idrac-redfish \
|
--inspect-interface idrac-redfish \
|
||||||
--management-interface idrac-redfish \
|
--management-interface idrac-redfish \
|
||||||
--power-interface idrac-redfish \
|
--power-interface redfish \
|
||||||
--raid-interface idrac-redfish \
|
--raid-interface idrac-redfish \
|
||||||
--vendor-interface idrac-redfish
|
--vendor-interface redfish
|
||||||
|
|
||||||
BIOS Interface
|
BIOS Interface
|
||||||
==============
|
==============
|
||||||
|
@ -17,7 +17,6 @@ DRAC Driver for remote system management using Dell Remote Access Card.
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from ironic.drivers import generic
|
|
||||||
from ironic.drivers.modules.drac import bios
|
from ironic.drivers.modules.drac import bios
|
||||||
from ironic.drivers.modules.drac import boot
|
from ironic.drivers.modules.drac import boot
|
||||||
from ironic.drivers.modules.drac import inspect as drac_inspect
|
from ironic.drivers.modules.drac import inspect as drac_inspect
|
||||||
@ -25,16 +24,16 @@ from ironic.drivers.modules.drac import management
|
|||||||
from ironic.drivers.modules.drac import power
|
from ironic.drivers.modules.drac import power
|
||||||
from ironic.drivers.modules.drac import raid
|
from ironic.drivers.modules.drac import raid
|
||||||
from ironic.drivers.modules.drac import vendor_passthru
|
from ironic.drivers.modules.drac import vendor_passthru
|
||||||
from ironic.drivers.modules import ipxe
|
from ironic.drivers.modules.redfish import boot as redfish_boot
|
||||||
from ironic.drivers.modules import noop
|
from ironic.drivers.modules.redfish import inspect as redfish_inspect
|
||||||
from ironic.drivers.modules import pxe
|
from ironic.drivers.modules.redfish import raid as redfish_raid
|
||||||
from ironic.drivers.modules.redfish import firmware as redfish_firmware
|
from ironic.drivers import redfish
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class IDRACHardware(generic.GenericHardware):
|
class IDRACHardware(redfish.RedfishHardware):
|
||||||
"""integrated Dell Remote Access Controller hardware type"""
|
"""integrated Dell Remote Access Controller hardware type"""
|
||||||
|
|
||||||
# Required hardware interfaces
|
# Required hardware interfaces
|
||||||
@ -42,7 +41,11 @@ class IDRACHardware(generic.GenericHardware):
|
|||||||
@property
|
@property
|
||||||
def supported_boot_interfaces(self):
|
def supported_boot_interfaces(self):
|
||||||
"""List of supported boot interfaces."""
|
"""List of supported boot interfaces."""
|
||||||
return [ipxe.iPXEBoot, pxe.PXEBoot, boot.DracRedfishVirtualMediaBoot]
|
inherited = super().supported_boot_interfaces
|
||||||
|
# remove the generic redfish one in favor of the Dell specific
|
||||||
|
idx = inherited.index(redfish_boot.RedfishVirtualMediaBoot)
|
||||||
|
inherited[idx] = boot.DracRedfishVirtualMediaBoot
|
||||||
|
return inherited
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_management_interfaces(self):
|
def supported_management_interfaces(self):
|
||||||
@ -52,18 +55,16 @@ class IDRACHardware(generic.GenericHardware):
|
|||||||
@property
|
@property
|
||||||
def supported_power_interfaces(self):
|
def supported_power_interfaces(self):
|
||||||
"""List of supported power interfaces."""
|
"""List of supported power interfaces."""
|
||||||
return [power.DracRedfishPower]
|
return ([power.DracRedfishPower]
|
||||||
|
+ super().supported_power_interfaces)
|
||||||
|
|
||||||
# Optional hardware interfaces
|
# Optional hardware interfaces
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_bios_interfaces(self):
|
def supported_bios_interfaces(self):
|
||||||
"""List of supported bios interfaces."""
|
"""List of supported bios interfaces."""
|
||||||
return [bios.DracRedfishBIOS, noop.NoBIOS]
|
return ([bios.DracRedfishBIOS]
|
||||||
|
+ super().supported_bios_interfaces)
|
||||||
@property
|
|
||||||
def supported_firmware_interfaces(self):
|
|
||||||
return [redfish_firmware.RedfishFirmware, noop.NoFirmware]
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_inspect_interfaces(self):
|
def supported_inspect_interfaces(self):
|
||||||
@ -71,17 +72,23 @@ class IDRACHardware(generic.GenericHardware):
|
|||||||
# Inspector support should have a higher priority than NoInspect
|
# Inspector support should have a higher priority than NoInspect
|
||||||
# if it is enabled by an operator (implying that the service is
|
# if it is enabled by an operator (implying that the service is
|
||||||
# installed).
|
# installed).
|
||||||
return [drac_inspect.DracRedfishInspect] + super(
|
inherited = super().supported_inspect_interfaces
|
||||||
IDRACHardware, self).supported_inspect_interfaces
|
# remove the generic redfish one in favor of the Dell specific
|
||||||
|
idx = inherited.index(redfish_inspect.RedfishInspect)
|
||||||
|
inherited[idx] = drac_inspect.DracRedfishInspect
|
||||||
|
return inherited
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_raid_interfaces(self):
|
def supported_raid_interfaces(self):
|
||||||
"""List of supported raid interfaces."""
|
"""List of supported raid interfaces."""
|
||||||
return [raid.DracRedfishRAID] + super(
|
inherited = super().supported_raid_interfaces
|
||||||
IDRACHardware, self).supported_raid_interfaces
|
# remove the generic redfish one in favor of the Dell specific
|
||||||
|
idx = inherited.index(redfish_raid.RedfishRAID)
|
||||||
|
inherited[idx] = raid.DracRedfishRAID
|
||||||
|
return inherited
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_vendor_interfaces(self):
|
def supported_vendor_interfaces(self):
|
||||||
"""List of supported vendor interfaces."""
|
"""List of supported vendor interfaces."""
|
||||||
return [vendor_passthru.DracRedfishVendorPassthru,
|
return ([vendor_passthru.DracRedfishVendorPassthru]
|
||||||
noop.NoVendor]
|
+ super().supported_vendor_interfaces)
|
||||||
|
@ -26,3 +26,5 @@ class DracRedfishBIOS(redfish_bios.RedfishBIOS):
|
|||||||
specific incompatibilities and introduction of vendor value added
|
specific incompatibilities and introduction of vendor value added
|
||||||
should be implemented by this class.
|
should be implemented by this class.
|
||||||
"""
|
"""
|
||||||
|
# NOTE(cardoe): deprecated in favor of plain Redfish
|
||||||
|
supported = False
|
||||||
|
@ -27,4 +27,5 @@ class DracRedfishPower(redfish_power.RedfishPower):
|
|||||||
specific incompatibilities and introduction of vendor value added
|
specific incompatibilities and introduction of vendor value added
|
||||||
should be implemented by this class.
|
should be implemented by this class.
|
||||||
"""
|
"""
|
||||||
pass
|
# NOTE(cardoe): deprecated in favor of plain Redfish
|
||||||
|
supported = False
|
||||||
|
@ -23,3 +23,5 @@ class DracRedfishVendorPassthru(redfish_vendor.RedfishVendorPassthru):
|
|||||||
|
|
||||||
Use the Redfish implementation for vendor passthru.
|
Use the Redfish implementation for vendor passthru.
|
||||||
"""
|
"""
|
||||||
|
# NOTE(cardoe): deprecated in favor of plain Redfish
|
||||||
|
supported = False
|
||||||
|
@ -21,6 +21,7 @@ from ironic.drivers.modules import inspector
|
|||||||
from ironic.drivers.modules import ipxe
|
from ironic.drivers.modules import ipxe
|
||||||
from ironic.drivers.modules.network import flat as flat_net
|
from ironic.drivers.modules.network import flat as flat_net
|
||||||
from ironic.drivers.modules import noop
|
from ironic.drivers.modules import noop
|
||||||
|
from ironic.drivers.modules import redfish
|
||||||
from ironic.drivers.modules.storage import noop as noop_storage
|
from ironic.drivers.modules.storage import noop as noop_storage
|
||||||
from ironic.tests.unit.db import base as db_base
|
from ironic.tests.unit.db import base as db_base
|
||||||
from ironic.tests.unit.objects import utils as obj_utils
|
from ironic.tests.unit.objects import utils as obj_utils
|
||||||
@ -35,7 +36,7 @@ class IDRACHardwareTestCase(db_base.DbTestCase):
|
|||||||
enabled_boot_interfaces=[
|
enabled_boot_interfaces=[
|
||||||
'idrac-redfish-virtual-media', 'ipxe', 'pxe'],
|
'idrac-redfish-virtual-media', 'ipxe', 'pxe'],
|
||||||
enabled_management_interfaces=['idrac-redfish'],
|
enabled_management_interfaces=['idrac-redfish'],
|
||||||
enabled_power_interfaces=['idrac-redfish'],
|
enabled_power_interfaces=['idrac-redfish', 'redfish'],
|
||||||
enabled_inspect_interfaces=[
|
enabled_inspect_interfaces=[
|
||||||
'idrac-redfish', 'inspector',
|
'idrac-redfish', 'inspector',
|
||||||
'no-inspect'],
|
'no-inspect'],
|
||||||
@ -43,8 +44,10 @@ class IDRACHardwareTestCase(db_base.DbTestCase):
|
|||||||
enabled_raid_interfaces=[
|
enabled_raid_interfaces=[
|
||||||
'idrac-redfish', 'no-raid',
|
'idrac-redfish', 'no-raid',
|
||||||
'agent'],
|
'agent'],
|
||||||
enabled_vendor_interfaces=['idrac-redfish', 'no-vendor'],
|
enabled_vendor_interfaces=[
|
||||||
enabled_bios_interfaces=['idrac-redfish', 'no-bios'])
|
'idrac-redfish', 'redfish', 'no-vendor'],
|
||||||
|
enabled_bios_interfaces=[
|
||||||
|
'idrac-redfish', 'redfish', 'no-bios'])
|
||||||
|
|
||||||
def _validate_interfaces(self, driver, **kwargs):
|
def _validate_interfaces(self, driver, **kwargs):
|
||||||
self.assertIsInstance(
|
self.assertIsInstance(
|
||||||
@ -120,30 +123,37 @@ class IDRACHardwareTestCase(db_base.DbTestCase):
|
|||||||
self._validate_interfaces(task.driver,
|
self._validate_interfaces(task.driver,
|
||||||
raid=drac.raid.DracRedfishRAID)
|
raid=drac.raid.DracRedfishRAID)
|
||||||
|
|
||||||
def test_override_no_vendor(self):
|
def test_override_with_redfish_vendor(self):
|
||||||
node = obj_utils.create_test_node(self.context, driver='idrac',
|
for iface, impl in [('redfish',
|
||||||
vendor_interface='no-vendor')
|
redfish.vendor.RedfishVendorPassthru),
|
||||||
with task_manager.acquire(self.context, node.id) as task:
|
('no-vendor', noop.NoVendor)]:
|
||||||
self._validate_interfaces(task.driver,
|
node = obj_utils.create_test_node(self.context,
|
||||||
vendor=noop.NoVendor)
|
uuid=uuidutils.generate_uuid(),
|
||||||
|
driver='idrac',
|
||||||
|
vendor_interface=iface)
|
||||||
|
with task_manager.acquire(self.context, node.id) as task:
|
||||||
|
self._validate_interfaces(task.driver,
|
||||||
|
vendor=impl)
|
||||||
|
|
||||||
def test_override_with_redfish_management_and_power(self):
|
def test_override_with_redfish_management_and_power(self):
|
||||||
node = obj_utils.create_test_node(self.context, driver='idrac',
|
node = obj_utils.create_test_node(self.context, driver='idrac',
|
||||||
management_interface='idrac-redfish',
|
management_interface='idrac-redfish',
|
||||||
power_interface='idrac-redfish')
|
power_interface='redfish')
|
||||||
with task_manager.acquire(self.context, node.id) as task:
|
with task_manager.acquire(self.context, node.id) as task:
|
||||||
self._validate_interfaces(
|
self._validate_interfaces(
|
||||||
task.driver,
|
task.driver,
|
||||||
management=drac.management.DracRedfishManagement,
|
management=drac.management.DracRedfishManagement,
|
||||||
power=drac.power.DracRedfishPower)
|
power=redfish.power.RedfishPower)
|
||||||
|
|
||||||
def test_override_with_redfish_bios(self):
|
def test_override_with_redfish_bios(self):
|
||||||
node = obj_utils.create_test_node(self.context, driver='idrac',
|
for iface, impl in [('redfish', redfish.bios.RedfishBIOS),
|
||||||
bios_interface='idrac-redfish')
|
('no-bios', noop.NoBIOS)]:
|
||||||
with task_manager.acquire(self.context, node.id) as task:
|
node = obj_utils.create_test_node(self.context,
|
||||||
self._validate_interfaces(
|
uuid=uuidutils.generate_uuid(),
|
||||||
task.driver,
|
driver='idrac',
|
||||||
bios=drac.bios.DracRedfishBIOS)
|
bios_interface=iface)
|
||||||
|
with task_manager.acquire(self.context, node.id) as task:
|
||||||
|
self._validate_interfaces(task.driver, bios=impl)
|
||||||
|
|
||||||
def test_override_with_redfish_inspect(self):
|
def test_override_with_redfish_inspect(self):
|
||||||
node = obj_utils.create_test_node(self.context, driver='idrac',
|
node = obj_utils.create_test_node(self.context, driver='idrac',
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Make the ``idrac`` hardware type inherit from the ``redfish`` hardware
|
||||||
|
type since the ``idrac`` hardware type is an extension of the ``redfish``
|
||||||
|
with Dell specific overrides. This will ensure that features available
|
||||||
|
to the ``redfish`` hardware type will always be available to ``idrac``.
|
||||||
|
Added ``redfish`` interface as available for the ``bios``, ``power``
|
||||||
|
and ``vendor`` interfaces of the ``idrac`` hardware type.
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
Deprecates the ``idrac-redfish`` interfaces in favor of the ``redfish``
|
||||||
|
interfaces for the ``bios``, ``power``, and ``vendor`` interfaces. This
|
||||||
|
is a no-op change as these interfaces wrapped the ``redfish`` interface
|
||||||
|
with no change already.
|
Loading…
x
Reference in New Issue
Block a user