aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-01-18 03:38:45 -0800
committerOle Trøan <otroan@employees.org>2018-01-22 09:44:45 +0000
commite82488f10f20f464961c5c7b381b4a419bca0bbc (patch)
tree4290bfe3a03ede14234a48b9e70fe3794cefdcfb /test/vpp_papi_provider.py
parent352ecd95c9cef74e1726f750dae86c1f97999275 (diff)
NAT44: asymmetrical static mapping rule (VPP-1135)
add option to NAT44 static mapping API/CLI to make rule asymmetrical (rule match only out2in direction) Change-Id: If262a3ff375a24d3059f0de1f1ac387a4fe09475 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 6e6f7caf287..13dccc9283b 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1235,6 +1235,7 @@ class VppPapiProvider(object):
vrf_id=0,
protocol=0,
twice_nat=0,
+ out2in_only=0,
is_add=1):
"""Add/delete NAT44 static mapping
@@ -1247,6 +1248,7 @@ class VppPapiProvider(object):
:param vrf_id: VRF ID
:param protocol: IP protocol (Default value = 0)
:param twice_nat: 1 if translate external host address and port
+ :param out2in_only: if 1 rule is matching only out2in direction
:param is_add: 1 if add, 0 if delete (Default value = 1)
"""
return self.api(
@@ -1260,7 +1262,8 @@ class VppPapiProvider(object):
'external_sw_if_index': external_sw_if_index,
'vrf_id': vrf_id,
'protocol': protocol,
- 'twice_nat': twice_nat})
+ 'twice_nat': twice_nat,
+ 'out2in_only': out2in_only})
def nat44_add_del_identity_mapping(
self,