Enable Redfish by default

Redfish has become an established technology with growing popularity.
By enabling it by default we make it easier for operators to use Ironic,
especially its advanced features, out of box.

Bump stevedore to match sushy.

Change-Id: I94dd4066ac598a7e5c2e0812e1ff286de5d164a2
This commit is contained in:
Dmitry Tantsur 2021-11-04 17:12:25 +01:00
parent 4bb7e53738
commit 76e99a30f7
7 changed files with 17 additions and 155 deletions

View File

@ -10,9 +10,6 @@ python-scciclient>=0.8.0
python-dracclient>=5.1.0,<8.0.0
python-xclarityclient>=0.1.6
# The Redfish hardware type uses the Sushy library
sushy>=3.10.0
# Ansible-deploy interface
ansible>=2.7

View File

@ -85,7 +85,7 @@ api_opts = [
driver_opts = [
cfg.ListOpt('enabled_hardware_types',
default=['ipmi'],
default=['ipmi', 'redfish'],
help=_('Specify the list of hardware types to load during '
'service initialization. Missing hardware types, or '
'hardware types which fail to initialize, will prevent '
@ -96,12 +96,12 @@ driver_opts = [
'system may be found by enumerating the '
'"ironic.hardware.types" entrypoint.')),
cfg.ListOpt('enabled_bios_interfaces',
default=['no-bios'],
default=['no-bios', 'redfish'],
help=_ENABLED_IFACE_HELP.format('bios')),
cfg.StrOpt('default_bios_interface',
help=_DEFAULT_IFACE_HELP.format('bios')),
cfg.ListOpt('enabled_boot_interfaces',
default=['pxe'],
default=['pxe', 'redfish-virtual-media'],
help=_ENABLED_IFACE_HELP.format('boot')),
cfg.StrOpt('default_boot_interface',
help=_DEFAULT_IFACE_HELP.format('boot')),
@ -116,12 +116,12 @@ driver_opts = [
cfg.StrOpt('default_deploy_interface',
help=_DEFAULT_IFACE_HELP.format('deploy')),
cfg.ListOpt('enabled_inspect_interfaces',
default=['no-inspect'],
default=['no-inspect', 'redfish'],
help=_ENABLED_IFACE_HELP.format('inspect')),
cfg.StrOpt('default_inspect_interface',
help=_DEFAULT_IFACE_HELP.format('inspect')),
cfg.ListOpt('enabled_management_interfaces',
default=['ipmitool'],
default=['ipmitool', 'redfish'],
help=_ENABLED_IFACE_HELP.format('management')),
cfg.StrOpt('default_management_interface',
help=_DEFAULT_IFACE_HELP.format('management')),
@ -131,12 +131,12 @@ driver_opts = [
cfg.StrOpt('default_network_interface',
help=_DEFAULT_IFACE_HELP.format('network')),
cfg.ListOpt('enabled_power_interfaces',
default=['ipmitool'],
default=['ipmitool', 'redfish'],
help=_ENABLED_IFACE_HELP.format('power')),
cfg.StrOpt('default_power_interface',
help=_DEFAULT_IFACE_HELP.format('power')),
cfg.ListOpt('enabled_raid_interfaces',
default=['agent', 'no-raid'],
default=['agent', 'no-raid', 'redfish'],
help=_ENABLED_IFACE_HELP.format('raid')),
cfg.StrOpt('default_raid_interface',
help=_DEFAULT_IFACE_HELP.format('raid')),
@ -152,7 +152,7 @@ driver_opts = [
default='noop',
help=_DEFAULT_IFACE_HELP.format('storage')),
cfg.ListOpt('enabled_vendor_interfaces',
default=['ipmitool', 'no-vendor'],
default=['ipmitool', 'redfish', 'no-vendor'],
help=_ENABLED_IFACE_HELP.format('vendor')),
cfg.StrOpt('default_vendor_interface',
help=_DEFAULT_IFACE_HELP.format('vendor')),

View File

@ -120,73 +120,6 @@ REDFISH_SPEC = (
'redfish',
)
SUSHY_SPEC = (
'auth',
'exceptions',
'Sushy',
'BOOT_SOURCE_TARGET_PXE',
'BOOT_SOURCE_TARGET_HDD',
'BOOT_SOURCE_TARGET_CD',
'BOOT_SOURCE_TARGET_BIOS_SETUP',
'CHASSIS_INDICATOR_LED_LIT',
'CHASSIS_INDICATOR_LED_BLINKING',
'CHASSIS_INDICATOR_LED_OFF',
'CHASSIS_INDICATOR_LED_UNKNOWN',
'DRIVE_INDICATOR_LED_LIT',
'DRIVE_INDICATOR_LED_BLINKING',
'DRIVE_INDICATOR_LED_OFF',
'DRIVE_INDICATOR_LED_UNKNOWN',
'INDICATOR_LED_LIT',
'INDICATOR_LED_BLINKING',
'INDICATOR_LED_OFF',
'INDICATOR_LED_UNKNOWN',
'SYSTEM_POWER_STATE_ON',
'SYSTEM_POWER_STATE_POWERING_ON',
'SYSTEM_POWER_STATE_OFF',
'SYSTEM_POWER_STATE_POWERING_OFF',
'RESET_ON',
'RESET_FORCE_OFF',
'RESET_GRACEFUL_SHUTDOWN',
'RESET_GRACEFUL_RESTART',
'RESET_FORCE_RESTART',
'RESET_NMI',
'BOOT_SOURCE_ENABLED_CONTINUOUS',
'BOOT_SOURCE_ENABLED_ONCE',
'BOOT_SOURCE_MODE_BIOS',
'BOOT_SOURCE_MODE_UEFI',
'PROCESSOR_ARCH_x86',
'PROCESSOR_ARCH_IA_64',
'PROCESSOR_ARCH_ARM',
'PROCESSOR_ARCH_MIPS',
'PROCESSOR_ARCH_OEM',
'PROTOCOL_TYPE_iSCSI',
'PROTOCOL_TYPE_SAS',
'PROTOCOL_TYPE_SATA',
'STATE_ENABLED',
'STATE_DISABLED',
'STATE_ABSENT',
'VIRTUAL_MEDIA_CD',
'VIRTUAL_MEDIA_FLOPPY',
'VIRTUAL_MEDIA_USBSTICK',
'APPLY_TIME_IMMEDIATE',
'APPLY_TIME_ON_RESET',
'TASK_STATE_COMPLETED',
'HEALTH_OK',
'HEALTH_WARNING',
'SECURE_BOOT_RESET_KEYS_TO_DEFAULT',
'SECURE_BOOT_RESET_KEYS_DELETE_ALL',
'VOLUME_TYPE_RAW_DEVICE',
'SEVERITY_OK',
'SEVERITY_WARNING',
'SEVERITY_CRITICAL',
)
SUSHY_AUTH_SPEC = (
'BasicAuth',
'SessionAuth',
'SessionOrBasicAuth',
)
XCLARITY_SPEC = (
'client',
'states',

View File

@ -196,81 +196,6 @@ class MockKwargsException(Exception):
self.kwargs = kwargs
sushy = importutils.try_import('sushy')
if not sushy:
sushy = mock.MagicMock(
spec_set=mock_specs.SUSHY_SPEC,
BOOT_SOURCE_TARGET_PXE='Pxe',
BOOT_SOURCE_TARGET_HDD='Hdd',
BOOT_SOURCE_TARGET_CD='Cd',
BOOT_SOURCE_TARGET_BIOS_SETUP='BiosSetup',
INDICATOR_LED_LIT='indicator led lit',
INDICATOR_LED_BLINKING='indicator led blinking',
INDICATOR_LED_OFF='indicator led off',
INDICATOR_LED_UNKNOWN='indicator led unknown',
SYSTEM_POWER_STATE_ON='on',
SYSTEM_POWER_STATE_POWERING_ON='powering on',
SYSTEM_POWER_STATE_OFF='off',
SYSTEM_POWER_STATE_POWERING_OFF='powering off',
RESET_ON='on',
RESET_FORCE_OFF='force off',
RESET_GRACEFUL_SHUTDOWN='graceful shutdown',
RESET_GRACEFUL_RESTART='graceful restart',
RESET_FORCE_RESTART='force restart',
RESET_NMI='nmi',
BOOT_SOURCE_ENABLED_CONTINUOUS='continuous',
BOOT_SOURCE_ENABLED_ONCE='once',
BOOT_SOURCE_MODE_BIOS='bios',
BOOT_SOURCE_MODE_UEFI='uefi',
PROCESSOR_ARCH_x86='x86 or x86-64',
PROCESSOR_ARCH_IA_64='Intel Itanium',
PROCESSOR_ARCH_ARM='ARM',
PROCESSOR_ARCH_MIPS='MIPS',
PROCESSOR_ARCH_OEM='OEM-defined',
PROTOCOL_TYPE_iSCSI='Internet SCSI',
PROTOCOL_TYPE_SAS='Serial Attached SCSI',
PROTOCOL_TYPE_SATA='Serial AT Attachment',
STATE_ENABLED='enabled',
STATE_DISABLED='disabled',
STATE_ABSENT='absent',
VIRTUAL_MEDIA_CD='cd',
VIRTUAL_MEDIA_FLOPPY='floppy',
VIRTUAL_MEDIA_USBSTICK='usb',
APPLY_TIME_IMMEDIATE='immediate',
APPLY_TIME_ON_RESET='on reset',
TASK_STATE_COMPLETED='completed',
HEALTH_OK='ok',
HEALTH_WARNING='warning',
SECURE_BOOT_RESET_KEYS_TO_DEFAULT="ResetAllKeysToDefault",
SECURE_BOOT_RESET_KEYS_DELETE_ALL="DeleteAllKeys",
VOLUME_TYPE_RAW_DEVICE='rawdevice',
SEVERITY_OK='ok',
SEVERITY_WARNING='warning',
SEVERITY_CRITICAL='critical'
)
sys.modules['sushy'] = sushy
sys.modules['sushy.exceptions'] = sushy.exceptions
sushy.exceptions.SushyError = (
type('SushyError', (MockKwargsException,), {}))
sushy.exceptions.ConnectionError = (
type('ConnectionError', (sushy.exceptions.SushyError,), {}))
sushy.exceptions.ResourceNotFoundError = (
type('ResourceNotFoundError', (sushy.exceptions.SushyError,), {}))
sushy.exceptions.MissingAttributeError = (
type('MissingAttributeError', (sushy.exceptions.SushyError,), {}))
sushy.exceptions.OEMExtensionNotFoundError = (
type('OEMExtensionNotFoundError', (sushy.exceptions.SushyError,), {}))
sushy.exceptions.ServerSideError = (
type('ServerSideError', (sushy.exceptions.SushyError,), {}))
sushy.exceptions.BadRequestError = (
type('BadRequestError', (sushy.exceptions.SushyError,), {}))
sushy.auth = mock.MagicMock(spec_set=mock_specs.SUSHY_AUTH_SPEC)
sys.modules['sushy.auth'] = sushy.auth
if 'ironic.drivers.modules.redfish' in sys.modules:
importlib.reload(sys.modules['ironic.drivers.modules.redfish'])
xclarity_client = importutils.try_import('xclarity_client')
if not xclarity_client:
xclarity_client = mock.MagicMock(spec_set=mock_specs.XCLARITY_SPEC)

View File

@ -48,7 +48,8 @@ requests==2.18.0
rfc3986==1.2.0
SQLAlchemy==1.2.19
stestr==2.0.0
stevedore==1.20.0
stevedore==1.29.0
sushy==3.10.0
tenacity==6.2.0
testtools==2.2.0
tooz==2.7.0

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``redfish`` hardware type is now enabled by default along with all
its supported hardware interfaces.

View File

@ -13,7 +13,7 @@ keystoneauth1>=4.2.0 # Apache-2.0
ironic-lib>=4.6.1 # Apache-2.0
python-swiftclient>=3.2.0 # Apache-2.0
pytz>=2013.6 # MIT
stevedore>=1.20.0 # Apache-2.0
stevedore>=1.29.0 # Apache-2.0
oslo.concurrency>=4.2.0 # Apache-2.0
oslo.config>=6.8.0 # Apache-2.0
oslo.context>=2.22.0 # Apache-2.0
@ -43,3 +43,4 @@ psutil>=3.2.2 # BSD
futurist>=1.2.0 # Apache-2.0
tooz>=2.7.0 # Apache-2.0
openstacksdk>=0.48.0 # Apache-2.0
sushy>=3.10.0