Method: Rbeapi::Api::OspfInterfaces#get
- Defined in:
- lib/rbeapi/api/ospf.rb
#get(name) ⇒ nil, Hash<String, String>
Returns a single MLAG interface configuration.
Example
{
network_type: <string>
}
388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/rbeapi/api/ospf.rb', line 388 def get(name) config = get_block("interface #{name}") return nil unless config unless /no switchport$/ =~ config || /^interface (Lo|Vl)/ =~ config return nil end response = {} nettype = /ip ospf network point-to-point/ =~ config response[:network_type] = nettype.nil? ? 'broadcast' : 'point-to-point' response end |