Browse Source

Remove deprecated alias "root_device_hint" for "raid_device" hook

Deprecated in 3.1.0 (mid-Mitaka). Probably also completely unused.

Change-Id: Id1ea1e63e212a94dce61bd03c4217611cca3cd2e
changes/51/325351/4
Dmitry Tantsur 6 years ago
parent
commit
457c1277de
  1. 2
      doc/source/usage.rst
  2. 7
      ironic_inspector/plugins/raid_device.py
  3. 9
      ironic_inspector/test/unit/test_plugins_raid_device.py
  4. 3
      releasenotes/notes/no-root_device_hint-0e7676d481d503bb.yaml
  5. 2
      setup.cfg

2
doc/source/usage.rst

@ -204,7 +204,7 @@ Here are some plugins that can be additionally enabled:
``example``
example plugin logging it's input and output.
``raid_device`` (deprecated name ``root_device_hint``)
``raid_device``
gathers block devices from ramdisk and exposes root device in multiple
runs.
``extra_hardware``

7
ironic_inspector/plugins/raid_device.py

@ -102,10 +102,3 @@ class RaidDeviceDetection(base.ProcessingHook):
node_info.patch([{'op': 'add',
'path': '/extra/block_devices',
'value': {'serials': current_devices}}])
class RootDeviceHintHook(RaidDeviceDetection):
def __init__(self):
LOG.warning(_LW('Using the root_device_hint alias for the '
'raid_device plugin is deprecated'))
super(RaidDeviceDetection, self).__init__()

9
ironic_inspector/test/unit/test_plugins_raid_device.py

@ -23,12 +23,9 @@ class TestRaidDeviceDetection(test_base.NodeTest):
hook = raid_device.RaidDeviceDetection()
def test_loadable_by_name(self):
names = ('raid_device', 'root_device_hint')
base.CONF.set_override('processing_hooks', ','.join(names),
'processing')
for name in names:
ext = base.processing_hooks_manager()[name]
self.assertIsInstance(ext.obj, raid_device.RaidDeviceDetection)
base.CONF.set_override('processing_hooks', 'raid_device', 'processing')
ext = base.processing_hooks_manager()['raid_device']
self.assertIsInstance(ext.obj, raid_device.RaidDeviceDetection)
def test_missing_local_gb(self):
introspection_data = {}

3
releasenotes/notes/no-root_device_hint-0e7676d481d503bb.yaml

@ -0,0 +1,3 @@
---
upgrade:
- Removed the deprecated "root_device_hint" alias for the "raid_device" hook.

2
setup.cfg

@ -32,8 +32,6 @@ ironic_inspector.hooks.processing =
extra_hardware = ironic_inspector.plugins.extra_hardware:ExtraHardwareHook
raid_device = ironic_inspector.plugins.raid_device:RaidDeviceDetection
capabilities = ironic_inspector.plugins.capabilities:CapabilitiesHook
# Deprecated name for raid_device, don't confuse with root_disk_selection
root_device_hint = ironic_inspector.plugins.raid_device:RootDeviceHintHook
ironic_inspector.hooks.node_not_found =
example = ironic_inspector.plugins.example:example_not_found_hook
enroll = ironic_inspector.plugins.discovery:enroll_node_not_found_hook

Loading…
Cancel
Save