Func test reorg - decrease exec time per vpp patch
[csit.git] / tests / func / telemetry / ipfix / eth2p-ethip6-ip6base-ip6ipfixscale-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/interfaces.robot
17 | Resource | resources/libraries/robot/testing_path.robot
18 | Resource | resources/libraries/robot/ipv4.robot
19 | Resource | resources/libraries/robot/telemetry/ipfix.robot
20 | Library | resources.libraries.python.Classify.Classify
21 | Library | resources.libraries.python.telemetry.IPFIXSetup
22 | Library | resources.libraries.python.IPv6Setup
23 | Library | resources.libraries.python.Trace
24
25 | Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | EXPECTED_FAILING
26 | ...        | SKIP_VPP_PATCH
27 # TODO: Remove EXPECTED_FAILING tag once functionality is implemented (VPP-204)
28 | Test Setup | Func Test Setup
29 | Test Teardown | Func Test Teardown
30 | Documentation | *IPFIX ipv6 test cases*
31 | ...
32 | ... | IPFIX tests use 3-node topology TG - DUT1 - DUT2 - TG with
33 | ... | one link between the nodes. DUT1 is configured with IPv4 and IPV6
34 | ... | routing and static routes. IPFIX is configured on DUT1 with
35 | ... | DUT1->TG interface as collector.Test packets are
36 | ... | sent from TG to or through DUT1. TG listens for flow report packets
37 | ... | and verifies that they contains flow records of test packets sent.
38
39 *** Variables ***
40 | ${dut1_to_tg_ip}= | 10::10
41 | ${tg_to_dut1_ip}= | 12::10
42 | ${prefix_length}= | 64
43 | ${ip_version}= | ip6
44 | ${sessions}= | 45
45
46 # IPv4 addresses used for IPFIX exporter. Export over IPv6 not (yet?) supported.
47 | ${dut1_to_tg_ip4}= | 192.168.1.1
48 | ${tg_to_dut1_ip4}= | 192.168.1.2
49
50 *** Test Cases ***
51 | TC01: DUT reports packet flow with a large number of packets
52 | | [Documentation]
53 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
54 | | ... | address as collector and add classify session with TG source address.
55 | | ... | [Ver] Make TG send packets to DUT1, then listen for IPFIX template
56 | | ... | and data packets, verify that IPFIX reported the received packets.
57 | | ... | [Ref] RFC 7011
58 | | Given Path for 3-node testing is set
59 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
60 | | And Interfaces in 3-node path are up
61 | | And Set Interface Address | ${dut1_node}
62 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
63 | | And Set Interface Address | ${dut1_node}
64 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
65 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
66 | | ... | ${tg_to_dut1_mac}
67 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
68 | | ... | ${tg_to_dut1_mac}
69 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
70 | | ${table_index} | ${skip_n} | ${match_n}=
71 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version} | src
72 | | And VPP configures classify session L3 | ${dut1_node} | permit
73 | | ... | ${table_index} | ${skip_n} | ${match_n} | ${ip_version} | src
74 | | ... | ${tg_to_dut1_ip}
75 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
76 | | ... | ${table_index} | ip_version=${ip_version}
77 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
78 | | ... | ${dut1_to_tg_ip4} | interval=5
79 | | And Set IPFIX stream | ${dut1_node} | ${1}
80 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
81 | | ... | ${ip_version}
82 | | Then Send packets and verify IPFIX | ${tg_node} | ${dut1_node}
83 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
84 | | ... | count=20000 | timeout=10
85
86 | TC02: DUT reports packet flow when multiple sessions are configured
87 | | [Documentation]
88 | | ... | [Top] TG-DUT1-DUT2-TG. [Cfg] On DUT1 configure IPFIX with TG interface
89 | | ... | address as collector and add several classify sessions with different
90 | | ... | ports.
91 | | ... | [Ver] Make TG send packets to DUT1 using a range of ports matching
92 | | ... | configured sessions, then listen for IPFIX template and data packets,
93 | | ... | verify that IPFIX reported the received packets for each session.
94 | | ... | [Ref] RFC 7011
95 | | Given Path for 3-node testing is set
96 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
97 | | And Interfaces in 3-node path are up
98 | | And Set Interface Address | ${dut1_node}
99 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length}
100 | | And Set Interface Address | ${dut1_node}
101 | | ... | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${24}
102 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip4}
103 | | ... | ${tg_to_dut1_mac}
104 | | And Add ARP on DUT | ${dut1_node} | ${dut1_to_tg} | ${tg_to_dut1_ip}
105 | | ... | ${tg_to_dut1_mac}
106 | | And VPP RA suppress link layer | ${dut1_node} | ${dut1_to_tg}
107 | | ${table_index} | ${skip_n} | ${match_n}=
108 | | ... | And VPP creates classify table L3 | ${dut1_node} | ${ip_version}
109 | | ... | src proto l4 src_port dst_port
110 | | :FOR | ${index} | IN RANGE | ${sessions}
111 | | | VPP configures classify session generic | ${dut1_node}
112 | | | ... | acl-hit-next permit | ${table_index} | ${skip_n} | ${match_n}
113 | | | ... | l3 ${ip_version} src ${tg_to_dut1_ip}
114 | | | ... | proto 6 l4 src_port ${index} dst_port ${index}
115 | | When Assign interface to flow table | ${dut1_node} | ${dut1_to_tg}
116 | | ... | ${table_index} | ip_version=${ip_version}
117 | | And setup IPFIX exporter | ${dut1_node} | ${tg_to_dut1_ip4}
118 | | ... | ${dut1_to_tg_ip4} | interval=5
119 | | ... | mtu=1450 | interval=5
120 | | And Set IPFIX stream | ${dut1_node} | ${1}
121 | | And Assign classify table to exporter | ${dut1_node} | ${table_index}
122 | | ... | ${ip_version}
123 | | Then Send session sweep and verify IPFIX | ${tg_node} | ${dut1_node}
124 | | ... | ${tg_to_dut1} | ${dut1_to_tg} | ${tg_to_dut1_ip} | ${dut1_to_tg_ip}
125 | | ... | ${sessions} | timeout=10 | count=3
126
127 # TODO: DUT reports packet flow when ACL is configured with wildcards