summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorToshiki Tsuboi <t.tsubo2000@gmail.com>2014-08-03 10:45:46 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-08-03 17:40:55 +0800
commit4076adf5ed83c31f32cbc56e6b33151f8b460613 (patch)
tree04d309f327290cffebd1c64f353ae25079a99099
parentd192aa92b78cb6ddce152151194c7352297bf9b4 (diff)
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>
-rw-r--r--ryu/services/protocols/bgp/bgpspeaker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py
index 01c4a2dd..949e9695 100644
--- a/ryu/services/protocols/bgp/bgpspeaker.py
+++ b/ryu/services/protocols/bgp/bgpspeaker.py
@@ -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):