get_arp_table params
This commit is contained in:
parent
347d6a6603
commit
358bfd8148
|
|
@ -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]),
|
||||
|
|
|
|||
Loading…
Reference in New Issue