does anyone have a TKL script to download tftp configs?
Hey guys - I'm not great on TKL scripting but I thought I'd ask before trying to grind it out - no reason to re-invent the wheel.
So what I do is when I do a lab, I tftp the config to my CSR1000V so I can config replace it - basically I do something like this
copy tftp://192.168.2.10/ibgp.synchronization/r1.txt flash:ibgp.synchronization.cfg
then I cut and paste that line 10 times replacing r1 with r2, r3, etc - this way when it comes time to push the config I just have to do a config replace flash:bgp.ibgpsynchronization.cfg force and that does all 10 routers. It's great for the basic configs but blows for the one-off's like this one.
what I would LIKE is a tklsh script that will automate the process with a list - and I can just update the specific router in the script and have it pull the r1.txt out of each directory - finish and run it on r2, r3, etc - copy all of them to the flash at once, and then I can let it sit and copy for an hr or so.
So given a list of directory locations - it should pull the r1.txt out of each directory - copy it to flash, and rename it from whatever the r1.txt is to the directory name with a .cfg added - I'm not 100% sure we can pull that off but I'm curious if anyone has done it
if not, I can dig out the tklsh reference on Cisco and pray - One gotcha I forsee is having to override the name prompt for the name of the file I copy to the flash: it just takes a carriage return though as the name will be whatever I typed in the initial line