get_arp_table params

This commit is contained in:
Pieprzycki Piotr 2017-03-21 14:12:29 +01:00
parent 347d6a6603
commit 358bfd8148
1 changed files with 13 additions and 1 deletions

View File

@ -332,7 +332,7 @@ class VyOSDriver(NetworkDriver):
else:
return None
def get_arp_table(self):
def get_arp_table(self, ip=None, mac=None, interface=None):
# 'age' is not implemented yet
"""
@ -362,6 +362,18 @@ class VyOSDriver(NetworkDriver):
else:
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(
{
'interface': py23_compat.text_type(line[-1]),