How can I get acitoolkit objects (aci.interface.get)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2019 07:07 PM
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'])
!
- Labels:
-
APIC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 08:04 AM
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.
