Method: Rbeapi::Api::VxlanInterface#get

Defined in:
lib/rbeapi/api/interfaces.rb

#get(name = 'Vxlan1') ⇒ nil, Hash<String, String>

Returns the Vxlan interface configuration as a Ruby hash of key/value pairs from the nodes running configuration. This method extends the BaseInterface get method and adds the Vxlan specific attributes to the hash

Examples:

{
  "name": <string>,
  "type": 'vxlan',
  "description": <string>,
  "shutdown": [true, false],
  "source_interface": <string>,
  "multicast_group": <string>
}

Parameters:

  • :name (String)

    The interface name to return from the nodes configuration. This optional parameter defaults to Vxlan1

Returns:

  • (nil, Hash<String, String>)

    Returns the interface configuration as a Ruby hash object. If the provided interface name is not found then this method will return nil



1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'lib/rbeapi/api/interfaces.rb', line 1082

def get(name = 'Vxlan1')
  config = get_block("interface #{name}")
  return nil unless config

  response = super(name)
  response[:type] = 'vxlan'
  response.merge!(parse_source_interface(config))
  response.merge!(parse_multicast_group(config))
  response
end