cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1293
Views
0
Helpful
1
Replies

How can I get acitoolkit objects (aci.interface.get)?

jhongrack-choi
Level 1
Level 1

I can get the interface information using endpoint.xxxx and endpoint.attributes['xxxx'] as below but I cannot get the information such as 'interface description' and 'policy group',,, I checked acitoolkit doc but couldn't find all objects associated to "aci.interface". How I can get all available acitoolkit objects associated to aci.interface?

!

endpoints = aci.Interface.get(session)

!

for endpoint in endpoints:
print(endpoint.if_name)
print(endpoint.port)
print(endpoint.id)
print(endpoint.mtu)
print(endpoint.node)
print(endpoint.porttype)
print(endpoint.pod)
print(endpoint.attributes['usage'])
print(endpoint.attributes['policy'])

!

1 Reply 1

Alexander Stevenson
Cisco Employee
Cisco Employee

In Python3, you can try

print(dir(aci.interface))

 

The dir() function is the standard way to display all properties and methods of the specified object. From there you can begin to drill down further, based on the results.