CSIT Tags ========= All CSIT test cases are labelled with Robot Framework tags used to allow for easy test case type identification, test case grouping and selection for execution. Following sections list currently used CSIT tags and their descriptions. Testbed Topology Tags --------------------- .. topic:: 2_NODE_DOUBLE_LINK_TOPO 2 nodes connected in a circular topology with two links interconnecting the devices. .. topic:: 2_NODE_SINGLE_LINK_TOPO 2 nodes connected in a circular topology with at least one link interconnecting devices. .. topic:: 3_NODE_DOUBLE_LINK_TOPO 3 nodes connected in a circular topology with two links interconnecting the devices. .. topic:: 3_NODE_SINGLE_LINK_TOPO 3 nodes connected in a circular topology with at least one link interconnecting devices. Objective Tags -------------- .. topic:: SKIP_PATCH Test case(s) marked to not run in case of vpp-csit-verify (i.e. VPP patch) and csit-vpp-verify jobs (i.e. CSIT patch). .. topic:: SKIP_VPP_PATCH Test case(s) marked to not run in case of vpp-csit-verify (i.e. VPP patch). Environment Tags ---------------- .. topic:: HW_ENV DUTs and TGs are running on bare metal. .. topic:: VM_ENV DUTs and TGs are running in virtual environment. .. topic:: VPP_VM_ENV DUTs with VPP and capable of running Virtual Machine. NIC Model Tags -------------- .. topic:: NIC_Intel-X520-DA2 Intel X520-DA2 NIC. .. topic:: NIC_Intel-XL710 Intel XL710 NIC. .. topic:: NIC_Intel-X710 Intel X710 NIC. .. topic:: NIC_Intel-XXV710 Intel XXV710 NIC. .. topic:: NIC_Cisco-VIC-1227 VIC-1227 by Cisco. .. topic:: NIC_Cisco-VIC-1385 VIC-1385 by Cisco. Scaling Tags ------------ .. topic:: FIB_20K 2x10,000 entries in single fib table .. topic:: FIB_200K 2x100,000 entries in single fib table .. topic:: FIB_2M 2x1,000,000 entries in single fib table .. topic:: L2BD_1 Test with 1 L2 bridge domain. .. topic:: L2BD_10 Test with 10 L2 bridge domains. .. topic:: L2BD_100 Test with 100 L2 bridge domains. .. topic:: L2BD_1K Test with 1000 L2 bridge domains. .. topic:: VLAN_1 Test with 1 VLAN sub-interface. .. topic:: VLAN_10 Test with 10 VLAN sub-interfaces. .. topic:: VLAN_100 Test with 100 VLAN sub-interfaces. .. topic:: VLAN_1K Test with 1000 VLAN sub-interfaces. .. topic:: VXLAN_1 Test with 1 VXLAN tunnel. .. topic:: VXLAN_10 Test with 10 VXLAN tunnels. .. topic:: VXLAN_100 Test with 100 VXLAN tunnels. .. topic:: VXLAN_1K Test with 1000 VXLAN tunnels. .. topic:: TNL_{t} IPSec in tunnel mode - {t} tunnels. .. topic:: SRC_USER_1 Traffic flow with 1 unique IP (users) in one direction. .. topic:: SRC_USER_10 Traffic flow with 10 unique IPs (users) in one direction. .. topic:: SRC_USER_100 Traffic flow with 100 unique IPs (users) in one direction. .. topic:: SRC_USER_1000 Traffic flow with 1000 unique IPs (users) in one direction. .. topic:: SRC_USER_2000 Traffic flow with 2000 unique IPs (users) in one direction. .. topic:: SRC_USER_4000 Traffic flow with 4000 unique IPs (users) in one direction. .. topic:: 100_FLOWS Traffic stream with 100 unique flows (10 IPs/users x 10 UDP ports) in one direction. .. topic:: 10k_FLOWS Traffic stream with 10 000 unique flows (10 IPs/users x 1000 UDP ports) in one direction. .. topic:: 100k_FLOWS Traffic stream with 100 000 unique flows (100 IPs/users x 1000 UDP ports) in one direction. Test Category Tags ------------------ .. topic:: FUNCTEST All functional test cases. .. topic:: PERFTEST All performance test cases. Performance Type Tags --------------------- .. topic:: NDRPDR Single test finding both No Drop Rate and Partial Drop Rate simultaneously. The search is done by optimized algorithm which performs multiple trial runs at different durations and transmit rates. The results come from the final trials, which have duration of 30 seconds. .. topic:: MRR Performance tests where TG sends the traffic at maximum rate (line rate) and reports total sent/received packets over trial duration. The result is an average of 10 trials of 1 second duration. .. topic:: SOAK Performance tests using PLRsearch to find the critical load. .. topic:: RECONF Performance tests aimed to measure lost packets (time) when performing reconfiguration while full throughput offered load is applied. Ethernet Frame Size Tags ------------------------ These are describing the traffic offered by Traffic Generator, "primary" traffic in case of asymmetric load. For traffic between DUTs, or for "secondary" traffic, see ${overhead} value. .. topic:: 64B 64B frames used for test. Generic ethernet or IPv4. .. topic:: 78B 78B frames used for test. Ipv6. .. topic:: 114B 114B frames used for test. IPv4+vxlan. .. topic:: 118B 118B frames used for test. Dot1q+IPv4+vxlan. .. topic:: IMIX IMIX frame sequence (28x 64B, 16x 570B, 4x 1518B) used for test. .. topic:: 1460B 1460B frames used for test. .. topic:: 1480B 1480B frames used for test. .. topic:: 1514B 1514B frames used for test. .. topic:: 1518B 1518B frames used for test. .. topic:: 9000B 9000B frames used for test. Test Type Tags -------------- .. topic:: BASE Baseline test cases, no encapsulation, no feature(s) configured in tests. .. topic:: IP4BASE IPv4 baseline test cases, no encapsulation, no feature(s) configured in tests. .. topic:: IP6BASE IPv6 baseline test cases, no encapsulation, no feature(s) configured in tests. .. topic:: L2XCBASE L2XC baseline test cases, no encapsulation, no feature(s) configured in tests. .. topic:: L2BDBASE L2BD baseline test cases, no encapsulation, no feature(s) configured in tests. .. topic:: L2PATCH L2PATCH baseline test cases, no encapsulation, no feature(s) configured in tests. .. topic:: SCALE Scale test cases. .. topic:: ENCAP Test cases where encapsulation is used. Use also encapsulation tag(s). .. topic:: FEATURE At least one feature is configured in test cases. Use also feature tag(s). .. topic:: TCP Tests which use TCP. .. topic:: TCP_CPS Performance tests which measure connections per second using http requests. .. topic:: TCP_RPS Performance tests which measure requests per second using http requests. .. topic:: HTTP Tests which use HTTP. .. topic:: NF_DENSITY Performance tests that measure throughput of multiple VNF and CNF service topologies at different service densities. NF Service Density Tags ----------------------- .. topic:: CHAIN NF service density tests with VNF or CNF service chain topology(ies). .. t
from trex_stl_lib.api import *


class STLS1:

    def create_stream(self):
        # base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12)

        # pad = Padding()
        # if len(base_pkt) < 64:
        #     pad_len = 64 - len(base_pkt)
        #     pad.load = '\x00' * pad_len

        # vm = STLVM()

        # vm.tuple_var(name="tuple", ip_min="10.0.0.3", ip_max="10.0.0.202", port_min=1025, port_max=61124, limit_flows = 100000)

        # vm.write(fv_name="tuple.ip", pkt_offset="IP.src")
        # vm.fix_chksum()

        # vm.write(fv_name="tuple.port", pkt_offset="UDP.sport")

        # pkt = STLPktBuilder(pkt=base_pkt/pad, vm=vm)

        # return STLStream(packet=pkt, mode=STLTXCont())

        vm = STLScVmRaw([STLVmTupleGen(ip_min="10.0.0.1", ip_max=&q