• Tag : JSON

 
 

JSON responces

Hi, I work with your equipment and I need to know the system parameters. In my work I use pyeapi. I retrieve data using commands: Hi, I work with your equipment and I need to know the system parameters. In my work I use pyeapi. conn.execute(['show mac address-table']) conn.execute(['show interfaces status']) and so on I inherited the code and now I am having difficulty parsing data from JSON Could you give a link to the data structure so that I can better analyze JSON ?  

“show run” eAPI response

Hello All, I wanted to parse some values from eAPI output of “show running-config” of a device. I have attached the sample response from one of my device. In this, the commands are not split in “key” and “value” format. I.e. for eg. “ip address” should be the “key” and actual IP should be its “value”. But ip address and actual IP coming in “key” part and value part shows “null”. Is there an alternate way to utilise this output to parse the value? Also when can we expect show run output in parsable format? Thanks in advance!

Interface MTU with JSON and Python

Hi, I am trying to do something which I thought would be fairly simple using the EOS API, alas it is causing me some issues. I want to run the command “show interfaces” via the JSON API and then extract and print various bits of information. I have started off simple by (trying) to extract the MTU. This is my Python code: import json import jsonrpclib from jsonrpclib import Server switches = ["10.2.7.170"] username = "admin" password = "admin" # Going through all the switch IP addresses listed above for switch in switches: urlString = "https://{0}:{1}@{2}/command-api".format(username, password, switch) switchReq =...
Continue reading →

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: