ironic.api.controllers.v1.inspection_rule module

class ironic.api.controllers.v1.inspection_rule.InspectionRuleController(*args, **kwargs)[source]

Bases: RestController

REST controller for inspection rules.

delete(inspection_rule_uuid)[source]

Delete an inspection rule.

Parameters:
  • inspection_rule_uuid – UUID of an inspection rule.

  • confirm – Confirmation string. Must be ‘true’ for bulk deletion.

get_all(marker=None, limit=None, sort_key='id', sort_dir='asc', fields=None, detail=None, phase=None)[source]

Retrieve a list of inspection rules.

Parameters:
  • marker – pagination marker for large data sets.

  • limit – maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned.

  • sort_key – column to sort results by. Default: id.

  • sort_dir – direction to sort. “asc” or “desc”. Default: asc.

  • fields – Optional, a list with a specified set of fields of the resource to be returned.

  • detail – Optional, boolean to indicate whether retrieve a list of inspection rules with detail.

get_one(inspection_rule_uuid, fields=None)[source]

Retrieve information about the given inspection rule.

Parameters:
  • inspection_rule_uuid – UUID of an inspection rule.

  • fields – Optional, a list with a specified set of fields of the resource to be returned.

invalid_sort_key_list = ['actions', 'conditions']
patch(inspection_rule_uuid, patch=None)[source]

Update an existing inspection rule.

Parameters:
  • inspection_rule_uuid – UUID of the rule to update.

  • patch – a json PATCH document to apply to this inspection rule.

post(inspection_rule)[source]

Create a new inspection rule.

Parameters:

inspection_rule – a inspection rule within the request body.

ironic.api.controllers.v1.inspection_rule.convert_actions(rpc_actions)[source]
ironic.api.controllers.v1.inspection_rule.convert_conditions(rpc_conditions)[source]

Add links to the inspection rule.

ironic.api.controllers.v1.inspection_rule.rules_sanitize(inspection_rule, fields)[source]

Removes sensitive and unrequested data.

Will only keep the fields specified in the fields parameter.

Parameters:

fields (list of str) – list of fields to preserve, or None to preserve them all