2.36. test_cnat module¶
- class test_cnat.Ep(ip=None, port=0, l4p=<class 'scapy.layers.inet.TCP'>, sw_if_index=4294967295, is_v6=False)¶
Bases:
objectCNat endpoint
- encode()¶
- classmethod from_pg(pg, is_v6=False)¶
- property isV6¶
- class test_cnat.TestCNatDHCP(methodName='runTest')¶
Bases:
framework.VppTestCaseCNat Translation
- check_resolved(tr, vip_pg, *args, i=0, is_v6=False)¶
- config_ips(rng, is_add=1, is_v6=False)¶
- create_translation(vip_pg, *args, is_v6=False)¶
- extra_vpp_punt_config = ['cnat', '{', 'session-db-buckets', '64', 'session-cleanup-timeout', '0.1', 'session-max-age', '1', 'tcp-max-age', '1', 'scanner', 'off', '}']¶
- make_addr(sw_if_index, i, is_v6)¶
- make_prefix(sw_if_index, i, is_v6)¶
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_dhcp_snat()¶
- test_dhcp_v4()¶
- test_dhcp_v6()¶
- class test_cnat.TestCNatSourceNAT(methodName='runTest')¶
Bases:
framework.VppTestCaseCNat Source NAT
- extra_vpp_punt_config = ['cnat', '{', 'session-cleanup-timeout', '0.1', 'session-max-age', '1', 'tcp-max-age', '1', 'scanner', 'off', '}']¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- sourcenat_test_icmp_echo4_conf()¶
- sourcenat_test_icmp_echo6_conf()¶
- sourcenat_test_icmp_err_conf(isV6=False)¶
- sourcenat_test_tcp_udp_conf(l4p, isV6=False)¶
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_snat_v4()¶
- test_snat_v6()¶
- class test_cnat.TestCNatTranslation(methodName='runTest')¶
Bases:
framework.VppTestCaseCNat Translation
- cnat_create_translation(vip, nbr)¶
- cnat_test_translation(t1, nbr, sports, isV6=False)¶
- cnat_test_translation_update(t1, sports, isV6=False)¶
- cnat_translation(vips, isV6=False)¶
CNat Translation
- extra_vpp_punt_config = ['cnat', '{', 'session-db-buckets', '64', 'session-cleanup-timeout', '0.1', 'session-max-age', '1', 'tcp-max-age', '1', 'scanner', 'off', '}']¶
- setUp()¶
Clear trace before running each test
- classmethod setUpClass()¶
Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api
- tearDown()¶
Show various debug prints after each test
- classmethod tearDownClass()¶
Perform final cleanup after running all tests in this test-case
- test_cnat4()¶
- test_cnat6()¶
- test_icmp()¶
- class test_cnat.VppCNatTranslation(test, iproto, vip, paths)¶
Bases:
vpp_object.VppObject- add_vpp_config()¶
Add the configuration for this object to vpp.
- get_stats()¶
- modify_vpp_config(paths)¶
- object_id()¶
Return a unique string representing this object.
- query_vpp_config()¶
Query the vpp configuration.
- Returns
True if the object is configured
- remove_vpp_config()¶
Remove the configuration for this object from vpp.
- property vl4_proto¶