Hi,
I would like to get vyos operational parameters (intefaces up/down, routing table, …) remotely from some python ssh API (pexpect or paramiko)
Using cli-shell-api (http://vyos.net/wiki/Shell_API), I can get configuration sections with the method
“showCfg ”
But cannot find how to get operational parameters
Sending the following command:
command = """
cli-shell-api showCfg interfaces
"""
returns
ethernet eth0 {
address dhcp
duplex auto
hw-id 00:0c:29:e4:ee:28
smp_affinity auto
speed auto
}
ethernet eth1 {
address dhcp
duplex auto
hw-id 00:0c:29:e4:ee:32
smp_affinity auto
speed auto
}
ethernet eth2 {
address 192.168.12.1/24
duplex auto
hw-id 00:0c:29:e4:ee:3c
smp_affinity auto
speed auto
}
loopback lo {
address 1.1.1.1/32
}
But I need this:
[code]Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
eth0 192.168.0.133/24 u/u
eth1 - u/u
eth2 192.168.12.1/24 u/u
lo 127.0.0.1/8 u/u
1.1.1.1/32
::1/128[/code]