Method: Rbeapi::Api::Bgp.parse_bgp_as
- Defined in:
- lib/rbeapi/api/bgp.rb
.parse_bgp_as(config) ⇒ Hash<Symbol, Object>
parse_bgp_as scans the BGP routing configuration for the AS number. Defined as a class method. Used by the BgpNeighbors class below.
121 122 123 124 |
# File 'lib/rbeapi/api/bgp.rb', line 121 def self.parse_bgp_as(config) value = config.scan(/^router bgp (\d+)/).first { bgp_as: value[0] } end |