Merge "Rename edeploy plugin"
This commit is contained in:
commit
a497f26ebb
@ -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
|
||||
---------------
|
||||
|
||||
|
@ -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"""
|
@ -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 = []
|
@ -1,2 +1,2 @@
|
||||
# required for edeploy plugin
|
||||
# required for extra_hardware plugin
|
||||
python-swiftclient>=2.2.0
|
||||
|
2
setup.py
2
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': [
|
||||
|
Loading…
Reference in New Issue
Block a user