Python Skills and Techniques for Network Engineers, Part 1

preview_player
Показать описание


Topics Covered - Time Links
- Agenda 1:00
- Better Code Style / Sharing 3:59
- The Sh-Bang Line 4:11
- Doc Strings 6:43
- Demo: Sh-Bang and Doc Strings 8:42
- Coding Style and Linting with Flake8 12:39
- Black and White Code Formatters 15:37
- Demo: Linting and Code Formatting 17:00
- Short look at licenses 19:07
- More Reusable Code 20:45
- Functions 21:01
- Modules 23:39
- Demo: Functions and Modules 26:09
- Packages 29:10
- Demo: Packages 31:50
- Classes and Objects 35:29
- Demo: Objects 38:48
- More Robust Code 40:11
- Try... Except... 40:21
- Test, don't assume 44:40
- Demo: Exception Handling 46:10
- Simple Command Line Tools with argparse 48:24
- Environment Variables 50:08
- Demo: CLI and ENV 52:05
- Summing Up 54:49
- Webinar Resources 55:21
- Code Exchange Challenge 56:06
- Contact Info 57:01

Episode Description:
You're writing Python code to solve your network configuration and operational challenges. You've mastered libraries like Netmiko, ncclient, and requests. You can manipulate XML, JSON and YAML like a pro. You've saved yourself and your organization hours with your work, but you're still a bit embarrassed by your code... Don't worry, you are not alone.

Most network engineers didn't start as developers, we kinda just learned as we went, hacking together something that "worked". In this session you'll learn simple coding skills and techniques that you can use today to make your code something you'll be proud to share and show off.

Рекомендации по теме
Комментарии
Автор

Great presentation Hank, thanks for sharing your knowledge with us!

wairisson
Автор

So much great stuff in this presentation. I have only been coding in python right at a year now. Network engineer to start trying to steam roll my way into DevOps! I have seen linters thrown around in forums all the time but never really knew what they did or how to use them, so thanks for that!. Another great add was the environment variables.. As most i struggled with how to handle my network creds in a script with out actually putting them in my scripts (Learned Linux at the same time as learning python). After a lot of searches I finally came to the environ variables!! Wish I could comment on every aspect of this video, but would read all that lol.. Anyways, thanks for all the great info!

patoco
Автор

This is AWESOME. Wishing I'd been on this 2 years ago.

defaultroute
Автор

So much to learn this being an network engineer..yet trying to catch this up !! Will be helpful if someone dictate where to start from

siddcfc
Автор

Learning so much... as i go through :)! Thanks Hank.

AD-wgbg
Автор

This is awesome delivery and tutorial thanks Hank

jjbb
Автор

Unix System Resoucres ;) Great video and some really helpful detail delivered at a nice pace!

CainanParker
Автор

Hank, Really enjoyed all the way.. and appreciate your efforts. Please do Pyang sessions in depth, that will be definitely useful. It will definitely help in NSO and yang implementation in real time. hope you will do this .. thanks alot

rajeshreddyn
Автор

informative session but I was hoping to get something about real networking, like libraries to exchange data between machines, networking services, TCP/IP, etc..

karthikkumaresan
Автор

Much appreciated.
Please note example1.py will not work on Windows since the module os.getuid() does not exist in module os for Windows on Python3

AndreThompson
Автор

Thanks for this, enjoyed the video and picked up some good info from you. Do you have examples on organizing code for CLI scraping sessions using netmiko, paramiko etc? I have been playing with python for 6 months, and I still find it quite tedious and very frustrating. I wish we had API available in our environment, but I'm not so lucky :). I have written a script to take user input for a IP address, and find out what switch and port the host is connected to when in an extended OTV data center environment. It solves the problem of where does my host really live, without doing manual traceroute, arp, OTV route mac lookups every time. The challenge I face is, the script takes 30 seconds to run, due to the nature of netmiko having to wait for responses before continuing on with the next part of the script. i'm looking for ways to help speed that up, but i'm not sure if it's possible with CLI scraping?

ejnixon
Автор

Where can we get code for cisco live netdevops series to practice ?

ParthPatel-jnio
Автор

Much appreciated.
Please note example1.py will not work on Windows since the module os.getuid() does not exist in module os for Windows on Python3

fgbmfitrinidadandtobago