agp_api.agent package
Submodules
agp_api.agent.agent_container module
Module containing the AgpAgent class for managing agent details.
- class agp_api.agent.agent_container.AgentContainer[source]
Bases:
object
Represents an agent with configuration details.
- organization
The organization associated with the agent.
- Type:
str
- namespace
The namespace of the agent.
- Type:
str
- local_agent
The local agent identifier.
- Type:
str
- Public Methods:
get_details() -> dict: Returns a dictionary with the agent’s details. set_details(organization: str, namespace: str, local_agent: str) -> None: Updates the agent details. get_organization() -> str: Retrieves the organization of the agent. get_namespace() -> str: Retrieves the namespace of the agent. get_local_agent() -> str: Retrieves the local agent identifier.
- __init__(organization='cisco', namespace='default', local_agent='server')[source]
Initialize the AgentContainer with optional organization, namespace, and local_agent.
- Parameters:
organization (str) – The name of the organization. Defaults to “cisco”.
namespace (str) – The namespace associated with the agent. Defaults to “default”.
local_agent (str) – The identifier for the local agent. Defaults to “server”.
- get_details()[source]
Retrieve details of the agent, including its organization, namespace, and local agent.
- Returns:
- A dictionary with the following keys:
”organization”: The organization associated with the agent.
”namespace”: The namespace of the agent.
”local_agent”: The local agent identifier.
- Return type:
dict
- get_local_agent()[source]
Retrieve the local agent identifier.
- Returns:
The local agent identifier.
- Return type:
str
- get_namespace()[source]
Retrieve the namespace associated with the agent.
- Returns:
The namespace of the agent.
- Return type:
str
- get_organization()[source]
Retrieve the organization associated with the agent.
- Returns:
The organization of the agent.
- Return type:
str
- set_details(organization, namespace, local_agent)[source]
Set the details for organization, namespace, and local agent.
- Parameters:
organization (str) – The name of the organization.
namespace (str) – The namespace associated with the agent.
local_agent (str) – The identifier for the local agent.
- Returns:
None
- Return type:
None