diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-12-19 22:27:43 -0800 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-12-19 22:27:43 -0800 |
commit | e71fb3a3ae6129573f50848f7af8e83eb8a4d7e2 (patch) | |
tree | 839e6e2a96b54c63d8f11db7c31f94642da60fd7 /tools/grpc | |
parent | 96a8b4c285adf846ed407da01b64782a42045741 (diff) |
doc: update ruby grpc
Diffstat (limited to 'tools/grpc')
-rw-r--r-- | tools/grpc/ruby/get_neighbors.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/grpc/ruby/get_neighbors.rb b/tools/grpc/ruby/get_neighbors.rb index d833802c..83ed9155 100644 --- a/tools/grpc/ruby/get_neighbors.rb +++ b/tools/grpc/ruby/get_neighbors.rb @@ -4,13 +4,13 @@ require 'gobgp_services' host = 'localhost' host = ARGV[0] if ARGV.length > 0 -stub = Api::Grpc::Stub.new("#{host}:8080") -arg = Api::Arguments.new() +stub = Gobgpapi::GobgpApi::Stub.new("#{host}:8080") +arg = Gobgpapi::Arguments.new() stub.get_neighbors(arg).each do |n| - puts "BGP neighbor is #{n.conf.remote_ip}, remote AS #{n.conf.remote_as}" + 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.info.uptime}" + 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.info.negotiated_holdtime}, keepalive interval is #{n.info.keepalive_interval} seconds" - puts "\tConfigured hold time is #{n.conf.holdtime}" + 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 |