diff options
author | Toshiki Tsuboi <t.tsubo2000@gmail.com> | 2014-08-03 15:41:05 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-08-03 17:40:56 +0800 |
commit | 94d5d865f07467bfe918191cd9c3d9481343cd94 (patch) | |
tree | 33f1b9367bdd9f7e6e952f17f0390955ea04f509 | |
parent | 4076adf5ed83c31f32cbc56e6b33151f8b460613 (diff) |
added parameter for vrfs_get (in case of format = 'cli')
this parameter will support to display like cli as follows.
Status codes: * valid, > best
Network Next Hop Reason Metric LocPrf Path
VPN: ('64511:101', 'ipv4')
*> 10.20.2.0/24 0.0.0.0 Only Path 2
*> 10.20.1.0/24 0.0.0.0 Only Path 2
*> 10.20.3.0/24 0.0.0.0 Only Path 2
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.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py index 949e9695..2dfbd3a5 100644 --- a/ryu/services/protocols/bgp/bgpspeaker.py +++ b/ryu/services/protocols/bgp/bgpspeaker.py @@ -362,9 +362,10 @@ class BGPSpeaker(object): vrf[vrfs.ROUTE_DISTINGUISHER] = route_dist call('vrf.delete', **vrf) - def vrfs_get(self): + def vrfs_get(self, format='json'): show = {} show['params'] = ['vrf', 'routes', 'all'] + show['format'] = format return call('operator.show', **show) def rib_get(self, family='ipv4', format='json'): |