From 7a1f027cdb6d067bcb0a020df85ee1fcbe7e3b0d Mon Sep 17 00:00:00 2001 From: Daniel Bacher Date: Fri, 30 Oct 2020 09:54:46 +0100 Subject: [PATCH] adjust get_arp_table function for compatibility with sgx00 series include is not available on sgx00 devices --- napalm_s350/s350.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/napalm_s350/s350.py b/napalm_s350/s350.py index 80f023e..ca01b2b 100644 --- a/napalm_s350/s350.py +++ b/napalm_s350/s350.py @@ -141,14 +141,17 @@ class S350Driver(NetworkDriver): """ arp_table = [] - output = self._send_command('show arp | include (static|dynamic)') + output = self._send_command('show arp') for line in output.splitlines(): # A VLAN may not be set for the entry + if 'vlan' not in line: + continue if len(line.split()) == 4: interface, ip, mac, _ = line.split() elif len(line.split()) == 5: - _, interface, mac, _ = line.split() + if1, if2, ip, mac, _ = line.split() + interface = "{} {}".format(if1, if2) elif len(line.split()) == 6: _, _, interface, ip, mac, _ = line.split() else: