ironic_python_agent.agent module¶
- class ironic_python_agent.agent.Host(hostname, port)¶
 Bases:
tuple- hostname¶
 Alias for field number 0
- port¶
 Alias for field number 1
- class ironic_python_agent.agent.IronicPythonAgent(api_url, advertise_address, listen_address, ip_lookup_attempts, ip_lookup_sleep, network_interface, lookup_timeout, lookup_interval, standalone, agent_token, hardware_initialization_delay=0, advertise_protocol='http')[source]¶
 Bases:
ExecuteCommandMixinClass for base agent functionality.
- get_command_result(result_id)[source]¶
 Get a specific command result by ID.
- Returns:
 a
ironic_python_agent.extensions.base. BaseCommandResultobject.- Raises:
 RequestedObjectNotFoundError if command with the given ID is not found.
- get_node_uuid()[source]¶
 Get UUID for Ironic node.
If the agent has not yet heartbeated to Ironic, it will not have the UUID and this will raise an exception.
- Returns:
 A string containing the UUID for the Ironic node.
- Raises:
 UnknownNodeError if UUID is unknown.
- get_status()[source]¶
 Retrieve a serializable status.
- Returns:
 a
ironic_python_agent.agent.IronicPythonAgentinstance describing the agent’s status.
- list_command_results()[source]¶
 Get a list of command results.
- Returns:
 list of
ironic_python_agent.extensions.base. BaseCommandResultobjects.
- set_agent_advertise_addr()[source]¶
 Set advertised IP address for the agent, if not already set.
If agent’s advertised IP address is still default (None), try to find a better one. If the agent’s network interface is None, replace that as well.
- Raises:
 LookupAgentIPError if an IP address could not be found
- class ironic_python_agent.agent.IronicPythonAgentHeartbeater(agent)[source]¶
 Bases:
ThreadThread that periodically heartbeats to Ironic.
- max_error_jitter_multiplier = 2.0¶
 
- max_jitter_multiplier = 0.6¶
 
- min_error_jitter_multiplier = 1.0¶
 
- min_heartbeat_interval = 5¶
 
- min_jitter_multiplier = 0.3¶
 
- class ironic_python_agent.agent.IronicPythonAgentStatus(started_at, version)[source]¶
 Bases:
SerializableRepresents the status of an agent.
- serializable_fields = ('started_at', 'version')¶