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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/honeycomb/port_mirroring.robot
17 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
18 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
19 | Resource | resources/libraries/robot/honeycomb/sub_interface.robot
20 | Resource | resources/libraries/robot/testing_path.robot
21 | Resource | resources/libraries/robot/telemetry/span.robot
22 | Variables | resources/test_data/honeycomb/span.py
23 | ... | ${node['interfaces']['port1']['name']}
24 | ... | ${node['interfaces']['port3']['name']}
26 | Variables | resources/test_data/honeycomb/sub_interfaces.py
28 | Force Tags | HC_FUNC
30 | Suite Setup | Add Interface local0 To Topology | ${node}
32 | Suite Teardown | Restart Honeycomb and VPP | ${node}
34 | Documentation | *Honeycomb port mirroring test suite.*
37 | TC01: Honeycomb can configure SPAN on an interface - receive
38 | | [Documentation] | Honeycomb configures SPAN on interface and verifies
39 | | ... | against VPP SPAN dump in state receive.
41 | | When Honeycomb configures SPAN on interface
42 | | ... | ${node} | ${interface1} | ${settings_receive}
43 | | Then Interface SPAN Operational Data from Honeycomb should be
44 | | ... | ${node} | ${interface1} | ${settings_receive}
46 | TC02: Honeycomb can configure SPAN on an interface - transmit
47 | | [Documentation] | Honeycomb configures SPAN on interface and verifies
48 | | ... | against VPP SPAN dump in state transmit.
50 | | When Honeycomb configures SPAN on interface
51 | | ... | ${node} | ${interface1} | ${settings_transmit}
52 | | Then Interface SPAN Operational Data from Honeycomb should be
53 | | ... | ${node} | ${interface1} | ${settings_transmit}
55 | TC03: Honeycomb can configure SPAN on an interface - both
56 | | [Documentation] | Honeycomb configures SPAN on interface and verifies
57 | | ... | against VPP SPAN dump in state both.
59 | | When Honeycomb configures SPAN on interface
60 | | ... | ${node} | ${interface1} | ${settings_both}
61 | | Then Interface SPAN Operational Data from Honeycomb should be
62 | | ... | ${node} | ${interface1} | ${settings_both}
64 | TC04: Honeycomb can configure SPAN on an interface with two source interfaces
65 | | [Documentation] | Honeycomb configures SPAN on interface and verifies
66 | | ... | against VPP SPAN dump in state both.
68 | | When Honeycomb configures SPAN on interface
69 | | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2}
70 | | Then Interface SPAN Operational Data from Honeycomb should be
71 | | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2}
73 | TC05: Honeycomb can disable SPAN on interface
74 | | [Documentation] | Honeycomb removes existing SPAN configuration
75 | | ... | from interface.
77 | | Given Interface SPAN Operational Data from Honeycomb should be
78 | | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2}
79 | | When Honeycomb removes interface SPAN configuration
80 | | ... | ${node} | ${interface1}
81 | | Then Interface SPAN Operational Data from Honeycomb should be empty
82 | | ... | ${node} | ${interface1}
84 | TC06: Honeycomb can configure SPAN with two destination interfaces from the same source
85 | | [Documentation] | Honeycomb configures SPAN on two interfaces and verifies
86 | | ... | against VPP SPAN dump.
88 | | [Teardown] | Run Keywords
89 | | ... | Honeycomb removes interface SPAN configuration
90 | | ... | ${node} | ${interface1} | AND
91 | | ... | Honeycomb removes interface SPAN configuration
92 | | ... | ${node} | ${interface2}
94 | | When Honeycomb configures SPAN on interface
95 | | ... | ${node} | ${interface1} | ${settings_if2}
96 | | And Honeycomb configures SPAN on interface
97 | | ... | ${node} | ${interface2} | ${settings_if2}
98 | | Then Interface SPAN Operational Data from Honeycomb should be
99 | | ... | ${node} | ${interface1} | ${settings_if2}
100 | | Then Interface SPAN Operational Data from Honeycomb should be
101 | | ... | ${node} | ${interface2} | ${settings_if2}
103 | TC07: DUT mirrors IPv4 packets from one interface to another
105 | | ... | [Top] TG=DUT1
106 | | ... | [Cfg] (using Honeycomb) On DUT1 configure IPv4 address and set SPAN\
107 | | ... | mirroring from one DUT interface to the other.
108 | | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\
109 | | ... | then receive a copy of sent packet and of DUT's ARP reply\
110 | | ... | on the second interface.
112 | | [Teardown] | Run Keywords
113 | | ... | Show Packet Trace on All DUTs | ${nodes} | AND
114 | | ... | Honeycomb clears all interface IPv4 neighbors
115 | | ... | ${dut_node} | ${dut_to_tg_if1} | AND
116 | | ... | Honeycomb removes interface IPv4 addresses
117 | | ... | ${dut_node} | ${dut_to_tg_if1} | AND
118 | | ... | Honeycomb removes interface SPAN configuration
119 | | ... | ${node} | ${dut_to_tg_if2}
121 | | Given Configure path in 2-node circular topology
122 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
123 | | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1}
125 | | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2}
127 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
128 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix}
129 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
130 | | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if1_mac}
131 | | ${settings_5}= | create dictionary | state=both
132 | | ... | iface-ref=${dut_to_tg_if1}
133 | | And InterfaceCLI.All Vpp Interfaces Ready Wait | ${nodes}
134 | | When Honeycomb configures SPAN on interface
135 | | ... | ${node} | ${dut_to_tg_if2} | ${settings_5}
136 | | Then Send Packet And Check Received Copies | ${tg_node}
137 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
138 | | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2}
139 | | ... | ${tg_to_dut_if1_ip} | ${dut_to_tg_if1_ip} | ICMP
141 | TC08: Honeycomb can configure SPAN on a sub-interface - receive
142 | | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies
143 | | ... | against VPP SPAN dump in state receive.
145 | | Given Honeycomb creates sub-interface | ${node} | ${interface1}
146 | | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings}
147 | | When Honeycomb Configures SPAN on sub-interface
148 | | ... | ${node} | ${interface1} | ${1} | ${settings_receive}
149 | | Then sub-Interface SPAN Operational Data from Honeycomb should be
150 | | ... | ${node} | ${interface1} | ${1} | ${settings_receive}
152 | TC09: Honeycomb can configure SPAN on a sub-interface - transmit
153 | | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies
154 | | ... | against VPP SPAN dump in state transmit.
156 | | Given Sub-interface state from Honeycomb should be
157 | | ... | ${node} | ${interface1} | ${1} | down | up
158 | | When Honeycomb Configures SPAN on sub-interface
159 | | ... | ${node} | ${interface1} | ${1} | ${settings_transmit}
160 | | Then sub-Interface SPAN Operational Data from Honeycomb should be
161 | | ... | ${node} | ${interface1} | ${1} | ${settings_transmit}
163 | TC10: Honeycomb can configure SPAN on a sub-interface - both
164 | | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies
165 | | ... | against VPP SPAN dump in state both.
167 | | Given Sub-interface state from Honeycomb should be
168 | | ... | ${node} | ${interface1} | ${1} | down | up
169 | | When Honeycomb Configures SPAN on sub-interface
170 | | ... | ${node} | ${interface1} | ${1} | ${settings_both}
171 | | Then sub-Interface SPAN Operational Data from Honeycomb should be
172 | | ... | ${node} | ${interface1} | ${1} | ${settings_both}
174 | TC11: Honeycomb can configure SPAN on a sub-interface with two source interfaces
175 | | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies
176 | | ... | against VPP SPAN dump in state both.
178 | | Given Sub-interface state from Honeycomb should be
179 | | ... | ${node} | ${interface1} | ${1} | down | up
180 | | When Honeycomb Configures SPAN on sub-interface
181 | | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2}
182 | | Then sub-Interface SPAN Operational Data from Honeycomb should be
183 | | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2}
185 | TC12: Honeycomb can disable SPAN on interface
186 | | [Documentation] | Honeycomb removes existing SPAN configuration
187 | | ... | from sub-interface.
189 | | Given Sub-interface state from Honeycomb should be
190 | | ... | ${node} | ${interface1} | ${1} | down | up
191 | | Given sub-Interface SPAN Operational Data from Honeycomb should be
192 | | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2}
193 | | When Honeycomb removes sub-interface SPAN configuration
194 | | ... | ${node} | ${interface1} | ${1}
195 | | Then sub-Interface SPAN Operational Data from Honeycomb should be empty
196 | | ... | ${node} | ${interface1} | ${1}
198 | TC13: Honeycomb can configure SPAN with two destination sub-interfaces from the same source
199 | | [Documentation] | Honeycomb configures SPAN on two sub-interfaces
200 | | ... | and verifies against VPP SPAN dump.
202 | | [Teardown] | Run Keywords
203 | | ... | Honeycomb removes sub-interface SPAN configuration
204 | | ... | ${node} | ${interface1} | ${1} | AND
205 | | ... | Honeycomb removes sub-interface SPAN configuration
206 | | ... | ${node} | ${interface2} | ${1}
208 | | Given Honeycomb creates sub-interface | ${node} | ${interface2}
209 | | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings}
210 | | When Honeycomb Configures SPAN on sub-interface
211 | | ... | ${node} | ${interface1} | ${1} | ${settings_if2}
212 | | And Honeycomb Configures SPAN on sub-interface
213 | | ... | ${node} | ${interface2} | ${1} | ${settings_if2}
214 | | Then Sub-Interface SPAN Operational Data from Honeycomb should be
215 | | ... | ${node} | ${interface1} | ${1} | ${settings_if2}
216 | | Then Sub-Interface SPAN Operational Data from Honeycomb should be
217 | | ... | ${node} | ${interface2} | ${1} | ${settings_if2}
219 | TC14: DUT mirrors IPv4 packets from one interface to another
221 | | ... | [Top] TG=DUT1
222 | | ... | [Cfg] (using Honeycomb) On DUT1 configure IPv4 address and set SPAN\
223 | | ... | mirroring from one DUT interface to a sub-interface on the other\
225 | | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\
226 | | ... | then receive a copy of sent packet and of DUT's ARP reply\
227 | | ... | on the sub-interface.
229 | | [Teardown] | Show Packet Trace on All DUTs | ${nodes}
231 | | Given Configure path in 2-node circular topology
232 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
233 | | And Sub-interface state from Honeycomb should be
234 | | ... | ${dut_node} | ${interface1} | ${1} | down | up
235 | | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1}
237 | | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2}
239 | | And Honeycomb sets the sub-interface up
240 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${1}
241 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
242 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix}
243 | | And And Honeycomb adds interface IPv4 neighbor
244 | | ... | ${dut_node} | ${dut_to_tg_if2}
245 | | ... | ${tg_to_dut_if2_ip} | ${tg_to_dut_if2_mac}
246 | | ${settings_5}= | create dictionary | state=both
247 | | ... | iface-ref=${dut_to_tg_if2}
248 | | And InterfaceCLI.All Vpp Interfaces Ready Wait | ${nodes}
249 | | When Honeycomb Configures SPAN on sub-interface
250 | | ... | ${node} | ${dut_to_tg_if1} | ${1} | ${settings_5}
251 | | Then Send Packet And Check Received Copies | ${tg_node}
252 | | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac}
253 | | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1}
254 | | ... | ${tg_to_dut_if2_ip} | ${dut_to_tg_if2_ip} | ICMP