summaryrefslogtreecommitdiffhomepage
path: root/api/rest.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/rest.go')
-rw-r--r--api/rest.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/api/rest.go b/api/rest.go
index bea5781b..18edfe57 100644
--- a/api/rest.go
+++ b/api/rest.go
@@ -36,6 +36,8 @@ const (
REQ_NEIGHBOR_SOFT_RESET
REQ_NEIGHBOR_SOFT_RESET_IN
REQ_NEIGHBOR_SOFT_RESET_OUT
+ REQ_NEIGHBOR_ENABLE
+ REQ_NEIGHBOR_DISABLE
)
const (
@@ -118,6 +120,8 @@ func (rs *RestServer) Serve() {
r.HandleFunc(neighbor+perPeerURL+"/"+"softreset", rs.NeighborPostHandler).Methods("POST")
r.HandleFunc(neighbor+perPeerURL+"/"+"softresetin", rs.NeighborPostHandler).Methods("POST")
r.HandleFunc(neighbor+perPeerURL+"/"+"softresetout", rs.NeighborPostHandler).Methods("POST")
+ r.HandleFunc(neighbor+perPeerURL+"/"+"enable", rs.NeighborPostHandler).Methods("POST")
+ r.HandleFunc(neighbor+perPeerURL+"/"+"disable", rs.NeighborPostHandler).Methods("POST")
// stats
r.HandleFunc(STATS, stats_api.Handler).Methods("GET")
@@ -172,6 +176,10 @@ func (rs *RestServer) NeighborPostHandler(w http.ResponseWriter, r *http.Request
rs.neighbor(w, r, REQ_NEIGHBOR_SOFT_RESET_IN)
case "softresetout":
rs.neighbor(w, r, REQ_NEIGHBOR_SOFT_RESET_OUT)
+ case "enable":
+ rs.neighbor(w, r, REQ_NEIGHBOR_ENABLE)
+ case "disable":
+ rs.neighbor(w, r, REQ_NEIGHBOR_DISABLE)
}
}