Method: Rbeapi::Api::BaseInterface#get
- Defined in:
- lib/rbeapi/api/interfaces.rb
#get(name) ⇒ nil, Hash<String, Object>
get returns the specified interface resource hash that represents the node’s current interface configuration. The BaseInterface class provides all the set of attributes that are common to all interfaces in EOS. This method will return an interface type of generic.
179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/rbeapi/api/interfaces.rb', line 179 def get(name) config = get_block("^interface #{name}") return nil unless config response = { name: name, type: 'generic' } response.merge!(parse_description(config)) response.merge!(parse_encapsulation(config)) response.merge!(parse_shutdown(config)) response.merge!(parse_load_interval(config)) response end |