The ironic_python_agent.extensions.base Module

class ironic_python_agent.extensions.base.AgentCommandStatus[source]

Bases: object

Mapping of agent command statuses.

class ironic_python_agent.extensions.base.AsyncCommandResult(command_name, command_params, execute_method, agent=None)[source]

Bases: ironic_python_agent.extensions.base.BaseCommandResult

A command that executes asynchronously in the background.

is_done()[source]

Checks to see if command is still RUNNING.

Returns:True if command is done, False if still RUNNING
join(timeout=None)[source]

Block until command has completed, and return result.

Parameters:timeout – float indicating max seconds to wait for command to complete. Defaults to None.
run()[source]

Run a command.

serialize()[source]

Serializes the AsyncCommandResult into a dict.

Returns:dict containing serializable fields in AsyncCommandResult
start()[source]

Begin background execution of command.

class ironic_python_agent.extensions.base.BaseAgentExtension(agent=None)[source]

Bases: object

check_cmd_presence(ext_obj, ext, cmd)[source]
execute(command_name, **kwargs)[source]
class ironic_python_agent.extensions.base.BaseCommandResult(command_name, command_params)[source]

Bases: ironic_python_agent.encoding.SerializableComparable

Base class for command result.

is_done()[source]

Checks to see if command is still RUNNING.

Returns:True if command is done, False if still RUNNING
join()[source]
Returns:result of completed command.
class ironic_python_agent.extensions.base.ExecuteCommandMixin[source]

Bases: object

execute_command(command_name, **kwargs)[source]

Execute an agent command.

get_extension(extension_name)[source]
split_command(command_name)[source]
class ironic_python_agent.extensions.base.SyncCommandResult(command_name, command_params, success, result_or_error)[source]

Bases: ironic_python_agent.extensions.base.BaseCommandResult

A result from a command that executes synchronously.