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.

OPTIONAL_ARGS = {}

Set with names of optional parameters.

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

Run action on successful rule match.

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

Bases: ActionBase

__call__(task, name)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

__call__(task, path)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

__call__(task, port_id, path)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

OPTIONAL_ARGS = {'unique'}

Set with names of optional parameters.

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

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

OPTIONAL_ARGS = {'unique'}

Set with names of optional parameters.

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

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

OPTIONAL_ARGS = {'unique'}

Set with names of optional parameters.

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

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

__call__(task, msg)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

FORMATTED_ARGS = ['msg']

List of params to be formatted with python format.

__call__(task, msg, level='info')[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

__call__(task, name)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

FORMATTED_ARGS = ['value']

List of params to be formatted with python format.

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

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

__call__(task, name)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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

Bases: ActionBase

__call__(task, path, plugin_data)[source]

Run action on successful rule match.

classmethod get_arg_names()[source]

Return list of argument names in order expected.

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]