summaryrefslogtreecommitdiffstats
path: root/test/test_l2bd_arp_term.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-08-10 05:30:06 -0700
committerDamjan Marion <dmarion@me.com>2019-01-30 19:47:53 +0000
commit37029305c671f4e2d091d6f6c22142634e409043 (patch)
treef47257c77b860213fcd1901686874dee43ad1f73 /test/test_l2bd_arp_term.py
parent13b2ba2ad5527c8185dce368993a3877e7daf7a2 (diff)
Use IP and MAC API types for neighbors
use address_t and mac_address_t for IPv6 and ARP entries and all other API calls in ip.api aprat from the route ones, that will follow in a separate commit Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_l2bd_arp_term.py')
-rw-r--r--test/test_l2bd_arp_term.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/test_l2bd_arp_term.py b/test/test_l2bd_arp_term.py
index 2321aa7c094..6d01daacc2f 100644
--- a/test/test_l2bd_arp_term.py
+++ b/test/test_l2bd_arp_term.py
@@ -163,15 +163,13 @@ class TestL2bdArpTerm(VppTestCase):
return '%s.%s.%s.%s' % (o1, o2, o3, o4)
def arp_event_host(self, e):
- return Host(mac=':'.join(['%02x' % ord(char) for char in e.new_mac]),
- ip4=self.inttoip4(e.address))
+ return Host(str(e.mac), ip4=str(e.ip))
def arp_event_hosts(self, evs):
return {self.arp_event_host(e) for e in evs}
def nd_event_host(self, e):
- return Host(mac=':'.join(['%02x' % ord(char) for char in e.new_mac]),
- ip6=inet_ntop(AF_INET6, e.address))
+ return Host(str(e.mac), ip6=str(e.ip))
def nd_event_hosts(self, evs):
return {self.nd_event_host(e) for e in evs}
@@ -439,7 +437,7 @@ class TestL2bdArpTerm(VppTestCase):
def test_l2bd_arp_term_12(self):
""" L2BD ND term - send NS packets verify reports
"""
- self.vapi.want_ip6_nd_events(address=inet_pton(AF_INET6, "::0"))
+ self.vapi.want_ip6_nd_events(ip="::")
dst_host = self.ip6_host(50, 50, "00:00:11:22:33:44")
self.bd_add_del(1, is_add=1)
self.set_bd_flags(1, arp_term=True, flood=False,
@@ -475,8 +473,7 @@ class TestL2bdArpTerm(VppTestCase):
def test_l2bd_arp_term_14(self):
""" L2BD ND term - disable ip4 arp events,send ns, verify no events
"""
- self.vapi.want_ip6_nd_events(enable_disable=0,
- address=inet_pton(AF_INET6, "::0"))
+ self.vapi.want_ip6_nd_events(enable_disable=0, ip="::")
dst_host = self.ip6_host(50, 50, "00:00:11:22:33:44")
macs = self.mac_list(range(10, 15))
hosts = self.ip6_hosts(5, 1, macs)