diff --git a/README.rst b/README.rst index 9efb14941..141c1dad5 100644 --- a/README.rst +++ b/README.rst @@ -364,15 +364,12 @@ Here are some plugins that can be additionally enabled: ``root_device_hint`` gathers block devices from ramdisk and exposes root device in multiple runs. -``edeploy`` - plugin for `eDeploy hardware detection and classification utilities`_, - requires a `special ramdisk`__. +``extra_hardware`` + stores the value of the 'data' key returned by the ramdisk as a JSON + encoded string in a Swift object. Refer to CONTRIBUTING.rst_ for information on how to write your own plugin. -.. _eDeploy hardware detection and classification utilities: https://pypi.python.org/pypi/hardware -__ https://github.com/rdo-management/instack-undercloud/tree/master/elements/ironic-discoverd-ramdisk-instack - Troubleshooting --------------- diff --git a/ironic_inspector/plugins/edeploy.py b/ironic_inspector/plugins/extra_hardware.py similarity index 81% rename from ironic_inspector/plugins/edeploy.py rename to ironic_inspector/plugins/extra_hardware.py index b5b242665..96f377c3a 100644 --- a/ironic_inspector/plugins/edeploy.py +++ b/ironic_inspector/plugins/extra_hardware.py @@ -11,10 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""eDeploy hardware detection and classification plugin. +"""Plugin to store extra hardware information in Swift. -See https://blueprints.launchpad.net/ironic-inspector/+spec/edeploy for -details on how to use it. Note that this plugin requires a special ramdisk. +Stores the value of the 'data' key returned by the ramdisk as a JSON encoded +string in a Swift object. The object is named 'extra_hardware-' and +is stored in the 'inspector' container. """ import json @@ -29,11 +30,11 @@ from ironic_inspector.plugins import base CONF = cfg.CONF -LOG = logging.getLogger('ironic_inspector.plugins.edeploy') +LOG = logging.getLogger('ironic_inspector.plugins.extra_hardware') -class eDeployHook(base.ProcessingHook): - """Processing hook for saving additional data from eDeploy ramdisk.""" +class ExtraHardwareHook(base.ProcessingHook): + """Processing hook for saving extra hardware information in Swift.""" def _store_extra_hardware(self, name, data): """Handles storing the extra hardware data from the ramdisk""" diff --git a/ironic_inspector/test/test_plugins_edeploy.py b/ironic_inspector/test/test_plugins_extra_hardware.py similarity index 89% rename from ironic_inspector/test/test_plugins_edeploy.py rename to ironic_inspector/test/test_plugins_extra_hardware.py index ad1dd0307..87259cabd 100644 --- a/ironic_inspector/test/test_plugins_edeploy.py +++ b/ironic_inspector/test/test_plugins_extra_hardware.py @@ -17,16 +17,15 @@ try: except ImportError: import mock -from ironic_inspector.plugins import edeploy +from ironic_inspector.plugins import extra_hardware from ironic_inspector.test import base as test_base -@mock.patch.object(edeploy.swift, 'SwiftAPI', autospec=True) -class TestEdeploy(test_base.NodeTest): - +@mock.patch.object(extra_hardware.swift, 'SwiftAPI', autospec=True) +class TestExtraHardware(test_base.NodeTest): def setUp(self): - super(TestEdeploy, self).setUp() - self.hook = edeploy.eDeployHook() + super(TestExtraHardware, self).setUp() + self.hook = extra_hardware.ExtraHardwareHook() def _before_update(self, introspection_data): node_patches = [] diff --git a/plugin-requirements.txt b/plugin-requirements.txt index 576ef77ea..9dc610c94 100644 --- a/plugin-requirements.txt +++ b/plugin-requirements.txt @@ -1,2 +1,2 @@ -# required for edeploy plugin +# required for extra_hardware plugin python-swiftclient>=2.2.0 diff --git a/setup.py b/setup.py index f42ca1dab..00229dfb3 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ setup( "validate_interfaces = ironic_inspector.plugins.standard:ValidateInterfacesHook", "ramdisk_error = ironic_inspector.plugins.standard:RamdiskErrorHook", "example = ironic_inspector.plugins.example:ExampleProcessingHook", - "edeploy = ironic_inspector.plugins.edeploy:eDeployHook", + "extra_hardware = ironic_inspector.plugins.extra_hardware:ExtraHardwareHook", "root_device_hint = ironic_inspector.plugins.root_device_hint:RootDeviceHintHook", ], 'openstack.cli.extension': [