summaryrefslogtreecommitdiffhomepage
path: root/tools/grpc/ruby/get_neighbors.rb
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2018-12-24 23:20:35 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2018-12-24 23:20:35 +0900
commit48fa25d06c96262779253b0b051e8d1a34604764 (patch)
treefabaad0ea3022bc15c526e6757793ce62d2b67b3 /tools/grpc/ruby/get_neighbors.rb
parentbb1bbdd197a971917ae24946a4c4d2da539e5d55 (diff)
docs: delete outdated java/nodejs/ruby gRPC API examples
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'tools/grpc/ruby/get_neighbors.rb')
-rw-r--r--tools/grpc/ruby/get_neighbors.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/tools/grpc/ruby/get_neighbors.rb b/tools/grpc/ruby/get_neighbors.rb
deleted file mode 100644
index a451f67f..00000000
--- a/tools/grpc/ruby/get_neighbors.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'gobgp_pb'
-require 'gobgp_services_pb'
-
-host = ARGV[0]
-
-stub = Gobgpapi::GobgpApi::Stub.new("#{host}:50051", :this_channel_is_insecure)
-arg = Gobgpapi::GetNeighborRequest.new()
-stub.get_neighbor(arg).peers.each do |n|
- puts "BGP neighbor is #{n.conf.neighbor_address}, remote AS #{n.conf.peer_as}"
- puts "\tBGP version 4, remote route ID #{n.conf.id}"
- puts "\tBGP state = #{n.info.bgp_state}, up for #{n.timers.state.uptime}"
- puts "\tBGP OutQ = #{n.info.out_q}, Flops = #{n.info.flops}"
- puts "\tHold time is #{n.timers.state.hold_time}, keepalive interval is #{n.timers.state.keepalive_interval} seconds"
- puts "\tConfigured hold time is #{n.timers.config.hold_time}"
-end