Tuesday, July 9, 2019

Trying to create an Arista firmware upgrade script via Python. One issue...

Hey all. I was going to put this in r/Python but decided to try here first.

I have a script that calls in a JSON file which has a list of devices. I came across Kirk Byers ssh_autodetect.py script that will autodetect the code, which I think is perfect since we are a multivendor shop. I figured i'd make this it's own module and then import it into my main code. Problem is, I guess when it tries to unpack the list of devices, it can't find that variable name even though it's in the main script. It's like when it's run, it's running separately from my main script and any variables I have in my main script are invisible to it.

Is this possible? I imagine it is, but googling has not done much for me at this point. I hope the explanation is clear. Thanks



No comments:

Post a Comment