Tuesday, August 17, 2021

Parsing Version Code on Arista Switches Using Nornir

Hello all.

I have a small Nornir script which runs against all of my Arista Switches and basically does a show version. Nornir is new to me while I have a little bit of Python experience. What i'm trying to do is pull only the version of code that is running on each device, and if it's not equal to the code that should be running on it, it will go out to an FTP site, download the correct version and install it.

I would be able to figure this out with Python, but I don't see how I could do this using Nornir. I tried using the splitlines method on my variable (below), but you can't use it on run module apparently.

Any suggestions or direction would be much appreciated. Thank you.

My variable is as follows: result = Router.run(netmiko_send_command, command_string="show version")



No comments:

Post a Comment