2.33. test_cnat module¶
-
class
test_cnat.
TestCNatSourceNAT
(methodName='runTest')¶ Bases:
framework.VppTestCase
CNat Source NAT
-
cnat_set_snat_address
(srcNatAddr, interface, isV6=False)¶
-
cnat_test_sourcenat
(srcNatAddr, l4p=scapy.layers.inet.TCP, isV6=False)¶
-
extra_vpp_punt_config
= ['cnat', '{', 'session-max-age', '1', 'tcp-max-age', '1', '}']¶
-
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_sourcenat
()¶
-
test_cnat6_sourcenat
()¶
-
-
class
test_cnat.
TestCNatTranslation
(methodName='runTest')¶ Bases:
framework.VppTestCase
CNat Translation
-
cnat_create_translation
(vip, nbr, isV6=False)¶
-
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-max-age', '1', 'tcp-max-age', '1', '}']¶
-
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
()¶
-
-
class
test_cnat.
VppCNATSourceNat
(test, address, exclude_subnets=[])¶ Bases:
vpp_object.VppObject
-
add_vpp_config
()¶ Add the configuration for this object to vpp.
-
cnat_exclude_subnet
(exclude_subnet, isAdd=True)¶
-
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.
-
-
class
test_cnat.
VppCNatTranslation
(test, iproto, vip, paths)¶ Bases:
vpp_object.VppObject
-
add_vpp_config
()¶ Add the configuration for this object to vpp.
-
delete
()¶
-
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
¶
-
-
test_cnat.
find_cnat_translation
(test, id)¶