diff options
author | Filip Varga <fivarga@cisco.com> | 2022-02-15 11:56:07 -0800 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-04-01 13:26:04 +0000 |
commit | b68108203a59e12f4b4435caba164072e234f0aa (patch) | |
tree | ebac2dec7f66f76c3de2f37b5d65aebb949ed124 /test/test_nat44_ed.py | |
parent | 9a485d01fae0d17da5dbdba264f5f7fd104e3a1a (diff) |
nat: nat44-ed cleanup & fixes
Set deprecated option on unsupported API calls.
Cleaned up API calls with deprecated option. Removed
in progress option from long term used API calls.
Removed obsolete/unused nodes, functions, variables.
Fixed set frame queue nelts function. Calling API
would incorrectly not fail even though frame queue nelts
can only be set before first call nat44_plugin_enable.
Moved all formatting functions to _format.c file.
Type: refactor
Change-Id: I3ca16e0568f8d7eee3a27c3620ca36164833a7e4
Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'test/test_nat44_ed.py')
-rw-r--r-- | test/test_nat44_ed.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/test/test_nat44_ed.py b/test/test_nat44_ed.py index b761213d52b..f172dabe98b 100644 --- a/test/test_nat44_ed.py +++ b/test/test_nat44_ed.py @@ -1201,8 +1201,9 @@ class TestNAT44ED(VppTestCase): self.vapi.nat44_forwarding_enable_disable(enable=1) self.nat_add_address(self.nat_addr) - self.vapi.nat44_interface_add_del_output_feature( - sw_if_index=self.pg1.sw_if_index, is_add=1,) + self.vapi.nat44_ed_add_del_output_interface( + sw_if_index=self.pg1.sw_if_index, + is_add=1) # session initiated from service host - translate pkts = self.create_stream_in(self.pg0, self.pg1) @@ -1274,8 +1275,9 @@ class TestNAT44ED(VppTestCase): self.nat_add_address(self.nat_addr) self.nat_add_outside_interface(self.pg0) - self.vapi.nat44_interface_add_del_output_feature( - sw_if_index=self.pg1.sw_if_index, is_add=1) + self.vapi.nat44_ed_add_del_output_interface( + sw_if_index=self.pg1.sw_if_index, + is_add=1) # in2out pkts = self.create_stream_in(self.pg0, self.pg1) @@ -1790,7 +1792,7 @@ class TestNAT44ED(VppTestCase): self.nat_add_address(self.nat_addr) flags = self.config_flags.NAT_IS_INSIDE - self.vapi.nat44_interface_add_del_output_feature( + self.vapi.nat44_ed_add_del_output_interface( sw_if_index=self.pg1.sw_if_index, is_add=1) self.vapi.nat44_interface_add_del_feature( @@ -2519,9 +2521,9 @@ class TestNAT44EDMW(TestNAT44ED): def test_show_max_translations(self): """ NAT44ED API test - max translations per thread """ - nat_config = self.vapi.nat_show_config_2() + config = self.vapi.nat44_show_running_config() self.assertEqual(self.max_sessions, - nat_config.max_translations_per_thread) + config.sessions) def test_lru_cleanup(self): """ NAT44ED LRU cleanup algorithm """ @@ -3252,7 +3254,8 @@ class TestNAT44EDMW(TestNAT44ED): def test_tcp_close(self): """ NAT44ED Close TCP session from inside network - output feature """ - old_timeouts = self.vapi.nat_get_timeouts() + config = self.vapi.nat44_show_running_config() + old_timeouts = config.timeouts new_transitory = 2 self.vapi.nat_set_timeouts( udp=old_timeouts.udp, @@ -3802,9 +3805,9 @@ class TestNAT44EDMW(TestNAT44ED): new_vrf_id = 22 self.nat_add_address(self.nat_addr) - self.vapi.nat44_interface_add_del_output_feature( - sw_if_index=self.pg8.sw_if_index, is_add=1) - + self.vapi.nat44_ed_add_del_output_interface( + sw_if_index=self.pg8.sw_if_index, + is_add=1) try: self.configure_ip4_interface(self.pg7, table_id=new_vrf_id) self.configure_ip4_interface(self.pg8, table_id=new_vrf_id) |