diff options
author | Martin Gálik <magalik@cisco.com> | 2017-04-19 01:12:27 -0700 |
---|---|---|
committer | Martin Gálik <magalik@cisco.com> | 2017-04-26 00:23:22 -0700 |
commit | 6bc8c6493c8e7e1401130f8c9ca34c9b2915a7ad (patch) | |
tree | 3c1a6830f71a3d74315792b2d38bbc37fc8bccfb /test/test_snat.py | |
parent | c9fc77c510e042cf9379b427b63dd3f17a23a584 (diff) |
CGNAT: close session API and CLI commands.
Change-Id: I9c8636bd2c4b8da2907e8e4a4f2be1a2c3a8e0bb
Signed-off-by: Martin Gálik <magalik@cisco.com>
Diffstat (limited to 'test/test_snat.py')
-rw-r--r-- | test/test_snat.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_snat.py b/test/test_snat.py index ace17237b38..fe5af418aea 100644 --- a/test/test_snat.py +++ b/test/test_snat.py @@ -1686,6 +1686,21 @@ class TestDeterministicNAT(MethodHolder): self.logger.error(ppp("Unexpected or invalid packet", p)) raise + # session close api test + self.vapi.snat_det_close_session_out(socket.inet_aton(nat_ip), + external_port1, + self.pg1.remote_ip4n, + port_out) + dms = self.vapi.snat_det_map_dump() + self.assertEqual(dms[0].ses_num, 1) + + self.vapi.snat_det_close_session_in(host0.ip4n, + port_in, + self.pg1.remote_ip4n, + port_out) + dms = self.vapi.snat_det_map_dump() + self.assertEqual(dms[0].ses_num, 0) + def test_tcp_session_close_detection_in(self): """ CGNAT TCP session close initiated from inside network """ self.vapi.snat_add_det_map(self.pg0.remote_ip4n, |