mirror of
https://github.com/napalm-automation-community/napalm-vyos.git
synced 2026-09-23 04:31:16 +00:00
get_arp_table params
This commit is contained in:
@@ -332,7 +332,7 @@ class VyOSDriver(NetworkDriver):
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_arp_table(self):
|
def get_arp_table(self, ip=None, mac=None, interface=None):
|
||||||
# 'age' is not implemented yet
|
# 'age' is not implemented yet
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -362,6 +362,18 @@ class VyOSDriver(NetworkDriver):
|
|||||||
else:
|
else:
|
||||||
macaddr = py23_compat.text_type(line[2])
|
macaddr = py23_compat.text_type(line[2])
|
||||||
|
|
||||||
|
if ip is not None:
|
||||||
|
if ip != py23_compat.text_type(line[0]):
|
||||||
|
continue
|
||||||
|
|
||||||
|
if mac is not None:
|
||||||
|
if mac != macaddr:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if interface is not None:
|
||||||
|
if interface != py23_compat.text_type(line[-1]):
|
||||||
|
continue
|
||||||
|
|
||||||
arp_table.append(
|
arp_table.append(
|
||||||
{
|
{
|
||||||
'interface': py23_compat.text_type(line[-1]),
|
'interface': py23_compat.text_type(line[-1]),
|
||||||
|
|||||||
Reference in New Issue
Block a user