cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1181
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

Alex 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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community