ironic.common.inspection_rules.actions module

class ironic.common.inspection_rules.actions.ActionBase[source]

Bases: Base

Abstract base class for rule action plugins.

FORMATTED_ARGS = []

List of params to be formatted with python format.

abstract __call__(task, *args, **kwargs)[source]

Run action on successful rule match.

execute_action(task, action, inventory, plugin_data, loop_context=None)[source]
execute_with_loop(task, action, inventory, plugin_data)[source]
class ironic.common.inspection_rules.actions.AddTraitAction[source]

Bases: ActionBase

__call__(task, name)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.DelAttributeAction[source]

Bases: ActionBase

__call__(task, path)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.DelPortAttributeAction[source]

Bases: ActionBase

__call__(task, port_id, path)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.ExtendAttributeAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

__call__(task, path, value, unique=False)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.ExtendPluginDataAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

REQUIRES_PLUGIN_DATA = True

Flag to indicate if this action needs plugin_data as an arg.

__call__(task, path, value, plugin_data, unique=False)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.ExtendPortAttributeAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

__call__(task, port_id, path, value, unique=False)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.FailAction[source]

Bases: ActionBase

__call__(task, msg)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.LogAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['msg']

List of params to be formatted with python format.

VALID_LOG_LEVELS = {'critical', 'debug', 'error', 'info', 'warning'}
__call__(task, msg, level='info')[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.RemoveTraitAction[source]

Bases: ActionBase

__call__(task, name)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.SetAttributeAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

__call__(task, path, value)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.SetCapabilityAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

__call__(task, name, value)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.SetPluginDataAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

REQUIRES_PLUGIN_DATA = True

Flag to indicate if this action needs plugin_data as an arg.

__call__(task, path, value, plugin_data)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.SetPortAttributeAction[source]

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

__call__(task, port_id, path, value)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.UnsetCapabilityAction[source]

Bases: ActionBase

__call__(task, name)[source]

Run action on successful rule match.

class ironic.common.inspection_rules.actions.UnsetPluginDataAction[source]

Bases: ActionBase

REQUIRES_PLUGIN_DATA = True

Flag to indicate if this action needs plugin_data as an arg.

__call__(task, path, plugin_data)[source]

Run action on successful rule match.

ironic.common.inspection_rules.actions.get_action(op_name)[source]

Get operator class by name.

ironic.common.inspection_rules.actions.update_nested_dict(d, key_path, value)[source]