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.

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

ironic.drivers.modules.inspector.hooks.base.missing_entrypoints_callback(names)[source]

Raise RuntimeError with comma-separated list of missing hooks

ironic.drivers.modules.inspector.hooks.base.reset()[source]

Reset cached managers.

ironic.drivers.modules.inspector.hooks.base.validate_inspection_hooks()[source]

Validate the enabled inspection hooks.

Raises:

RuntimeError on missing or failed to load hooks

Returns:

the list of hooks that passed validation