You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AgentDetails model has various properties, such as agent_id, agent_name, ip_addresses and more. This model is returned in the response for the get_agent operation.
However, the model seems to have some sort of abstract wrapper around it. Trying to directly access agent_id, agent_name, ip_addresses or other properties on the AgentDetails model fails with an AttributeError. Instead, it seems this class has a property actual_instance which itself has the aforementioned properties.
Example code:
importosimportthousandeyes_sdk.coreimportthousandeyes_sdk.agentsconfiguration=thousandeyes_sdk.core.Configuration(
access_token=os.getenv('BEARER_TOKEN', '')
)
api_client=thousandeyes_sdk.core.ApiClient(configuration)
api_instance=thousandeyes_sdk.agents.CloudAndEnterpriseAgentsApi(api_client)
api_response=api_instance.get_agent("3")
print(api_response.ip_addresses) # Raises an AttributeErrorprint(api_response.agent_id) # Raises an AttributeErrorprint(api_response.agent_name) # Raises an AttributeErrorprint(api_response) # Shows the instance details, # including the `actual_instance` property, which itself # contains the agent_id, agent_name, and ip_addresses propertiesprint(api_response.actual_instance.agent_name) # This works
The text was updated successfully, but these errors were encountered:
The
AgentDetails
model has various properties, such asagent_id
,agent_name
,ip_addresses
and more. This model is returned in the response for theget_agent
operation.However, the model seems to have some sort of abstract wrapper around it. Trying to directly access
agent_id
,agent_name
,ip_addresses
or other properties on theAgentDetails
model fails with anAttributeError
. Instead, it seems this class has a propertyactual_instance
which itself has the aforementioned properties.Example code:
The text was updated successfully, but these errors were encountered: