Parse Cisco IOS to JSON with Python and Netmiko

  Рет қаралды 22,357

Data Knox

Data Knox

Күн бұрын

Пікірлер: 45
@Nightmaremaker85
@Nightmaremaker85 Жыл бұрын
3 years... i´m so late in this world... thank you man.
@vzylexy1506
@vzylexy1506 Жыл бұрын
This video is an absolute gold mine, thank you so much!
@SnortDefence
@SnortDefence 2 жыл бұрын
Nice vlog @knox.. look forward to see more example of custom perser to read some of cisco IOS tech-support logs
@alinbandiu
@alinbandiu 4 жыл бұрын
JUST WANT TO SAY THANK YOU !!! I managed to get the output in json format ! Now it's much more easy to get this output into my flask web api and show there just the relevant output ! thank you x999999
@DataKnox
@DataKnox 4 жыл бұрын
Rock on! Check out my video on PyATS, too! Another easy way to accomplish this
@kenmurphy4259
@kenmurphy4259 4 жыл бұрын
Great Video Knox, well explained!
@DataKnox
@DataKnox 4 жыл бұрын
Thanks!
@fungolattaa7858
@fungolattaa7858 2 жыл бұрын
its really great thanks knox
@paulheavens1170
@paulheavens1170 3 жыл бұрын
Great video! Thank you for explaining all the little bits.
@Paracomerteabesos
@Paracomerteabesos 3 жыл бұрын
Great video! Saludos desde Argentina
@BlindPigBluesBand
@BlindPigBluesBand 4 жыл бұрын
What a great video!!!!!! Thank you! I loved how you unpacked the dictionary. I did not know that one. Great energy delivering content. So cool
@brandonknight6521
@brandonknight6521 2 жыл бұрын
Great video, thank you!!
@sauvus
@sauvus 4 жыл бұрын
Always love the T-shirts!
@leonmflai
@leonmflai 3 жыл бұрын
Great video. Great sharing
@muhammadyasser4551
@muhammadyasser4551 4 жыл бұрын
This I a great work honestly and a great timing as well,I have just received a task to use Netmiko with JSON output ,but
@muhammadyasser4551
@muhammadyasser4551 4 жыл бұрын
when I use pipeline and other commands like uptime = connection.send_command("show version | in uptime", use_textfsm=True) the output is JSON but with many keys and value which I don't want type in the pipeline typically [ { "running_image": "", "reload_reason": "", "hostname": "admin", "uptime": "24 minutes", "config_register": "", "hardware": [], "mac": [], "version": "", "serial": [], "rommon": "" } ]
@muhammadyasser4551
@muhammadyasser4551 4 жыл бұрын
I hope to find the answer,,,Thank you
@DataKnox
@DataKnox 4 жыл бұрын
Just omit the pipe and parse out the response as a Python dict. For instance, the uptime item above try: c = ConnectHandler(**switch) c.enable() versions = c.send_command('show version', use_textfsm=True) uptime = versions[0]['uptime'] print(uptime) c.disconnect() except Exception as e: print(e)
@muhammadyasser4551
@muhammadyasser4551 4 жыл бұрын
@@DataKnox In somehow it worked ... thank you so much keep it up , Hope to see more videos soon
@Ogunmos
@Ogunmos 4 жыл бұрын
Jeez. This is awesome!
@DataKnox
@DataKnox 4 жыл бұрын
I wish someone had told me about it sooner! Haha
@anouartouil3645
@anouartouil3645 3 жыл бұрын
great video, i am doing exactly the same thing as you but with Netgear Switch , am i getting false json output because there is no template for netgear ?
@paulheavens1170
@paulheavens1170 3 жыл бұрын
Do we still have to install ntc-templates separately? It seems to be included with Netmiko now?
@muhammad.rafi2012
@muhammad.rafi2012 4 жыл бұрын
thats awesome Knox, I was wondering can this also be accomplished via Genie ?
@DataKnox
@DataKnox 4 жыл бұрын
Here you go! kzbin.info/www/bejne/sJvdon17mqqLbJI
@themarksman1
@themarksman1 2 жыл бұрын
I wanted to parse "sh hsrp ipv4 brief" output in IOS-XR to JSon. No luck so far. I guess I will have to work on the plain text using splitlines() & regex
@kenmurphy4259
@kenmurphy4259 4 жыл бұрын
Great video Knox, love this stuff, more please! I think Netmiko uses c.disconnect() instead of c.close()
@DataKnox
@DataKnox 4 жыл бұрын
It sure does use disconnect() ! Good catch!
@paullukacs9321
@paullukacs9321 4 жыл бұрын
Data, fantastic explanation and examples. Could you post the format of your env.py file?
@DataKnox
@DataKnox 4 жыл бұрын
There is a .env file (dot env) .. It reads similar to this username='ssh user' password='ssh pw' secret='enable secret' NET_TEXTFSM='/home/knox/Documents/CodeSamples/Python/Networking/IOS/ntc-templates/templates'
@andreslopez180
@andreslopez180 4 жыл бұрын
Hey Knox awesome video. One small request dough. I will really appreciated if you can make a video explaining how use Netmiko and paramiko, how to install it on a windows environment and integrated with VS. I have been really struggling to get it to work. Thanks sir.
@DataKnox
@DataKnox 4 жыл бұрын
Hey Bryan! I cover Netmiko in our ENAUTO course, albeit briefly. I’m hoping to do some dedicated Netmiko (plus PyATS) content later! Thanks!
@ahrisho
@ahrisho 4 жыл бұрын
Ha. Awesome shirt.
@chiyupao5497
@chiyupao5497 4 жыл бұрын
love from china
@DataKnox
@DataKnox 4 жыл бұрын
🙏❤️
@techevangelist8373
@techevangelist8373 4 жыл бұрын
Subscribed👍
@DataKnox
@DataKnox 4 жыл бұрын
Thank you, friend! Let me know what you’d like to see next!
@techevangelist8373
@techevangelist8373 4 жыл бұрын
@@DataKnox i have started learning python recently..feel like some of fundamentals are ok now like lists, dictionary tuples conditional statements...now i am looking for a code that will track the switchport from its ip address..i found one in git and i just copy pasted and try to run it but it threw tracebacks..lol..looks like some basics i am missing here..github.com/routetehpacketz/cisco-ip-trace. Can you explain how to make this work or atleast start doing some videos on similar codes...like automating some real life repetitive tasks.......by the way, all you CBTians are awesome guys...full of energy...👍👍👍thanks for finding some time to reply my message...
@DataKnox
@DataKnox 4 жыл бұрын
tech evangelist I haven’t seen this but I will check it out!
@techevangelist8373
@techevangelist8373 4 жыл бұрын
@@DataKnox great thank you...keep doing what you are doing today...👍
@nancyestanislao2059
@nancyestanislao2059 4 жыл бұрын
Is It posible using this with iosxr? 😳
@KacperMurat
@KacperMurat 2 жыл бұрын
yes, you need to use 'cisco_xr' instead of 'cisco_ios' in 'device_type' :)
@emmanueloluwayemisi
@emmanueloluwayemisi 3 жыл бұрын
Nice tutorial pls how can i hide my password
@chrisrogers1092
@chrisrogers1092 2 жыл бұрын
You're totally wrong about ssh on that device. It most definitely supports ssh.
Stream Cisco IOS to Power BI | EASY Live Streaming Telemetry
28:27
pyATS | Genie - Getting Started!
11:01
Data Knox
Рет қаралды 20 М.
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 20 МЛН
Yay😃 Let's make a Cute Handbag for me 👜 #diycrafts #shorts
00:33
LearnToon - Learn & Play
Рет қаралды 117 МЛН
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
YANG Explained and Explored | Pyang | DevNet | CCNP
13:36
Data Knox
Рет қаралды 17 М.
JSON: Everything you need to know, in 30 minutes
26:52
Cisco U. by Learning & Certifications
Рет қаралды 918
How to Automate Networks with NAPALM and Python!
9:24
Data Knox
Рет қаралды 10 М.
Python and Linux on Cisco IOS?
29:04
David Bombal
Рет қаралды 28 М.
How to PASS the Cisco DevNet Associate in 2020
14:36
Data Knox
Рет қаралды 13 М.
Python Skills and Techniques for Network Engineers, Part 1
57:54
Cisco DevNet
Рет қаралды 56 М.
Ansible EXPLAINED for Network Engineers | DevNet | CCNA
8:11
Data Knox
Рет қаралды 11 М.
SSH Configuration with Netmiko
13:45
Kevin Wallace Training, LLC
Рет қаралды 31 М.
Deep Dive Into Model Driven Programmability with NETCONF and YANG
59:34
How to Filter Cisco CLI Output
11:54
The Tech Catalyst
Рет қаралды 7 М.
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 20 МЛН