NAME
App::Netdisco::SSHCollector::Platform::EOS
DESCRIPTION
Collect ARP and IPv6 neighbor entries, MAC table, and connected subnet data from Arista EOS devices.
PUBLIC METHODS
- arpnip($host, $ssh)
-
Retrieve ARP entries from device.
$hostis the hostname or IP address of the device.$sshis a Net::OpenSSH connection to the device.Returns a list of hashrefs in the format
{ mac => MACADDR, ip => IPADDR }. IPv4 ARP and IPv6 neighbor entries from all VRFs are flattened into one list. - arpnip_by_vrf($host, $ssh, $args)
-
As
arpnip, used whenstore_vrfsis on. Names each entry's VRF from the JSON key it appears under (defaultis''). A VRF is read whole only when every command that returned usable JSON listed it with its neighbor table.Returns
{ entries => [ { ip, mac, vrf } ], vrf_read => { VRF => 0|1 }, vrf_list_complete => 0|1, families => [4, 6] }, or undef when neither command returned usable JSON.familiesnames the address familiesvrf_readcovers:[4]or[6]when only one command did (absent or malformed would mean[4]). IPv4 entries also carryiface, as inarpnip; one with no interface is still returned, withoutiface.A subclass that overrides
arpnipmust also overridearpnip_by_vrf, or withstore_vrfson thisarpnip_by_vrfis used instead of the override. - macsuck($host, $ssh)
-
Retrieve MAC address table entries from device, skipping entries on the
Routerport. Returns a hashref in the format{ VLAN => { PORT => { MACADDR => COUNT } } }. - subnets($host, $ssh)
-
Retrieve directly connected IPv4 subnets from every VRF's routing table, without host routes. Returns a list of CIDR strings such as
10.1.1.0/24. - subnets_by_vrf($host, $ssh, $args)
-
As
subnets, used whenstore_vrfsis on, and reading IPv6 as well. Runsshow ip route vrf all connectedandshow ipv6 route vrf all connectedand names each prefix's VRF from the JSON key it appears under (the worker mapsdefaultto'').Returns
{ VRF => [ { prefix => '10.1.1.0', len => 24 }, ... ] }, or undef when neither command returned usable JSON. A VRF with no connected routes maps to an empty list. Host routes and link-local prefixes are returned as EOS lists them: the worker filters them. A command that fails contributes nothing and the other family's prefixes are still returned.A subclass that overrides
subnetsmust also overridesubnets_by_vrf, or withstore_vrfson thissubnets_by_vrfis used instead of the override.