mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
added parameter for rib_get
this parameter will support to display like cli as follows.
Status codes: * valid, > best
Network Next Hop Reason Metric LocPrf Path
*> 10.20.2.0/24 0.0.0.0 Only Path i
*> 10.20.3.0/24 0.0.0.0 Only Path i
*> 10.20.1.0/24 0.0.0.0 Only Path i
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
d192aa92b7
commit
4076adf5ed
@ -367,7 +367,7 @@ class BGPSpeaker(object):
|
||||
show['params'] = ['vrf', 'routes', 'all']
|
||||
return call('operator.show', **show)
|
||||
|
||||
def rib_get(self, family='ipv4'):
|
||||
def rib_get(self, family='ipv4', format='json'):
|
||||
""" This method returns the BGP routing information in a json
|
||||
format. This will be improved soon.
|
||||
|
||||
@ -376,6 +376,7 @@ class BGPSpeaker(object):
|
||||
"""
|
||||
show = {}
|
||||
show['params'] = ['rib', family]
|
||||
show['format'] = format
|
||||
return call('operator.show', **show)
|
||||
|
||||
def _set_filter(self, filter_type, address, filters):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user