ironic_python_agent.extensions.clean module

class ironic_python_agent.extensions.clean.CleanExtension(agent=None)[source]

Bases: ironic_python_agent.extensions.base.BaseAgentExtension

execute_clean_step(step, node, ports, clean_version=None, **kwargs)[source]

Execute a clean step.

Parameters
  • step – A clean step with ‘step’, ‘priority’ and ‘interface’ keys

  • node – A dict representation of a node

  • ports – A dict representation of ports attached to node

  • clean_version – The clean version as returned by hardware.get_current_versions() at the beginning of cleaning/zapping

Returns

a CommandResult object with command_result set to whatever the step returns.

get_clean_steps(node, ports)[source]

Get the list of clean steps supported for the node and ports

Parameters
  • node – A dict representation of a node

  • ports – A dict representation of ports attached to node

Returns

A list of clean steps with keys step, priority, and reboot_requested