summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-02-24 18:30:56 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-02-24 18:30:56 +0900
commit81ffbdf484622065ffc9dae9e28dc1ab83545fc2 (patch)
tree5c8d87750f217baaba0e152da60881c5c1c29502 /server
parent924765a0cb6f32f52d0802fab778b70b5abe75f8 (diff)
cli: pretty up State printing
Explicitly show adminstate idle. fujita@ubuntu:~/git/gobgp$ ./cli/gobgpcli show neighbors Peer AS Up/Down State |#Advertised Received Accepted 10.0.255.1 65001 never Idle(Admin) | 0 0 0 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go
index c635b2b1..3c274344 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -472,6 +472,7 @@ func (peer *Peer) MarshalJSON() ([]byte, error) {
p["info"] = struct {
BgpState string `json:"bgp_state"`
+ AdminState string
FsmEstablishedTransitions uint32 `json:"fsm_established_transitions"`
TotalMessageOut uint32 `json:"total_message_out"`
TotalMessageIn uint32 `json:"total_message_in"`
@@ -498,6 +499,7 @@ func (peer *Peer) MarshalJSON() ([]byte, error) {
}{
BgpState: f.state.String(),
+ AdminState: f.adminState.String(),
FsmEstablishedTransitions: s.EstablishedCount,
TotalMessageOut: s.TotalOut,
TotalMessageIn: s.TotalIn,