From 3ff14a50f135a1d169e76999a7ea86826a0308a9 Mon Sep 17 00:00:00 2001 From: Hiroshi Yokoi Date: Mon, 19 Jan 2015 16:41:41 +0900 Subject: rest: support adj-rib-in/out --- api/rest.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'api/rest.go') diff --git a/api/rest.go b/api/rest.go index 404a6bb5..bea5781b 100644 --- a/api/rest.go +++ b/api/rest.go @@ -111,6 +111,8 @@ func (rs *RestServer) Serve() { r.HandleFunc(neighbors, rs.Neighbors).Methods("GET") r.HandleFunc(neighbor+perPeerURL, rs.Neighbor).Methods("GET") r.HandleFunc(neighbor+perPeerURL+"/"+"local-rib", rs.NeighborLocalRib).Methods("GET") + r.HandleFunc(neighbor+perPeerURL+"/"+"adj-rib-in", rs.NeighborAdjRibIn).Methods("GET") + r.HandleFunc(neighbor+perPeerURL+"/"+"adj-rib-out", rs.NeighborAdjRibOut).Methods("GET") r.HandleFunc(neighbor+perPeerURL+"/"+"shutdown", rs.NeighborPostHandler).Methods("POST") r.HandleFunc(neighbor+perPeerURL+"/"+"reset", rs.NeighborPostHandler).Methods("POST") r.HandleFunc(neighbor+perPeerURL+"/"+"softreset", rs.NeighborPostHandler).Methods("POST") @@ -181,6 +183,14 @@ func (rs *RestServer) NeighborLocalRib(w http.ResponseWriter, r *http.Request) { rs.neighbor(w, r, REQ_LOCAL_RIB) } +func (rs *RestServer) NeighborAdjRibIn(w http.ResponseWriter, r *http.Request) { + rs.neighbor(w, r, REQ_ADJ_RIB_IN) +} + +func (rs *RestServer) NeighborAdjRibOut(w http.ResponseWriter, r *http.Request) { + rs.neighbor(w, r, REQ_ADJ_RIB_OUT) +} + func (rs *RestServer) Neighbors(w http.ResponseWriter, r *http.Request) { //Send channel of request parameter. req := NewRestRequest(REQ_NEIGHBORS, "") -- cgit v1.2.3