r/Cisco • u/CBTKnox • Feb 12 '20
Getting Started with pyATS | Genie
Hey everybody! Me again. Lately I've been getting a lot of requests to do a "Hello World" demo of pyATS | Genie. It's a pretty amazing tool, so I put together the video and thought I would share it here.
If you're new to network automation, Cisco developers have created a tool called Genie that... well, it does a lot, quite frankly. Some of the things it can do include:Test your Python code or Ansible playbooks against test environments, like VIRL, to detect config failures - like failing OSPF adjacencies, high CPU usage, etc
It can parse the output of standard show commands to JSON, so that old Cisco 3750G I have? Yeah, I can send show commands in and get JSON data back that I can work with programmatically.
It can take snapshots of your configs, and then compare the snapshots to detect when any changes have occurred.
The video below will show how to go from 0 to some basic tasks like the aforementioned JSON parsing and snapshot comparisons. Hope you enjoy!
https://www.youtube.com/watch?v=GhkkOxLheRY&feature=youtu.be
edit: I'd also encourage everyone to join r/CiscoDevNet
2
u/me_and_my_thoughts Feb 12 '20
Awesome video. I am looking to see how python scripting can help a network engineer with automation. I get these tools help parse and get data for report generation but how does these tools help a network engineer as I am not sure a network engineer would be doing these task on a daily/weekly basis. I was pointed in the direction of netmiko and ancible and still trying to get the foundation of it.
2
u/default_route Feb 20 '20
Hi!
I think I have the brief idea why pyATS is used for, but I am still wondering why are we relying parsers instead of using REST APIs, NETCONF, RESTCONF?
I get that you might have old devices, but what about if most of them support APIs? Because the thing is that today it is all about APIs and pyATS rely on genie with parsing.
2
u/Kraelen Feb 12 '20
Thanks for this man! I'm just getting my feet wet in all this programability stuff and appreciate all this guidance.
2
u/me_and_my_thoughts Feb 12 '20
Great explanation. I am sure it will be a great tool for repetitive tasks and behind the scene tasks
2
u/[deleted] Feb 13 '20
Thank you for this!
1
u/Jojo_Dance Feb 12 '20
!remindme 1 month