2.32. test_classifier module

class test_classifier.TestClassifierIP(methodName='runTest')

Bases: template_classifier.TestClassifier

Classifier IP Test Case

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_iacl_dst_ip()

Destination IP iACL test

Test scenario for basic IP ACL with destination IP
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with destination IP address.

  • Send and verify received packets on pg1 interface.

test_iacl_src_dst_ip()

Source and destination IP iACL test

Test scenario for basic IP ACL with source and destination IP
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with source and destination IP addresses.

  • Send and verify received packets on pg1 interface.

test_iacl_src_ip()

Source IP iACL test

Test scenario for basic IP ACL with source IP
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with source IP address.

  • Send and verify received packets on pg1 interface.

class test_classifier.TestClassifierIPOut(methodName='runTest')

Bases: template_classifier.TestClassifier

Classifier output IP Test Case

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_acl_ip_out()

Output IP ACL test

Test scenario for basic IP ACL with source IP
  • Create IPv4 stream for pg1 -> pg0 interface.

  • Create ACL with source IP address.

  • Send and verify received packets on pg0 interface.

class test_classifier.TestClassifierMAC(methodName='runTest')

Bases: template_classifier.TestClassifier

Classifier MAC Test Case

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_acl_mac()

MAC ACL test

Test scenario for basic MAC ACL with source MAC
  • Create IPv4 stream for pg0 -> pg2 interface.

  • Create ACL with source MAC address.

  • Send and verify received packets on pg2 interface.

class test_classifier.TestClassifierPBR(methodName='runTest')

Bases: template_classifier.TestClassifier

Classifier PBR Test Case

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_acl_pbr()

IP PBR test

Test scenario for PBR with source IP
  • Create IPv4 stream for pg0 -> pg3 interface.

  • Configure PBR fib entry for packet forwarding.

  • Send and verify received packets on pg3 interface.

class test_classifier.TestClassifierTCP(methodName='runTest')

Bases: template_classifier.TestClassifier

Classifier TCP proto Test Case

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_iacl_proto_tcp()

TCP protocol iACL test

Test scenario for basic protocol ACL with TCP protocol
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with TCP IP protocol.

  • Send and verify received packets on pg1 interface.

test_iacl_proto_tcp_dport()

TCP destination port iACL test

Test scenario for basic protocol ACL with TCP and dport
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with TCP IP protocol and defined dport.

  • Send and verify received packets on pg1 interface.

test_iacl_proto_tcp_sport()

TCP source port iACL test

Test scenario for basic protocol ACL with TCP and sport
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with TCP IP protocol and defined sport.

  • Send and verify received packets on pg1 interface.

test_iacl_proto_tcp_sport_dport()

TCP source and destination ports iACL test

Test scenario for basic protocol ACL with TCP and sport and dport
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with TCP IP protocol and defined sport and dport.

  • Send and verify received packets on pg1 interface.

class test_classifier.TestClassifierUDP(methodName='runTest')

Bases: template_classifier.TestClassifier

Classifier UDP proto Test Case

classmethod setUpClass()

Perform standard class setup (defined by class method setUpClass in class VppTestCase) before running the test case, set test case related variables and configure VPP.

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_iacl_proto_udp()

UDP protocol iACL test

Test scenario for basic protocol ACL with UDP protocol
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with UDP IP protocol.

  • Send and verify received packets on pg1 interface.

test_iacl_proto_udp_dport()

UDP destination port iACL test

Test scenario for basic protocol ACL with UDP and dport
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with UDP IP protocol and defined dport.

  • Send and verify received packets on pg1 interface.

test_iacl_proto_udp_sport()

UDP source port iACL test

Test scenario for basic protocol ACL with UDP and sport
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with UDP IP protocol and defined sport.

  • Send and verify received packets on pg1 interface.

test_iacl_proto_udp_sport_dport()

UDP source and destination ports iACL test

Test scenario for basic protocol ACL with UDP and sport and dport
  • Create IPv4 stream for pg0 -> pg1 interface.

  • Create iACL with UDP IP protocol and defined sport and dport.

  • Send and verify received packets on pg1 interface.