aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-04-10 13:51:54 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2018-04-19 10:35:13 +0000
commit1e5c07d379a092f4829e7081aa962d013b31fdfc (patch)
tree1b1a3c386663b3356773cf374b55a64f14d43709 /test/vpp_papi_provider.py
parentb14826e459302556febb391456ea90644278645a (diff)
Add special Twice-NAT feature (VPP-1221)
When enabled then Twice-NAT is applied only when source IP equals destination IP after DNAT Change-Id: I58a9d1d222b2a10c83eafffb2107f32c1b4aa3a8 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 44cb7b6fc68..53be992aeeb 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1302,6 +1302,7 @@ class VppPapiProvider(object):
vrf_id=0,
protocol=0,
twice_nat=0,
+ self_twice_nat=0,
out2in_only=0,
tag="",
is_add=1):
@@ -1316,6 +1317,9 @@ 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 self_twice_nat: 1 if translate external host address and port
+ whenever external host address equals
+ local address of internal host
:param out2in_only: if 1 rule is matching only out2in direction
:param tag: Opaque string tag
:param is_add: 1 if add, 0 if delete (Default value = 1)
@@ -1332,6 +1336,7 @@ class VppPapiProvider(object):
'vrf_id': vrf_id,
'protocol': protocol,
'twice_nat': twice_nat,
+ 'self_twice_nat': self_twice_nat,
'out2in_only': out2in_only,
'tag': tag})
@@ -1496,6 +1501,7 @@ class VppPapiProvider(object):
protocol,
vrf_id=0,
twice_nat=0,
+ self_twice_nat=0,
out2in_only=0,
tag='',
local_num=0,
@@ -1515,6 +1521,7 @@ class VppPapiProvider(object):
'protocol': protocol,
'vrf_id': vrf_id,
'twice_nat': twice_nat,
+ 'self_twice_nat': self_twice_nat,
'out2in_only': out2in_only,
'tag': tag,
'local_num': local_num,