summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-02-02 01:43:00 -0800
committerMatus Fabian <matfabia@cisco.com>2017-02-03 01:09:45 -0800
commit09d96f4a611fa989bfbbfb7e683d668dbe73ac1a (patch)
treec3e99fad08357a2c1b9660de49cf01b2e7d20aee /test/vpp_papi_provider.py
parent85bb9172894870f0c6c72e1555a0decf4d37213f (diff)
SNAT: Port allocation per protocol
Ports are allocated per protocol (UDP, TCP, ICMP) 1:1 NAT with port is configured for specific protocol Change-Id: I37ae5eed3715b223d0620d4fdaed7a482bb7a834 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 72c18e6cef7..2cd02cc7954 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -883,6 +883,7 @@ class VppPapiProvider(object):
external_port=0,
addr_only=1,
vrf_id=0,
+ protocol=0,
is_add=1,
is_ip4=1):
"""Add/delete S-NAT static mapping
@@ -894,6 +895,7 @@ class VppPapiProvider(object):
:param external_port: External port number (Default value = 0)
: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 is_add: 1 if add, 0 if delete (Default value = 1)
:param is_ip4: 1 if address type is IPv4 (Default value = 1)
"""
@@ -907,7 +909,8 @@ class VppPapiProvider(object):
'local_port': local_port,
'external_port': external_port,
'external_sw_if_index': external_sw_if_index,
- 'vrf_id': vrf_id})
+ 'vrf_id': vrf_id,
+ 'protocol': protocol})
def snat_add_address_range(
self,