summaryrefslogtreecommitdiffstats
path: root/test/vpp_neighbor.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-12-17 12:02:26 +0100
committerNeale Ranns <nranns@cisco.com>2018-12-18 11:54:24 +0000
commit8006c6aa425126529b4017768a9201e4f03964ad (patch)
tree7b7342e6fb4964a5c8ca65c3d13d8dcc980f120d /test/vpp_neighbor.py
parent02782d6ebd13ce02f2d3facebb54fec3c2137c88 (diff)
PAPI: Add MACAddress object wrapper for vl_api_mac_address_t
Change the definition of vl_api_mac_address_t to an aliased type. Change-Id: I1434f316d0fad6a099592f39bceeb8faeaf1d134 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/vpp_neighbor.py')
-rw-r--r--test/vpp_neighbor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/vpp_neighbor.py b/test/vpp_neighbor.py
index 46854c9ba8c..7815a286fef 100644
--- a/test/vpp_neighbor.py
+++ b/test/vpp_neighbor.py
@@ -6,7 +6,7 @@
from socket import inet_pton, inet_ntop, AF_INET, AF_INET6
from vpp_object import *
-from vpp_mac import mactobinary
+from vpp_papi import mac_pton
def find_nbr(test, sw_if_index, ip_addr, is_static=0, inet=AF_INET, mac=None):
@@ -22,7 +22,7 @@ def find_nbr(test, sw_if_index, ip_addr, is_static=0, inet=AF_INET, mac=None):
if nbr_addr == n.ip_address[:s] \
and is_static == n.is_static:
if mac:
- if n.mac_address == mactobinary(mac):
+ if n.mac_address == mac_pton(mac):
return True
else:
return True
@@ -38,7 +38,7 @@ class VppNeighbor(VppObject):
af=AF_INET, is_static=False, is_no_fib_entry=0):
self._test = test
self.sw_if_index = sw_if_index
- self.mac_addr = mactobinary(mac_addr)
+ self.mac_addr = mac_pton(mac_addr)
self.af = af
self.is_static = is_static
self.is_no_fib_entry = is_no_fib_entry