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
We've been using cisco ACI for a couple of months now and it's clear you need automation tools such as python to help with retrieving information from the fabric and configuring it.
However, when I use the show lldp python script from ACItoolkit, it works, but I cannot seem to retrieve the "ChassisIdV" value.
In the chassis_id_t column I can see generic values but not the values I'm intereseted in. I've looked up the object class in ACI and confirmed that it should be a different property. I tried modifying several of the scripts in the toolkit but I cannot seem to poll the right attribute. The right one should be "chassisIdV". It contains the vmnic number if there is a server connected to the interface.
original aciConcreteLib.py code snippets
def get_table(lldps, title=''):
"""
Returns cdp information in a displayable format.
:param title:
:param lldps:
"""
result = []
headers = ["Node-ID", "Ip", "Name", "Chassis_id_t", "Neighbour Platform", "Neighbour Interface"]
data = []
for lldp in lldps:
for lldpIf in lldp.get_children(ConcreteLLdpIf):
for adjEp in lldpIf.get_children(ConcreteLLdpAdjEp):
node_match = re.search(r'node-\d+', adjEp.raw_local_interface)
node = node_match.group()
local_int_match = re.search(r'(\[)([\w\d\/]+)', adjEp.raw_local_interface)
local_int = local_int_match.group(2)
data.append([
node,
local_int,
adjEp.ip,
adjEp.name,
adjEp.chassis_id_t,
adjEp.mac,
str(adjEp.neigh_int)
])
result.append(Table(data, headers, title=title + 'LLDP Entries'))
return result`
def _populate_from_attributes(self, attributes):
"""
This will populate from the APIC attribute
:param attributes: Attributes of the APIC object
"""
self.ip = attributes['mgmtIp']
self.name = attributes['sysName']
self.chassis_id_t = attributes['chassisIdT']
if self.chassis_id_t == 'mac':
self.mac = str(attributes['chassisIdV'])
else:
self.mac = str(attributes['mgmtPortMac'])
self.raw_local_interface = str(attributes['dn'])
self.neigh_int = str(attributes['portIdV'])
Can anyone point me in the right direction here?
The text was updated successfully, but these errors were encountered:
Hello,
We've been using cisco ACI for a couple of months now and it's clear you need automation tools such as python to help with retrieving information from the fabric and configuring it.
However, when I use the show lldp python script from ACItoolkit, it works, but I cannot seem to retrieve the "ChassisIdV" value.
In the chassis_id_t column I can see generic values but not the values I'm intereseted in. I've looked up the object class in ACI and confirmed that it should be a different property. I tried modifying several of the scripts in the toolkit but I cannot seem to poll the right attribute. The right one should be "chassisIdV". It contains the vmnic number if there is a server connected to the interface.
original aciConcreteLib.py code snippets
Can anyone point me in the right direction here?
The text was updated successfully, but these errors were encountered: