The ironic_python_agent.api.controllers.v1.command Module

class ironic_python_agent.api.controllers.v1.command.Command(**kw)[source]

Bases: ironic_python_agent.api.controllers.v1.base.APIBase

A representation of a command.

class ironic_python_agent.api.controllers.v1.command.CommandController[source]

Bases: pecan.rest.RestController

Controller for issuing commands and polling for command status.

get_all(*args, **kwargs)[source]

Get all command results.

get_one(*args, **kwargs)[source]

Get a command result by ID.

Parameters:
  • result_id – the ID of the result to get.
  • wait – if ‘true’, block until the command completes.
Returns:

a ironic_python_agent.api.controller.v1.command. CommandResult object.

post(*args, **kwargs)[source]

Post a command for the agent to run.

Parameters:
  • wait – if ‘true’, block until the command completes.
  • command – the command to execute. If None, an InvalidCommandError will be returned.
Returns:

a ironic_python_agent.api.controller.v1.command. CommandResult object.

class ironic_python_agent.api.controllers.v1.command.CommandResult(**kw)[source]

Bases: ironic_python_agent.api.controllers.v1.base.APIBase

Object representing the result of a given command.

classmethod from_result(result)[source]

Convert a BaseCommandResult object to a CommandResult object.

Parameters:result – a ironic_python_agent.extensions.base. BaseCommandResult object.
Returns:a ironic_python_agent.api.controllers.v1.command. CommandResult object.
class ironic_python_agent.api.controllers.v1.command.CommandResultList(**kw)[source]

Bases: ironic_python_agent.api.controllers.v1.base.APIBase

An object representing a list of CommandResult objects.

classmethod from_results(results)[source]

Convert a list of BaseCommandResult objects to a CommandResultList.

Parameters:results – a list of ironic_python_agent.extensions.base. BaseCommandResult objects.
Returns:a ironic_python_agent.api.controllers.v1.command. CommandResultList object.