So Ive been playing with python at work for switch configuration, making custom apps for helpdesk all sorts of stuff cause its fun and sometimes useful-ish.
I had to re cable an IDF so that it would look all clean instead of a horrible spiderweb. I decided this was a PERFECT reason to write some kind of script up that would transfer configs from one port onto another, and all id have to do is the pretty cabling.
Quick script descript: Have an excel sheet with two ports (7/0/1 , 6/0/1) per row, the first port is the config I need to transfer to the second port in row. It copies all configs into dictionary and then, defaults ports and writes configs one by one...
Well I use proverbial Python superglue and duct tape to get this script together, wait till after hours, run it..
As soon as I see that the script is collecting the info, I start uncabling everything and just enjoy unplugging dozens of cables. As soon as I finish I realize my script crashed due to some kind of timeout (havent taken the time to find out why exactly it crashed) right after defaulting all ports....... So i have switches without an cables, and no configs anywhere.
Havent had such good solid heavy panic in a while..... Long story short I had a backup config and had to go through port by port physically looking up what config was on it, where it should go and setting it up..... worked out but took wayyy longer than it should have.
I remember some guy talking about automation how it can make your life 1000 times easier or how you could end up poking yourself 1000 times in the eye in a blink of a second.
Thought some of you might enjoy the suffering, now its time to go to sleep and wake up early to deal with all the incoming network connectivity calls.
No comments:
Post a Comment