I write a lot of useful code for myself.
I want to get better at writing useful code for others.
Take my latest project for example, Network Search and Rescue: https://github.com/austind/net_sar
It does exactly what I need. Pulls hosts from my NMS (Solarwinds Orion), pulls CDP neighbors, and finds any CDP neighbors that aren't in my NMS.
I didn't use Ansible because get_facts doesn't return important details about CDP neighbors (specifically IP address and capabilities). Also I've found ansible is a lot slower than plain multithreaded netmiko.
I want to make this more useful to others as "canonically" as possible, but I need some feedback. for example:
- For starters: am I reinventing the wheel here? does this need to exist?
- I know most people don't use solarwinds. What would be a good agnostic source of inventory? plaintext/yaml file?
- I assume most people want LLDP support. but both protocols return different values. is it better to treat CDP and LLDP separately and let the user decide which to use, or normalize/combine the results into a generic data structure?
- How should I package the project? seems like a pypi module is inappropriate because this is a script, not a library you would import into another project. Is a github repo good enough?
any other feedback would be great.
Cheers!
-Austin
No comments:
Post a Comment