SlideShare une entreprise Scribd logo
1  sur  19
© Jeremy Schulman - 2018 - All Rights Reserved
Python for Network Engineers
Chapter 1
A Practical Guide for Getting Started
Jeremy Schulman
@nwkautomaniac
© Jeremy Schulman - 2018 - All Rights Reserved
Jeremy Schulman
● Software Engineer
● 20 Years in Industry
● Since 2012 exclusively focused
on "network automation"
● Other Roles:
○ Developer Advocate
○ Systems Engineer
○ Automation Architect
○ Open source contributor
@nwkautomaniac
Slides:
https://www.slideshare.net/
jeremyschulman
Github:
https://github.com/
jeremyschulman
© Jeremy Schulman - 2018 - All Rights Reserved
Obligatory Disclaimer
The views and opinions expressed in this presentation are Jeremy Schulman's and do not represent
any employer past or present.
Reference materials provided in this presentation, such as links to external training sites, do not
represent any form of recommendation.
© Jeremy Schulman - 2018 - All Rights Reserved
Network Engineers need to
competently use Python
so that they can make, and make use of,
power-tools that will improve their jobs.
These tools will not replace them.
© Jeremy Schulman - 2018 - All Rights Reserved
Agenda
● Discussion
○ Realistic expectations
○ Getting started
● Live coding
○ Jupyter Notebook - makes Python feel like a CLI
○ NetOps example exercises
● Where to go from here ...
© Jeremy Schulman - 2018 - All Rights Reserved
"Manual via CLI"
"SNMP based products"
"Vendor Products"
"SDN"
"Orchestration Systems"
"DevOps"
"Network Automation"
"Network Engineers
must become Software
Engineers"
Managing Networks
© Jeremy Schulman - 2018 - All Rights Reserved
"Manual via CLI"
"SNMP based products"
"Vendor Products"
"SDN"
"Orchestration Systems"
"DevOps"
"Network Automation"
"Network Engineers
must become Software
Engineers"
Managing Networks
© Jeremy Schulman - 2018 - All Rights Reserved
Learning any New Skill [1]
Novice Expert MasterCompetent Proficient
Experience over a long time
● Use everyday concrete experiences,
not abstract concepts
● Attaining core competency requires
instructor led training and / or
directed tutorials
Jeremy's key takeaways:
● Attaining proficient skill requires
experience and knowledge
that takes massive time investment
● Continuous mentorship, peer-review,
feedback, learning, experimentation
© Jeremy Schulman - 2018 - All Rights Reserved
Systems are Risky and Complex
Manage Distributed Network Services
High Risk
Complex
Tasks
Low Risk
Simple
Tasks
Configuration
Management
“config”
Situational
Awareness
“show”
Host-Only
(blast radius = 1)
Distributed System
(blast radius > 1)
© Jeremy Schulman - 2018 - All Rights Reserved
Where to start using Python
High Risk
Complex
Tasks
Low Risk
Simple
Tasks
Configuration
Management
“config”
Situational
Awareness
“show”
Host-Only
(blast radius = 1)
Distributed System
(blast radius > 1)
"Your network is a crime scene, and you
are the detective. You need better ways
to investigate what happened, and prove
guilt or innocence".
-- Jeremy
© Jeremy Schulman - 2018 - All Rights Reserved
Live Coding
Make Python *feel* like being on a CLI
http://jupyter.org/
© Jeremy Schulman - 2018 - All Rights Reserved
Jupyter Notebook
$ virtualenv playground
$ source playground/bin/activate
(playground)$ pip install ipython==5 jupyter
Setup a Python virtual-environment
(playground)$ pip install jupyter
Install Jupyter notebook for Python 2.7
Install Jupyter notebook for Python 3
© Jeremy Schulman - 2018 - All Rights Reserved
Jupyter Notebook
(playground)$ jupyter notebook
Start Jupyter notebook system, will launch browser
© Jeremy Schulman - 2018 - All Rights Reserved
Novice Topics
● Variables, duck-typing
● help(), type(), dir()
● pretty-printing
● Importing packages
● List, Dictionary
● Tuple, Set
● Functions
● For-loops
● If / Then / Else
● Working with files
● JSON, YAML files
● List Comprehensions
● Dictionary Comprehensions
● Set Comprehensions
● Collections - Counter
● Collections - defaultdict
© Jeremy Schulman - 2018 - All Rights Reserved
Python Libraries
● ipaddress
● tabulate
● first
● tqdm
● requests
● collections
● csv
● json
● yaml
● gtextfsm
● netmiko
● napalm
● lxml
● paramiko
● bidict
● operator
● itertools
● chain
© Jeremy Schulman - 2018 - All Rights Reserved
NetOps Examples
1. Use NAPALM drivers to execute device-specific CLI commands
a. Arista EOS
b. Cisco NX-OS
2. Process IP routing table information
3. Process LLDP neighbor information
4. Process Interface information
© Jeremy Schulman - 2018 - All Rights Reserved
Next Steps
● Take formal Python courses
● Global Knowledge
● Subscribe to Python News
○ Dan Bader
○ https://www.pythonweekly.com/
● https://www.python.org/
● Try PyCharm IDE
(Integrated Development Environment)
● Use Python every day
● Use Jupyter notebook
● Take industry classes
○ IpSpace
○ NetworkToCode
○ Kirk Byers
● Free Cisco DevNet
Building Novice Skills Building Competency
© Jeremy Schulman - 2018 - All Rights Reserved
Closing Thoughts
"A good network engineer is proficient at
quickly becoming competent."
-- Derick Winkworth (@cloudtoad)
● Be patient. Set realistic goals, both with yourself and
your management
● Consider how long it took you to become a Senior
Network Engineer
© Jeremy Schulman - 2018 - All Rights Reserved
Cheers!
Jeremy Schulman
@nwkautomaniac

Contenu connexe

Tendances

Création de visuels personnalisés avec Power BI Visuals CLI
Création de visuels personnalisés avec Power BI Visuals CLICréation de visuels personnalisés avec Power BI Visuals CLI
Création de visuels personnalisés avec Power BI Visuals CLIDenys Chamberland
 
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online  MớiSlide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online  Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online MớiHiệu Nguyễn
 
Mô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMS
Mô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMSMô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMS
Mô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMSThanh Nguyen
 
Quản lý học sinh cấp 2
Quản lý học sinh cấp 2Quản lý học sinh cấp 2
Quản lý học sinh cấp 2laonap166
 
Hướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controllerHướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controllerlaonap166
 
hệ quản trị cơ sỡ dữ liệu bán vé xem phim
hệ quản trị cơ sỡ dữ liệu bán vé xem phimhệ quản trị cơ sỡ dữ liệu bán vé xem phim
hệ quản trị cơ sỡ dữ liệu bán vé xem phimthuhuynhphonegap
 
VIOS in action with IBM i
VIOS in action with IBM i VIOS in action with IBM i
VIOS in action with IBM i COMMON Europe
 
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online MớiSlide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online MớiHiệu Nguyễn
 
Cloud datacenter network architecture (2014)
Cloud datacenter network architecture (2014)Cloud datacenter network architecture (2014)
Cloud datacenter network architecture (2014)Gasida Seo
 
Nvidia cuda tutorial_no_nda_apr08
Nvidia cuda tutorial_no_nda_apr08Nvidia cuda tutorial_no_nda_apr08
Nvidia cuda tutorial_no_nda_apr08Angela Mendoza M.
 
Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178
Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178
Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178Đồ Án Access 01677525178
 
VMware Esx Short Presentation
VMware Esx Short PresentationVMware Esx Short Presentation
VMware Esx Short PresentationBarcamp Cork
 
Giáo trình ASP.NET - Trung tâm Nhất Nghệ
Giáo trình ASP.NET - Trung tâm Nhất NghệGiáo trình ASP.NET - Trung tâm Nhất Nghệ
Giáo trình ASP.NET - Trung tâm Nhất NghệTrung Thanh Nguyen
 
IBM Z/OS support for z15 - oct 2021
IBM Z/OS support for z15 -  oct 2021IBM Z/OS support for z15 -  oct 2021
IBM Z/OS support for z15 - oct 2021Marna Walle
 
Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215
Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215
Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215Trần Danh Nam
 
VMware Horizon (view) 7 Lab Manual
VMware Horizon (view) 7 Lab Manual VMware Horizon (view) 7 Lab Manual
VMware Horizon (view) 7 Lab Manual Sanjeev Kumar
 

Tendances (20)

Mac os
Mac osMac os
Mac os
 
Création de visuels personnalisés avec Power BI Visuals CLI
Création de visuels personnalisés avec Power BI Visuals CLICréation de visuels personnalisés avec Power BI Visuals CLI
Création de visuels personnalisés avec Power BI Visuals CLI
 
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online  MớiSlide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online  Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
 
Mô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMS
Mô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMSMô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMS
Mô Tả Chức Năng & Báo Giá - phần mềm Quản Lý Hệ Thống Phân Phối SmartBiz DMS
 
Quản lý học sinh cấp 2
Quản lý học sinh cấp 2Quản lý học sinh cấp 2
Quản lý học sinh cấp 2
 
Hướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controllerHướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controller
 
hệ quản trị cơ sỡ dữ liệu bán vé xem phim
hệ quản trị cơ sỡ dữ liệu bán vé xem phimhệ quản trị cơ sỡ dữ liệu bán vé xem phim
hệ quản trị cơ sỡ dữ liệu bán vé xem phim
 
VIOS in action with IBM i
VIOS in action with IBM i VIOS in action with IBM i
VIOS in action with IBM i
 
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online MớiSlide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
Slide Đồ Án Tốt Nghiệp Khoa CNTT Web Xem Phim Online Mới
 
Cloud datacenter network architecture (2014)
Cloud datacenter network architecture (2014)Cloud datacenter network architecture (2014)
Cloud datacenter network architecture (2014)
 
Nvidia cuda tutorial_no_nda_apr08
Nvidia cuda tutorial_no_nda_apr08Nvidia cuda tutorial_no_nda_apr08
Nvidia cuda tutorial_no_nda_apr08
 
Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178
Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178
Quản lý Học Sinh Viên Nhận Làm Đồ án Access 01677525178
 
VMware Esx Short Presentation
VMware Esx Short PresentationVMware Esx Short Presentation
VMware Esx Short Presentation
 
Giáo trình ASP.NET - Trung tâm Nhất Nghệ
Giáo trình ASP.NET - Trung tâm Nhất NghệGiáo trình ASP.NET - Trung tâm Nhất Nghệ
Giáo trình ASP.NET - Trung tâm Nhất Nghệ
 
IBM Z/OS support for z15 - oct 2021
IBM Z/OS support for z15 -  oct 2021IBM Z/OS support for z15 -  oct 2021
IBM Z/OS support for z15 - oct 2021
 
NFV and OpenStack
NFV and OpenStackNFV and OpenStack
NFV and OpenStack
 
Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215
Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215
Nghien cuu-chuan-ket-noi-khong-day-zigbeeieee-80215
 
VMware Horizon (view) 7 Lab Manual
VMware Horizon (view) 7 Lab Manual VMware Horizon (view) 7 Lab Manual
VMware Horizon (view) 7 Lab Manual
 
KMW | GigaTera Company Introduction
KMW | GigaTera Company IntroductionKMW | GigaTera Company Introduction
KMW | GigaTera Company Introduction
 
Network automation (NetDevOps) with Ansible
Network automation (NetDevOps) with AnsibleNetwork automation (NetDevOps) with Ansible
Network automation (NetDevOps) with Ansible
 

Similaire à Python for Network Engineers - A Practical Guide for Getting Started

Automating "Network Ready for Use" with pytest
Automating "Network Ready for Use" with pytestAutomating "Network Ready for Use" with pytest
Automating "Network Ready for Use" with pytestJeremy Schulman
 
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?Tom Paseka
 
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonOSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonNETWAYS
 
Lesson slides for C programming course
Lesson slides for C programming courseLesson slides for C programming course
Lesson slides for C programming courseJean-Louis Gosselin
 
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonOSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonNETWAYS
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureYshay Yaacobi
 
Project Management Journey
Project Management JourneyProject Management Journey
Project Management JourneyChristine Aykac
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisAgileSparks
 
7.4 Admin Tools and Best Practices
7.4 Admin Tools and Best Practices7.4 Admin Tools and Best Practices
7.4 Admin Tools and Best PracticesTargetX
 
NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...
NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...
NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...GetInData
 
Functional Programming in Python
Functional Programming in PythonFunctional Programming in Python
Functional Programming in PythonHaim Michael
 
jBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM SystemsjBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM SystemsJBUG London
 
Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...
Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...
Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...MysoreMuleSoftMeetup
 
Interop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeInterop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeJeremy Schulman
 
SFO15-100K1: Welcome Keynote: George Grey, Linaro CEO
SFO15-100K1: Welcome Keynote: George Grey, Linaro CEOSFO15-100K1: Welcome Keynote: George Grey, Linaro CEO
SFO15-100K1: Welcome Keynote: George Grey, Linaro CEOLinaro
 
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptxPrinceton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptxSubhasRoy11
 

Similaire à Python for Network Engineers - A Practical Guide for Getting Started (20)

Automating "Network Ready for Use" with pytest
Automating "Network Ready for Use" with pytestAutomating "Network Ready for Use" with pytest
Automating "Network Ready for Use" with pytest
 
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
 
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonOSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
 
Lesson slides for C programming course
Lesson slides for C programming courseLesson slides for C programming course
Lesson slides for C programming course
 
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonOSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Project Management Journey
Project Management JourneyProject Management Journey
Project Management Journey
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
 
IBM Agile ALM Overview
IBM Agile ALM OverviewIBM Agile ALM Overview
IBM Agile ALM Overview
 
7.4 Admin Tools and Best Practices
7.4 Admin Tools and Best Practices7.4 Admin Tools and Best Practices
7.4 Admin Tools and Best Practices
 
NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...
NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...
NLP for videos: Understanding customers' feelings in videos - Albert Lewandow...
 
Functional Programming in Python
Functional Programming in PythonFunctional Programming in Python
Functional Programming in Python
 
Industrialiser spark
Industrialiser sparkIndustrialiser spark
Industrialiser spark
 
jBPM5 Developer Guide Presentation JBUG London
jBPM5 Developer Guide Presentation JBUG LondonjBPM5 Developer Guide Presentation JBUG London
jBPM5 Developer Guide Presentation JBUG London
 
jBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM SystemsjBPM5 - The Evolution of BPM Systems
jBPM5 - The Evolution of BPM Systems
 
Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...
Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...
Log4j2 - A deep dive into the logging services in Mulesoft with On-Prem deplo...
 
Interop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeInterop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough Code
 
New Relic
New RelicNew Relic
New Relic
 
SFO15-100K1: Welcome Keynote: George Grey, Linaro CEO
SFO15-100K1: Welcome Keynote: George Grey, Linaro CEOSFO15-100K1: Welcome Keynote: George Grey, Linaro CEO
SFO15-100K1: Welcome Keynote: George Grey, Linaro CEO
 
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptxPrinceton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
Princeton-NJ-Meetup-MuleSoft SumoLogic Integration.pptx
 

Plus de Jeremy Schulman

Network Config Backups - Netbox, Github, Ansible
Network Config Backups - Netbox, Github, AnsibleNetwork Config Backups - Netbox, Github, Ansible
Network Config Backups - Netbox, Github, AnsibleJeremy Schulman
 
The Datacenter Network You Wish You Had
The Datacenter Network You Wish You HadThe Datacenter Network You Wish You Had
The Datacenter Network You Wish You HadJeremy Schulman
 
The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014Jeremy Schulman
 
A Networking View for the DevOps Crew: SDN
A Networking View for the DevOps Crew: SDNA Networking View for the DevOps Crew: SDN
A Networking View for the DevOps Crew: SDNJeremy Schulman
 
A Network Engineer's Approach to Automation
A Network Engineer's Approach to AutomationA Network Engineer's Approach to Automation
A Network Engineer's Approach to AutomationJeremy Schulman
 

Plus de Jeremy Schulman (6)

Network Config Backups - Netbox, Github, Ansible
Network Config Backups - Netbox, Github, AnsibleNetwork Config Backups - Netbox, Github, Ansible
Network Config Backups - Netbox, Github, Ansible
 
The Datacenter Network You Wish You Had
The Datacenter Network You Wish You HadThe Datacenter Network You Wish You Had
The Datacenter Network You Wish You Had
 
The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014
 
A Networking View for the DevOps Crew: SDN
A Networking View for the DevOps Crew: SDNA Networking View for the DevOps Crew: SDN
A Networking View for the DevOps Crew: SDN
 
About Jeremy Schulman
About Jeremy SchulmanAbout Jeremy Schulman
About Jeremy Schulman
 
A Network Engineer's Approach to Automation
A Network Engineer's Approach to AutomationA Network Engineer's Approach to Automation
A Network Engineer's Approach to Automation
 

Dernier

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Python for Network Engineers - A Practical Guide for Getting Started

  • 1. © Jeremy Schulman - 2018 - All Rights Reserved Python for Network Engineers Chapter 1 A Practical Guide for Getting Started Jeremy Schulman @nwkautomaniac
  • 2. © Jeremy Schulman - 2018 - All Rights Reserved Jeremy Schulman ● Software Engineer ● 20 Years in Industry ● Since 2012 exclusively focused on "network automation" ● Other Roles: ○ Developer Advocate ○ Systems Engineer ○ Automation Architect ○ Open source contributor @nwkautomaniac Slides: https://www.slideshare.net/ jeremyschulman Github: https://github.com/ jeremyschulman
  • 3. © Jeremy Schulman - 2018 - All Rights Reserved Obligatory Disclaimer The views and opinions expressed in this presentation are Jeremy Schulman's and do not represent any employer past or present. Reference materials provided in this presentation, such as links to external training sites, do not represent any form of recommendation.
  • 4. © Jeremy Schulman - 2018 - All Rights Reserved Network Engineers need to competently use Python so that they can make, and make use of, power-tools that will improve their jobs. These tools will not replace them.
  • 5. © Jeremy Schulman - 2018 - All Rights Reserved Agenda ● Discussion ○ Realistic expectations ○ Getting started ● Live coding ○ Jupyter Notebook - makes Python feel like a CLI ○ NetOps example exercises ● Where to go from here ...
  • 6. © Jeremy Schulman - 2018 - All Rights Reserved "Manual via CLI" "SNMP based products" "Vendor Products" "SDN" "Orchestration Systems" "DevOps" "Network Automation" "Network Engineers must become Software Engineers" Managing Networks
  • 7. © Jeremy Schulman - 2018 - All Rights Reserved "Manual via CLI" "SNMP based products" "Vendor Products" "SDN" "Orchestration Systems" "DevOps" "Network Automation" "Network Engineers must become Software Engineers" Managing Networks
  • 8. © Jeremy Schulman - 2018 - All Rights Reserved Learning any New Skill [1] Novice Expert MasterCompetent Proficient Experience over a long time ● Use everyday concrete experiences, not abstract concepts ● Attaining core competency requires instructor led training and / or directed tutorials Jeremy's key takeaways: ● Attaining proficient skill requires experience and knowledge that takes massive time investment ● Continuous mentorship, peer-review, feedback, learning, experimentation
  • 9. © Jeremy Schulman - 2018 - All Rights Reserved Systems are Risky and Complex Manage Distributed Network Services High Risk Complex Tasks Low Risk Simple Tasks Configuration Management “config” Situational Awareness “show” Host-Only (blast radius = 1) Distributed System (blast radius > 1)
  • 10. © Jeremy Schulman - 2018 - All Rights Reserved Where to start using Python High Risk Complex Tasks Low Risk Simple Tasks Configuration Management “config” Situational Awareness “show” Host-Only (blast radius = 1) Distributed System (blast radius > 1) "Your network is a crime scene, and you are the detective. You need better ways to investigate what happened, and prove guilt or innocence". -- Jeremy
  • 11. © Jeremy Schulman - 2018 - All Rights Reserved Live Coding Make Python *feel* like being on a CLI http://jupyter.org/
  • 12. © Jeremy Schulman - 2018 - All Rights Reserved Jupyter Notebook $ virtualenv playground $ source playground/bin/activate (playground)$ pip install ipython==5 jupyter Setup a Python virtual-environment (playground)$ pip install jupyter Install Jupyter notebook for Python 2.7 Install Jupyter notebook for Python 3
  • 13. © Jeremy Schulman - 2018 - All Rights Reserved Jupyter Notebook (playground)$ jupyter notebook Start Jupyter notebook system, will launch browser
  • 14. © Jeremy Schulman - 2018 - All Rights Reserved Novice Topics ● Variables, duck-typing ● help(), type(), dir() ● pretty-printing ● Importing packages ● List, Dictionary ● Tuple, Set ● Functions ● For-loops ● If / Then / Else ● Working with files ● JSON, YAML files ● List Comprehensions ● Dictionary Comprehensions ● Set Comprehensions ● Collections - Counter ● Collections - defaultdict
  • 15. © Jeremy Schulman - 2018 - All Rights Reserved Python Libraries ● ipaddress ● tabulate ● first ● tqdm ● requests ● collections ● csv ● json ● yaml ● gtextfsm ● netmiko ● napalm ● lxml ● paramiko ● bidict ● operator ● itertools ● chain
  • 16. © Jeremy Schulman - 2018 - All Rights Reserved NetOps Examples 1. Use NAPALM drivers to execute device-specific CLI commands a. Arista EOS b. Cisco NX-OS 2. Process IP routing table information 3. Process LLDP neighbor information 4. Process Interface information
  • 17. © Jeremy Schulman - 2018 - All Rights Reserved Next Steps ● Take formal Python courses ● Global Knowledge ● Subscribe to Python News ○ Dan Bader ○ https://www.pythonweekly.com/ ● https://www.python.org/ ● Try PyCharm IDE (Integrated Development Environment) ● Use Python every day ● Use Jupyter notebook ● Take industry classes ○ IpSpace ○ NetworkToCode ○ Kirk Byers ● Free Cisco DevNet Building Novice Skills Building Competency
  • 18. © Jeremy Schulman - 2018 - All Rights Reserved Closing Thoughts "A good network engineer is proficient at quickly becoming competent." -- Derick Winkworth (@cloudtoad) ● Be patient. Set realistic goals, both with yourself and your management ● Consider how long it took you to become a Senior Network Engineer
  • 19. © Jeremy Schulman - 2018 - All Rights Reserved Cheers! Jeremy Schulman @nwkautomaniac