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.
Parameters: |
|
---|---|
Returns: | 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.
Parameters: |
|
---|---|
Returns: | 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
= set(['value'])¶check
(node_info, field, params, **kwargs)[source]¶Check if condition holds for a given field.
Parameters: |
|
---|---|
Raises: | ValueError – on unacceptable field value |
Returns: | True if check succeeded, otherwise False |
ironic_inspector.plugins.base.
WithValidation
[source]¶Bases: object
OPTIONAL_PARAMS
= set([])¶Set with names of optional parameters.
REQUIRED_PARAMS
= set([])¶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).
Parameters: |
|
---|---|
Raises: | 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.
Parameters: | 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.