diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-01-19 16:41:41 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-01-19 21:39:58 +0900 |
commit | 3ff14a50f135a1d169e76999a7ea86826a0308a9 (patch) | |
tree | 9cd9e8bd3fdafa82c8b506828e0067407db9d18d /api/rest.go | |
parent | c34707d670c0944162b01198d93c78c957286830 (diff) |
rest: support adj-rib-in/out
Diffstat (limited to 'api/rest.go')
-rw-r--r-- | api/rest.go | 10 |
1 files changed, 10 insertions, 0 deletions
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, "") |