ironic_python_agent.extensions.service module

class ironic_python_agent.extensions.service.ServiceExtension(agent=None)[source]

Bases: BaseAgentExtension

execute_service_step(step, node, ports, service_version=None, **kwargs)[source]

Execute a service step.

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

  • node – A dict representation of a node

  • ports – A dict representation of ports attached to node

  • service_version – The service version as returned by hardware.get_current_versions() at the beginning of the service operation.

Returns:

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

get_service_steps(node, ports)[source]

Get the list of service 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 service steps with keys step, priority, and reboot_requested