Python, Genie and CSV Files = Easy Network Automation (DevNet)
Вставка
- Опубліковано 2 лип 2019
- Want to automate networks easily? Use Python, CSV files and Cisco Genie (pyATS). Hank Preston shows us how to connect to live devices and automate the network.
Menu:
1:15 - Start Python Virtual Environment
4:10 - Install VIRL utils
6:12 - Genie Install
8:10 - Genie Inventory file (testbed file)
12:05 - Install iPython
12:30 - Create and use Genie Python Script
32:00 - Python Script with multiple devices
Videos mentioned and references:
CSV Part 1: • Network Engineers are ...
Genie Intro Video: • Genie makes all your n...
VIRL Utils: • Free Cisco VIRL server...
Which network automation tool should I learn? • Which Network Automati...
pyATS and Genie on DevNet: bit.ly/2KVshrt
NetDevOps Live Episode on Python Libraries including CSV: bit.ly/2xrowkK
Network programmability Basics Video Series covering CSV: bit.ly/325FxPB
Code Samples Repo github.com/hpreston/network_i...
Final Code Sample github.com/hpreston/network_i...
Interactive Walkthrough github.com/hpreston/network_i...
#DevNet #DevNetAssociate #DevNetAssociateCertification
Menu:
1:15 - Start Python Virtual Environment
4:10 - Install VIRL utils
6:12 - Genie Install
8:10 - Genie Inventory file (testbed file)
12:05 - Install iPython
12:30 - Create and use Genie Python Script
32:00 - Python Script with multiple devices
Videos mentioned and references:
CSV Part 1: ua-cam.com/video/PB9D4RqBaQw/v-deo.html
Genie Intro Video: ua-cam.com/video/unOmwDsMj8k/v-deo.html
VIRL Utils: ua-cam.com/video/S0jfZLobFdU/v-deo.html
Which network automation tool should I learn? ua-cam.com/video/jsh4XUPZTWE/v-deo.html
pyATS and Genie on DevNet: bit.ly/2KVshrt
NetDevOps Live Episode on Python Libraries including CSV: bit.ly/2xrowkK
Network programmability Basics Video Series covering CSV: bit.ly/325FxPB
Code Samples Repo github.com/hpreston/network_info_scripts
Final Code Sample github.com/hpreston/network_info_scripts/blob/master/interface_report.py
Interactive Walkthrough github.com/hpreston/network_info_scripts/blob/master/interface_report_interactive.py
Awesome Video!!
Thanks David and Hank! Great to see live coding. I used to be frustrated as my scripts always fail on the first try. It's good to see how it is. Thanks again!
Thank you David & Hank
This was very helpful, grabbing data out of devices
and next show was working on configs based on csv files you created previously and generating configs
this is How Networking & Programming work together.
Thanks again
You two do great videos! Thank you! I just started learning python after completing CCNP R&S - DevOps is surely the way to go next. After Security that is.
More videos like this please !
Hi David,
In my opinion, keep the granular step by step approach in your videos, as well as your repetition, it's these methods that keep you ahead of the rest on UA-cam. Network automation and programmability are complex subjects, it's a huge knowledge shift from a traditional network engineers roles and responsibilities. Keep it clear, keep it concise, show the process in full, just my 2c.
Keep up the awesome work :-)
This was very cool David and Hank!
Thanks for this David and Hank.
Great video, please do more live coding!! Is really fun learning like that!
Loving the DevNet videos.
Thank you so much David...You are our inspiration 👍😊
Hank is a legend
This is awesome, Thanks David
Thank you both !
Thanks David!
Great Job
@David Bombal
wow sir,
I have watched a bit of this video before but I wasn't care .
but now i found it and watched it again and I started to laught as you and hank laughting like I am sitting with you at that moment.
very awesome I need to learn alot , the thing is when they are 20 devices it gives error but after he cut some of the devices the script completed successfully
thank you so much
Hey Guys. Awesome Video, thank you. Is there a chance to show us how you would use git in this development process. As u finally made me understand how to use env. I wish I would understand git.
David, Thanks to you and Hank for the great information. Do you have any idea when Windows will be a supported platform for Genie? Although I agree that engineers should have Linux experience, that just isn't always the case and so I am looking to develop my application native to windows.
Not sure Tony, but it may be worth asking here: developer.cisco.com/site/support/
Hello David, is there a param in the 'testbed.devices[device].parse('show interfaces', param=False), so that we don't get all the 'show interface' data on screen?
do you have details about how to setup a custom virl lab hosted by cisco that you connect to?
Please don't prep behind the scenes...!!! 😨 I always like to see the full process to get from nothing-to-platform..!!! 😎👌 Thanks..!!! 🤜💯🤛
🤔 Thank you
Hi David/ Hank
Does Genie support Cisco WLCs (AirOS)? or any plans to add it into it?
Great video BTW
Hi, I am trying to connect to a switch but pyats always stops at the prompt 'ISETACACSPASSWORD:' and does not go forward. Although, I am able to connect to devices that are not on ISE TACACS with Pyats. Could you please help me resolve this issue? Thank you
Ran command as illustrated.
testbed = Genie.init("testbed.yaml")
Received:
TypeError: Argument should be a path to a pyATS testbed file
Checked developer.cisco.com/docs/pyats/api/
No solution found.
Any suggestion?
No prep, way better to see the whole process......imho
Hi David,
i'm having an issue while installing Genie
Command "/root/GENIE/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-r32bja66/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-0n22jncl-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/GENIE/include/site/python3.6/psutil" failed with error code 1 in /tmp/pip-build-r32bja66/psutil/
what would be this?
It seems like he is going backward by using CLI String Parsing instead of using the YANG models that he appeared to be so invested in, in previous videos. It appears that he PREFERS to use the CLI String Parser, much like using TextFSM.
I have a phrase,!! I'll put it to code instead.
1st!
where is this file testbed.yaml