ironic_inspector.plugins.base Module¶Base code for plugins support.
ironic_inspector.plugins.base.ProcessingHook[source]¶Bases: object
Abstract base class for introspection data processing hooks.
before_processing(introspection_data, **kwargs)[source]¶Hook to run before any other data processing.
This hook is run even before sanity checks.
introspection_data – raw information sent by the ramdisk, may be modified by the hook.
kwargs – used for extensibility without breaking existing hooks
nothing.
before_update(introspection_data, node_info, **kwargs)[source]¶Hook to run 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.
introspection_data – processed data from the ramdisk.
node_info – NodeInfo instance.
kwargs – used for extensibility without breaking existing hooks.
nothing.
[RFC 6902] - http://tools.ietf.org/html/rfc6902
dependencies = []¶An ordered list of hooks that must be enabled before this one.
The items here should be entry point names, not classes.
ironic_inspector.plugins.base.RuleActionPlugin[source]¶Bases: ironic_inspector.plugins.base.WithValidation
Abstract base class for rule action plugins.
FORMATTED_PARAMS = []¶List of params will be formatted with python format.
ironic_inspector.plugins.base.RuleConditionPlugin[source]¶Bases: ironic_inspector.plugins.base.WithValidation
Abstract base class for rule condition plugins.
ALLOW_NONE = False¶Whether this condition accepts None when field is not found.
REQUIRED_PARAMS = {'value'}¶check(node_info, field, params, **kwargs)[source]¶Check if condition holds for a given field.
node_info – NodeInfo object
field – field value
params – parameters as a dictionary, changing it here will change what will be stored in database
kwargs – used for extensibility without breaking existing plugins
ValueError – on unacceptable field value
True if check succeeded, otherwise False
ironic_inspector.plugins.base.WithValidation[source]¶Bases: object
OPTIONAL_PARAMS = {}¶Set with names of optional parameters.
REQUIRED_PARAMS = {}¶Set with names of required parameters.
validate(params, **kwargs)[source]¶Validate params passed during creation.
Default implementation checks for presence of fields from REQUIRED_PARAMS and fails for unexpected fields (not from REQUIRED_PARAMS + OPTIONAL_PARAMS).
params – params as a dictionary
kwargs – used for extensibility without breaking existing plugins
ValueError on validation failure
ironic_inspector.plugins.base.missing_entrypoints_callback(names)[source]¶Raise MissingHookError with comma-separated list of missing hooks
ironic_inspector.plugins.base.processing_hooks_manager(*args)[source]¶Create a Stevedore extension manager for processing hooks.
args – arguments to pass to the hooks constructor.
ironic_inspector.plugins.base.rule_actions_manager()[source]¶Create a Stevedore extension manager for actions in rules.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.