Python Network Automation
Agile Coach, ARTIFICIAL INTELLIGENCE, Block chain, Business Analyst BA, DATA science, Development, Devops Automation, Dotnet, Education, Free Job training and assistance, Information, Infrastructure automation, Interview questions, JAVA, jobs, Learn, Machine learning, Python Automation, QA Automation, RPA Automation, SAP crm, Scrum master Agile, Skill, UI Design Jun 1, 2022 23 Comments
This is some of what I have been learning with Python and guess what??? YOU CAN DO IT TOO!!!
You can see all of the files that were used here on my #github page – https://github.com/ospfpacket/python_ospf_lab
Get your lab up and running by checking out my video on Eve-NG on VMWare Workstation https://www.youtube.com/watch?v=prqnFjJ5stg&t=433s
source
Leave us a comment Cancel reply
COMMON QUESTIONS
Categories
- Agile Coach
- ARTIFICIAL INTELLIGENCE
- Block chain
- Business Analyst BA
- DATA science
- Development
- Devops Automation
- Dotnet
- Education
- Free Job training and assistance
- Information
- Infrastructure automation
- Interview questions
- JAVA
- jobs
- Learn
- Machine learning
- Python Automation
- QA Automation
- RPA Automation
- SAP crm
- Scrum master Agile
- Skill
- UI Design
- Uncategorized
FREQUENTLY ASKED QUESTIONS
We use cookies to provide you with the best possible user experience. By continuing to use our site, you agree to their use. Learn more
23 Comments
Daniel Barron
Jun 01, 2022 18:09 pmGreat content and encouragement!
Carlos Nyambo
Jun 01, 2022 18:09 pmhie please how can l contact l need assistance on my python project
KomradWide
Jun 01, 2022 18:09 pmWhat level of knowledge in programming do you exactly need to be able to do network automation? Basic? Intermediate? Expert level?
ZimCanIT
Jun 01, 2022 18:09 pmGreat video! What is the function of _pycache_ ?
Alex Popa
Jun 01, 2022 18:09 pmGood stuff man. You should look into Threads and execute all configs concurently.
Network Automator
Jun 01, 2022 18:09 pmThanks for this encouragement!
I would like to think I’m fairly new to networking but then again…been in IT game for years lol.
I am fortunate enough to be running several catalysts L3 switches with 15.9 IOS. I am designing L3 spine/leaf architecture as my lab with 5 leafs and 2 spine fortunate enough to have 10gig etherchannel uplinks between spine and leafs. One of the most repetitive thing was on-boarding out of the box each spine and leaf. Luckily. I was able to use python serial module to automate the entire on boarding process (setting up ssh, management vlan those two where the main ones).
Then came the next actually on-boarding the spine or leaf into the fabric!
I managed to use netMiko module but my code was so inefficient! Similar issue you had where you was ssh into each devices separately, send separate config for each router etc.
I never used the zip function but you encouraged me to use serialisation YAML, so that I was able to feed the YML config into my Python code for loop. Learning YAML was the deal breaker! I created a single YAML file with all the devices (the entities and atttributes)(key:Value). Once I learned how to use nested for loops it was game time. All I needed to change was YML file e.g OSPF advertised networks and all else such as ECMP for each leaf etc. was the same! All leafs are trunking VLANs from ESXi host(that portion of the fabric is L2)
Here’s my surprise the actual python code was like 10 lines. LoL it was just looping for each device and getting the config from YAML. You could use Json or even xml! I don’ t need to change the python code just the YAML config!
My point is for efficiency you need to learn how to dump and load config a from a serialisation language(json, yml or xml)
I will post all codes on GitHub, I’m considering writing a module specifically for python Cisco console serial automation for cli/iOS.
iOS-xe has a awesome zero-touch on boarding functionality!
Please may I remind everyone I am just a help desk guy. Studying for CCNA. Learned all this in about 3-5months
Jamil Haussmann
Jun 01, 2022 18:09 pmGreat job man
Matthew Smith
Jun 01, 2022 18:09 pmAwesome and stay humble
e0b1ff
Jun 01, 2022 18:09 pmGreat work!
Mr Fister
Jun 01, 2022 18:09 pmI may be missing something, as I'm quite the noob when it comes to networking, but if you have to configure ip addresses etc at the device, why not just copy and paste the full config?
J Rockford
Jun 01, 2022 18:09 pmLoad GENIE AND NAPALM
George Smith
Jun 01, 2022 18:09 pmHello friend. You should look into threads and thread pool. This way instead of configuring each router serially, you can configure them all together. I always use threads because I have to configure 600-700 routers.
gussta1
Jun 01, 2022 18:09 pmGreat vid….thanks for sharing. What python resources did you use?
Subham Singh ray
Jun 01, 2022 18:09 pmHii I just want to automate my login into server that I have automated with the help of python pexpect module….
But I want if I am login into my server and for long time I am not doing anything on my server then it should automatically logout from the server…
How this automatically logout from the server,if for long time I am not doing any work on server could be coded in python???
Angel A
Jun 01, 2022 18:09 pmhell yea brotha, keep it up
head inthekloudz
Jun 01, 2022 18:09 pmHow long did it take you to learn python? And do you pay for vmware?
head inthekloudz
Jun 01, 2022 18:09 pmNashty
Hobbyist Shooter
Jun 01, 2022 18:09 pmGreat work! You might want to checkout Nornir, a great framework to push configuration to your network devices much faster.
Guy H
Jun 01, 2022 18:09 pmThanks heaps sir!
William Humphrey
Jun 01, 2022 18:09 pmKeep up the good work !
Brent Harrison
Jun 01, 2022 18:09 pmZip function saved the day!!
Steven
Jun 01, 2022 18:09 pmNice Video!
William Humphrey
Jun 01, 2022 18:09 pmGreat job !