04-28-2016 04:43 PM - edited 03-01-2019 04:27 AM
Hello,
I'm new to the world of coding but have an extensive background with Cisco. I've recently installed APIC-EM to see what it can do. I found the 'get-network-device-list.py' in the learning labs to be very practical. I tweaked the device_list within the python script to get '[item["hostname"],item["managementIpAddress"],item["serialNumber"],item["platformId"],item["softwareVersion"]' as these are values I'd like to see. Using tabulate makes this information easily transportable to an excel doc. I was really excited about this until I added a switch stack. No more nice columns. Each switch in the stack provides a "serialNumber" along with "platformId" for that one respective device item. This throws off the nice column flow.
I'm posting here to see if anyone has run into this yet and/or can offer some advice to get me going in the correct direction.
Thanks in advance for any assistance!
04-28-2016 05:07 PM
Your code is fine, just resize you terminal window to make it wider
04-28-2016 05:24 PM
Hmmm, I don't have a stack with which to test. Can you post the output of the APIC-EM JSON (maybe from Swagger under the "API" link at the top of the APIC-EM pages) for such a network-device? I think maybe you're saying the platformId is a list rather than one value? The resulting output of your script showing the stack output would also be helpful.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide