This blog post was initially sent to the subscribers of my SDN and Network Automation mailing list. Subscribe here.
A while ago I complained how the GUI- or API-based orchestration (or intent-based) systems make it hard to figure out what exactly has been configured because they can’t give you a single text configuration file that you could track with version-control software.
Dirk Feldhaus found the situation so ridiculous that he decided to create an Ansible playbook that collects and dumps tenant parameters configured on a Cisco ACI tenant as a homework assignment in the Building Network Automation Solutions online course. As he explained the problem:
It can be difficult in the APIC GUI to get a quick overview for certain configuration parameters because these values are hidden in different subtrees of the GUI. For example, if you want to check if all Bridge Domains have a certain parameter set this can be really complicated. A list containing only those parameters you're interested in would be a great help.
Cisco ACI is not the only system where you’d face this challenge. VMware vCenter, VMware NSX, OpenStack, Amazon Web Services... pretty much any system that has REST API as the only configuration mechanism has the same problem.
Interestingly, he decided to dump the collected information in an Excel spreadsheet instead of a text file. Here’s his reasoning:
Most people are familiar with Excel and sorting and filtering mechanisms. In that way, they can easily get the information they're looking for from the report.
Like most other attendees in the network automation course he published his solution on GitHub, so you can easily adopt it to your needs and (for example), create a text-, HTML- or PDF report instead of an Excel spreadsheet.
I use wkhtmltopdf to create PDF documents from HTML source.
Hope you’ll find his solution useful and/or inspiring. Happy automating!