ironic_python_agent.hardware_managers.container module

class ironic_python_agent.hardware_managers.container.ContainerHardwareManager[source]

Bases: HardwareManager

Hardware manager for container-based cleanup.

CONTAINER_RUNNERS = ('podman', 'docker')
DEPRECATED_STEP_NAME = 'container_clean_step'
HARDWARE_MANAGER_NAME = 'ContainerHardwareManager'
HARDWARE_MANAGER_VERSION = '2'
container_clean_step(node, ports, container_url, pull_options=None, run_options=None)[source]

Deprecated alias for generic_container_step.

Kept working because runbooks are rows in operators’ databases, not something they can re-spell on upgrade.

evaluate_hardware_support()[source]

Determine if a container runner exists and return support level.

[container]runner is not consulted here. Managers are evaluated before the lookup response is applied, so it would test a value the conductor is about to replace. _check_runner_available() checks the configured runtime at execution time instead.

The runtime is asked for its version rather than merely located, so a binary that is present but cannot run does not read as support.

generic_container_step(node, ports, container_url, pull_options=None, run_options=None)[source]

Run a container image supplied through step arguments.

trusted is hardcoded and deliberately absent from this signature. Step arguments are passed straight through, so making it a parameter would let a runbook assert its own trust.

get_clean_steps(node, ports)[source]

Dynamically generate cleaning steps.

get_deploy_steps(node, ports)[source]

Generate deploy steps, none of which run on their own.

A deploy step with a priority above zero runs automatically, so honoring the steps file priority here would fire a container meant for cleaning on every deployment.

get_service_steps(node, ports)[source]

Generate service steps, none of which run on their own.

Priorities in the steps file describe automated cleaning. Honoring them here would run every such container on every service operation.