Rename edeploy plugin

Since this plugin is now usable in a more generic way, the name is
changed from edeploy to extra_hardware.

Depends-On: Ie9e017df735a95350991ce419fa3b64249819d70
Change-Id: I690c5c00bc2b0ad1a3f329c9366910f2488e7a0a
This commit is contained in:
John Trowbridge 2015-06-09 16:03:20 -04:00
parent 912c30830a
commit 0f2e3964a9
5 changed files with 17 additions and 20 deletions

View File

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

View File

@ -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-<node uuid>' 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"""

View File

@ -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 = []

View File

@ -1,2 +1,2 @@
# required for edeploy plugin
# required for extra_hardware plugin
python-swiftclient>=2.2.0

View File

@ -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': [