summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-10-08 05:13:02 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-04 13:20:06 +0900
commit17f7cc4a44823a02153a158a0bfab9b4e396d9a9 (patch)
tree75d95f8c0d206af40e325fa0a661d6ad8757970a
parent4bdaf1e64c20ef31614f11d71ca8682bfcbcec22 (diff)
cli: deprecate neighbor `shutdown` command
Since `shutdown` command just sends ADMINISTRATIVE_SHUTDOWN notification and doesn't change admin-state, neighbors can be get established after idle-holdtime which is not intuitive from the name of the API. We can use `reset` command to hard-reset BGP session, and `disable` command to shutdown(disable) BGP session. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
-rw-r--r--gobgp/cmd/neighbor.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/gobgp/cmd/neighbor.go b/gobgp/cmd/neighbor.go
index 5b108ebb..a238b562 100644
--- a/gobgp/cmd/neighbor.go
+++ b/gobgp/cmd/neighbor.go
@@ -668,6 +668,7 @@ func stateChangeNeighbor(cmd string, remoteIP string, args []string) error {
var err error
switch cmd {
case CMD_SHUTDOWN:
+ fmt.Printf("WARNING: command `%s` is deprecated. use `%s` instead", CMD_SHUTDOWN, CMD_DISABLE)
_, err = client.ShutdownNeighbor(context.Background(), &api.ShutdownNeighborRequest{Address: remoteIP})
case CMD_ENABLE:
_, err = client.EnableNeighbor(context.Background(), &api.EnableNeighborRequest{Address: remoteIP})