A while back I posted about my “f-script”, a tool that reads device configurations and extracts IP/subnet information so that it can quickly and easily queried to find where an IP might exist on the network, and what else is on the same subnet.
I was also lucky enough to take part in an early episode of Ivan Pepelnjak’s “Software Gone Wild” podcast where I talked about network automation and in particular, the f-script. In that podcast I promised that I would put the f-script up on GitHub once I had the time to clean it up a little and remove things that tied it to a particular environment.
At the end of 2014 I finally uploaded the scripts, and you are now in the lucky position of being able to laugh at how badly it’s written (and really, it is) or, better still, to help me improve it by submitting your own edits. Bear in mind that this started off as a hack (“I’ll do it like this just to prove that it can work”) and as with so many temporary solutions, ended up never being rewritten “properly”. Still, it works and has been pretty successful in my environment.
So please check it out – https://github.com/jgherbert/the-f-tool and let me know what you think. Or better still, fork it, improve it, and submit some pull requests back to me! If you have any questions please reach out to me; there’s a contact form on my About page.
P.S. Please be gentle, even if you think it should have been written in Python not Perl, mmkay?