Method: Rbeapi::Api::Bgp#get
- Defined in:
- lib/rbeapi/api/bgp.rb
#get ⇒ nil, Hash<Symbol, Object>
get returns the BGP routing configuration from the nodes current configuration.
100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/rbeapi/api/bgp.rb', line 100 def get config = get_block('^router bgp .*') return nil unless config response = Bgp.parse_bgp_as(config) response.merge!(parse_router_id(config)) response.merge!(parse_shutdown(config)) response.merge!(parse_maximum_paths(config)) response.merge!(parse_networks(config)) response[:neighbors] = @neighbors.getall response end |