diff options
author | Ole Troan <ot@cisco.com> | 2018-12-17 12:02:26 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-12-18 11:54:24 +0000 |
commit | 8006c6aa425126529b4017768a9201e4f03964ad (patch) | |
tree | 7b7342e6fb4964a5c8ca65c3d13d8dcc980f120d /test/test_nat.py | |
parent | 02782d6ebd13ce02f2d3facebb54fec3c2137c88 (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/test_nat.py')
-rw-r--r-- | test/test_nat.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_nat.py b/test/test_nat.py index a7ca6d3a6e0..9879b762cc9 100644 --- a/test/test_nat.py +++ b/test/test_nat.py @@ -18,7 +18,7 @@ from util import ppp from ipfix import IPFIX, Set, Template, Data, IPFIXDecoder from time import sleep from util import ip4_range -from vpp_mac import mactobinary +from vpp_papi import mac_pton from syslog_rfc5424_parser import SyslogMessage, ParseError from syslog_rfc5424_parser.constants import SyslogFacility, SyslogSeverity from vpp_papi_provider import SYSLOG_SEVERITY @@ -2952,11 +2952,11 @@ class TestNAT44(MethodHolder): """ NAT44 interfaces without configured IP address """ self.vapi.ip_neighbor_add_del(self.pg7.sw_if_index, - mactobinary(self.pg7.remote_mac), + mac_pton(self.pg7.remote_mac), self.pg7.remote_ip4n, is_static=1) self.vapi.ip_neighbor_add_del(self.pg8.sw_if_index, - mactobinary(self.pg8.remote_mac), + mac_pton(self.pg8.remote_mac), self.pg8.remote_ip4n, is_static=1) @@ -2994,11 +2994,11 @@ class TestNAT44(MethodHolder): """ NAT44 interfaces without configured IP address - 1:1 NAT """ self.vapi.ip_neighbor_add_del(self.pg7.sw_if_index, - mactobinary(self.pg7.remote_mac), + mac_pton(self.pg7.remote_mac), self.pg7.remote_ip4n, is_static=1) self.vapi.ip_neighbor_add_del(self.pg8.sw_if_index, - mactobinary(self.pg8.remote_mac), + mac_pton(self.pg8.remote_mac), self.pg8.remote_ip4n, is_static=1) @@ -3040,11 +3040,11 @@ class TestNAT44(MethodHolder): self.icmp_id_out = 30608 self.vapi.ip_neighbor_add_del(self.pg7.sw_if_index, - mactobinary(self.pg7.remote_mac), + mac_pton(self.pg7.remote_mac), self.pg7.remote_ip4n, is_static=1) self.vapi.ip_neighbor_add_del(self.pg8.sw_if_index, - mactobinary(self.pg8.remote_mac), + mac_pton(self.pg8.remote_mac), self.pg8.remote_ip4n, is_static=1) |