ironic.drivers.modules.inspector.hooks.base module¶
Base code for inspection hooks support.
- class ironic.drivers.modules.inspector.hooks.base.InspectionHook[source]¶
Bases:
object
Abstract base class for inspection hooks.
- __call__(task, inventory, plugin_data)[source]¶
Hook to run to process inspection data (before Ironic node update).
This hook is run after node is found and ports are created, just before the node is updated with the data.
- Parameters:
task – A TaskManager instance.
inventory – Hardware inventory information sent by the ramdisk. Must not be modified by the hook.
plugin_data – Plugin data sent by the ramdisk. May be modified by the hook.
- Returns:
nothing.
- dependencies = []¶
An ordered list of hooks that must be enabled before this one.
The items here should be entry point names, not classes.
- preprocess(task, inventory, plugin_data)[source]¶
Hook to run before the main inspection data processing.
This hook is run even before sanity checks.
- Parameters:
task – A TaskManager instance.
inventory – Hardware inventory information sent by the ramdisk. Must not be modified by the hook.
plugin_data – Plugin data sent by the ramdisk. May be modified by the hook.
- Returns:
nothing.
- ironic.drivers.modules.inspector.hooks.base.inspection_hooks_manager(*args)[source]¶
Create a Stevedore extension manager for inspection hooks.
- Parameters:
args – arguments to pass to the hooks constructor
- Returns:
a Stevedore NamedExtensionManager