👋 Hi, I’m Bjørnar Lintvedt
I’m a Senior Network Consultant at Bluetree, working at the intersection of networking and software development.
As mentioned in my first blog post, I’m preparing for the CCIE Automation lab exam — Cisco’s most advanced certification for network automation and programmability. I’m documenting the journey here with weekly, hands-on blog posts tied to the blueprint.
After NETCONF in Week 3, I wanted to pick something network engineers often do manually — discovering devices, collecting facts, and documenting neighbors — and automate it with Python and Ansible.
This week’s project: Network discovery and reports. A small workflow that scans a subnet, discovers devices, runs commands, and generates a nice HTML report.
1. Python Discovery script
A Python CLICK app (network_discovery.py) that:
Sample from script (see repo for full details):
2. Ansible Playbook
The playbook (gather_device_facts.yml) runs against the discovered hosts and gathers system + neighbor info and generates a HTML report.
Sample of gathering data from the discovered hosts:
Right now it only supports Cisco IOS and Nexus, but it can easily be extended to other platforms.
3. HTML Report
Instead of raw CLI output, I render a single HTML report with a Jinja2 template. Every device is listed in a table, with expandable CDP/LLDP sections.
Sample from jinja2 template:
4. The result => View the HTML report
You get a list of all hosts discovered with a column for
At the end you get a list of all CDP and/or LLDP neighbors for each device discovered.
See README in Gitlab repository :)
I've updated the new use case to the Nautix diagram
Blueprint item 3.3 Modify and troubleshoot an automated test by using pyATS to meet requirements
3.3.a Create a testbed file for connecting to Cisco IOS, IOS XE, or NX-OS devices
3.3.b Gather current configuration and operational state from devices using the Genie parsers and models included with pyATS
3.3.c Develop and execute test jobs and scripts using AEtest to verify network health