I'm trying to run a script on arista switch, which is a simple python script. I got some values by running a command on the switch and I need to find a value from that command. for eg:
#!/usr/bin/python
from jsonrpclib import Server
switch = Server( "http://XXX:XXX@192.168.XX.XX/command-api" )
response = switch.runCmds( 1, [ "show interfaces ethernet 49 status" ] )
a = response[0]
print a
output is
{'interfaceStatuses': {'Ethernet49': {'vlanInformation': {'interfaceMode': 'routed', 'interfaceForwardingModel': 'routed'}, 'bandwidth': 10000000000L, 'interfaceType': '10GBASE-SR', 'description': 'GH1TPQACORS1 Et1', 'autoNegotiateActive': False, 'duplex': 'duplexFull', 'autoNegotigateActive': False, ***'linkStatus': 'connected'***}}}
Out of this result, I just need 'linkStatus' : 'connected' value, how do I do it?