Method: Rbeapi::Api::Ipinterfaces#get
- Defined in:
- lib/rbeapi/api/ipinterfaces.rb
#get(name) ⇒ nil, Hash<Symbol, Object>
get returns a resource hash that represents the configuration of the IP interface from the nodes running configuration.
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/rbeapi/api/ipinterfaces.rb', line 62 def get(name) config = get_block("interface #{name}") return nil unless config return nil if /\s{3}switchport$/ =~ config response = {} response.merge!(parse_address(config)) response.merge!(parse_mtu(config)) response.merge!(parse_helper_addresses(config)) response end |