diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-05-28 05:42:39 -0700 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-05-28 12:36:21 -0700 |
commit | 86a975aca62d9967bc2b479357c749e13f42d3c9 (patch) | |
tree | db61a3cbc3ae114253e3b19712f38fe1a54202ae | |
parent | 45ac298d01c743c1b2a4414b706c908a50fb214b (diff) |
bgp: add 'neighbors.get' and 'show.rib' JSON RPC API
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/api/jsonrpc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ryu/services/protocols/bgp/api/jsonrpc.py b/ryu/services/protocols/bgp/api/jsonrpc.py index b44e40dc..76aa3498 100644 --- a/ryu/services/protocols/bgp/api/jsonrpc.py +++ b/ryu/services/protocols/bgp/api/jsonrpc.py @@ -71,6 +71,16 @@ class BgpWSJsonRpc(app_manager.RyuApp): call('network.add', **networks) return {} + @rpc_public('neighbors.get') + def _neighbors_get(self): + return call('neighbors.get') + + @rpc_public('show.rib') + def _show_rib(self, family='ipv4'): + show = {} + show['params'] = ['rib', family] + return call('operator.show', **show) + class BgpWSJsonRpcController(ControllerBase): def __init__(self, req, link, data, **config): |