summaryrefslogtreecommitdiffstats
path: root/test/test_gbp.py
diff options
context:
space:
mode:
authorOle Trøan <otroan@employees.org>2019-04-23 12:38:35 +0000
committerOle Trøan <otroan@employees.org>2019-04-23 15:08:45 +0000
commit89fec713f84b8f567c52743c9c514ac29297fbda (patch)
tree52c25aa7bd1a23f03f8a176b669b33724f57d09c /test/test_gbp.py
parentb8591ac91318984a2706c6388ff836f1a9ef0a16 (diff)
Revert "NAT: VPP-1531 api cleanup & update"
This reverts commit bed1421b9f1b3643d93384084972337b596aec73. /vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’: /vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div] #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0])) ^ /vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’ rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1); ^~~~~~~~~ Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/test_gbp.py')
-rw-r--r--test/test_gbp.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/test_gbp.py b/test/test_gbp.py
index cc38bc9c1ce..44a9b396730 100644
--- a/test/test_gbp.py
+++ b/test/test_gbp.py
@@ -575,10 +575,6 @@ class VppGbpAcl(VppObject):
class TestGBP(VppTestCase):
""" GBP Test Case """
- @property
- def config_flags(self):
- return VppEnum.vl_api_nat_config_flags_t
-
@classmethod
def setUpClass(cls):
super(TestGBP, cls).setUpClass()
@@ -799,11 +795,12 @@ class TestGBP(VppTestCase):
self.router_mac.packed)
# The BVIs are NAT inside interfaces
- flags = self.config_flags.NAT_IS_INSIDE
self.vapi.nat44_interface_add_del_feature(epg.bvi.sw_if_index,
- flags=flags)
+ is_inside=1,
+ is_add=1)
self.vapi.nat66_add_del_interface(epg.bvi.sw_if_index,
- flags=flags)
+ is_inside=1,
+ is_add=1)
if_ip4 = VppIpInterfaceAddress(self, epg.bvi, epg.bvi_ip4, 32)
if_ip6 = VppIpInterfaceAddress(self, epg.bvi, epg.bvi_ip6, 128)
@@ -835,9 +832,13 @@ class TestGBP(VppTestCase):
recirc.epg.rd.t6).add_vpp_config()
self.vapi.nat44_interface_add_del_feature(
- recirc.recirc.sw_if_index)
+ recirc.recirc.sw_if_index,
+ is_inside=0,
+ is_add=1)
self.vapi.nat66_add_del_interface(
- recirc.recirc.sw_if_index)
+ recirc.recirc.sw_if_index,
+ is_inside=0,
+ is_add=1)
recirc.add_vpp_config()
@@ -857,11 +858,10 @@ class TestGBP(VppTestCase):
for (ip, fip) in zip(ep.ips, ep.fips):
# Add static mappings for each EP from the 10/8 to 11/8 network
if ip.af == AF_INET:
- flags = self.config_flags.NAT_IS_ADDR_ONLY
self.vapi.nat44_add_del_static_mapping(ip.bytes,
fip.bytes,
vrf_id=0,
- flags=flags)
+ addr_only=1)
else:
self.vapi.nat66_add_del_static_mapping(ip.bytes,
fip.bytes,
@@ -1404,12 +1404,11 @@ class TestGBP(VppTestCase):
#
for ep in eps:
# del static mappings for each EP from the 10/8 to 11/8 network
- flags = self.config_flags.NAT_IS_ADDR_ONLY
self.vapi.nat44_add_del_static_mapping(ep.ip4.bytes,
ep.fip4.bytes,
vrf_id=0,
- is_add=0,
- flags=flags)
+ addr_only=1,
+ is_add=0)
self.vapi.nat66_add_del_static_mapping(ep.ip6.bytes,
ep.fip6.bytes,
vrf_id=0,
@@ -1418,20 +1417,21 @@ class TestGBP(VppTestCase):
for epg in epgs:
# IP config on the BVI interfaces
if epg != epgs[0] and epg != epgs[3]:
- flags = self.config_flags.NAT_IS_INSIDE
self.vapi.nat44_interface_add_del_feature(epg.bvi.sw_if_index,
- flags=flags,
+ is_inside=1,
is_add=0)
self.vapi.nat66_add_del_interface(epg.bvi.sw_if_index,
- flags=flags,
+ is_inside=1,
is_add=0)
for recirc in recircs:
self.vapi.nat44_interface_add_del_feature(
recirc.recirc.sw_if_index,
+ is_inside=0,
is_add=0)
self.vapi.nat66_add_del_interface(
recirc.recirc.sw_if_index,
+ is_inside=0,
is_add=0)
def wait_for_ep_timeout(self, sw_if_index=None, ip=None, mac=None,