diff options
author | Matus Fabian <matfabia@cisco.com> | 2017-07-19 08:06:01 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-07-20 06:56:07 +0000 |
commit | 93d84c9fc2a839cb4114dbe431a00a58f2a1b168 (patch) | |
tree | b34c57f212357fdb26a8eff74b2759513ba0a57e /test/vpp_papi_provider.py | |
parent | b12ac56c44f4f6d4d5e3bc37bba39b19bc6b2551 (diff) |
SNAT: in2out translation as an output feature (VPP-903)
in2out translation as an output feature on the outside interface (postrouting)
Change-Id: I32c0311be09bdf102b9a0885b8b89c7588cb558f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 2814ef97b9e..11e16e49b8f 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -1055,6 +1055,23 @@ class VppPapiProvider(object): 'is_inside': is_inside, 'sw_if_index': sw_if_index}) + def snat_interface_add_del_output_feature( + self, + sw_if_index, + is_inside=1, + is_add=1): + """Enable/disable S-NAT output feature on the interface + + :param sw_if_index: Software index of the interface + :param is_inside: 1 if inside, 0 if outside (Default value = 1) + :param is_add: 1 if add, 0 if delete (Default value = 1) + """ + return self.api( + self.papi.snat_interface_add_del_output_feature, + {'is_add': is_add, + 'is_inside': is_inside, + 'sw_if_index': sw_if_index}) + def snat_add_static_mapping( self, local_ip, @@ -1128,6 +1145,12 @@ class VppPapiProvider(object): """ return self.api(self.papi.snat_interface_dump, {}) + def snat_interface_output_feature_dump(self): + """Dump interfaces with S-NAT output feature + :return: Dictionary of interfaces with S-NAT output feature + """ + return self.api(self.papi.snat_interface_output_feature_dump, {}) + def snat_static_mapping_dump(self): """Dump S-NAT static mappings :return: Dictionary of S-NAT static mappings |