bgp: add 'neighbors.get' and 'show.rib' JSON RPC API

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
FUJITA Tomonori 2014-05-28 05:42:39 -07:00
parent 45ac298d01
commit 86a975aca6

View File

@ -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):