summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-01-25 21:59:16 -0800
committerMatus Fabian <matfabia@cisco.com>2018-01-25 22:00:31 -0800
commit5f22499e8836066a268dcb3f4d16cfcd0244b2a2 (patch)
treee971d52c6c339e6b1df930adad9fa3ff3ff037e7 /test/vpp_papi_provider.py
parent1f9600e50f3317e8a9abd5ac38734010ca08e246 (diff)
NAT44: add opaque string tag to static mapping APIs (VPP-1147)
Change-Id: I620e2081285ca8ac5c2da8efc12fe6f540ea4fd1 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index db0f8e61aed..b791444fdcd 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1236,6 +1236,7 @@ class VppPapiProvider(object):
protocol=0,
twice_nat=0,
out2in_only=0,
+ tag="",
is_add=1):
"""Add/delete NAT44 static mapping
@@ -1249,6 +1250,7 @@ class VppPapiProvider(object):
: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 tag: Opaque string tag
:param is_add: 1 if add, 0 if delete (Default value = 1)
"""
return self.api(
@@ -1263,7 +1265,8 @@ class VppPapiProvider(object):
'vrf_id': vrf_id,
'protocol': protocol,
'twice_nat': twice_nat,
- 'out2in_only': out2in_only})
+ 'out2in_only': out2in_only,
+ 'tag': tag})
def nat44_add_del_identity_mapping(
self,
@@ -1273,6 +1276,7 @@ class VppPapiProvider(object):
addr_only=1,
vrf_id=0,
protocol=0,
+ tag='',
is_add=1):
"""Add/delete NAT44 identity mapping
@@ -1282,6 +1286,7 @@ class VppPapiProvider(object):
:param addr_only: 1 if address only mapping, 0 if address and port
:param vrf_id: VRF ID
:param protocol: IP protocol (Default value = 0)
+ :param tag: Opaque string tag
:param is_add: 1 if add, 0 if delete (Default value = 1)
"""
return self.api(
@@ -1292,6 +1297,7 @@ class VppPapiProvider(object):
'port': port,
'sw_if_index': sw_if_index,
'vrf_id': vrf_id,
+ 'tag': tag,
'protocol': protocol})
def nat44_add_del_address_range(
@@ -1424,12 +1430,14 @@ class VppPapiProvider(object):
vrf_id=0,
twice_nat=0,
out2in_only=0,
+ tag='',
local_num=0,
locals=[],
is_add=1):
"""Add/delete NAT44 load balancing static mapping
:param twice_nat: 1 if translate external host address and port
+ :param tag: Opaque string tag
:param is_add - 1 if add, 0 if delete
"""
return self.api(
@@ -1441,6 +1449,7 @@ class VppPapiProvider(object):
'vrf_id': vrf_id,
'twice_nat': twice_nat,
'out2in_only': out2in_only,
+ 'tag': tag,
'local_num': local_num,
'locals': locals})