blob: 3ed657f2237b930f7f01c08a78c93c2d85206ed0 [file] [log] [blame]
Joey Armstrong9fadcbe2024-01-17 19:00:37 -05001# Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +00002#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# FIXME Can we use the same test against BBSim and Hardware?
15
16*** Settings ***
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +000017Documentation Test various multicast scenarios with given input file for TT workflow
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +000018Suite Setup Setup Suite
19Test Setup Setup
20Test Teardown Teardown
21Suite Teardown Teardown Suite
22Library Collections
23Library String
24Library OperatingSystem
25Library XML
26Library RequestsLibrary
27Library ../../libraries/DependencyLibrary.py
28Resource ../../libraries/onos.robot
29Resource ../../libraries/voltctl.robot
30Resource ../../libraries/voltha.robot
31Resource ../../libraries/utils.robot
32Resource ../../libraries/k8s.robot
33Resource ../../variables/variables.robot
34Resource ../../libraries/power_switch.robot
35
36*** Variables ***
37${POD_NAME} flex-ocp-cord
38${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
39${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
40#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
41${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
42${HELM_CHARTS_DIR} ~/helm-charts
43${VOLTHA_POD_NUM} 8
44${NAMESPACE} voltha
45${INFRA_NAMESPACE} default
46# For below variable value, using deployment name as using grep for
47# parsing radius pod name, we can also use full radius pod name
48${RESTART_POD_NAME} radius
49${timeout} 60s
50${of_id} 0
51${logical_id} 0
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +000052${multicast_test_duration} 60
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +000053${has_dataplane} True
54${teardown_device} True
55${scripts} ../../scripts
56
57# Per-test logging on failure is turned off by default; set this variable to enable
58${container_log_dir} ${None}
59
60# logging flag to enable Collect Logs, can be passed via the command line too
61# example: -v logging:False
62${logging} True
63
64${suppressaddsubscriber} True
65
Hardik Windlassb1bda362021-11-24 11:54:36 +000066# flag to choose the subscriber provisioning command type in ONOS
67# TT often provision a single services for a subscriber (eg: hsia, voip, ...) one after the other.
68# if set to True, command used is "volt-add-subscriber-unitag"
69# if set to False, comand used is "volt-add-subscriber-access"
70${unitag_sub} False
71
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +000072*** Test Cases ***
732 RG Same ONU Same Channel Multicast Test
74 [Documentation] Verify that 2 RG which are connected to the same ONU could join the same channel.
75 [Tags] functionalTT 2RGSameOnuSameChannel multicastTT
76 [Setup] Start Logging 2RGSameOnuSameChannel
77 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
78 ... AND Stop Logging 2RGSameOnuSameChannel
79 ${test_onus_pon0}= Set Variable ${multicast_test_onu_pon_locations.pon_0[0]}
80 ${test_onu1_sn}= Set Variable ${test_onus_pon0['onu_1']}
81 ${test_onu1_uni}= Set Variable 1
82 ${test_onu2_sn}= Set Variable ${test_onus_pon0['onu_1']}
83 ${test_onu2_uni}= Set Variable 2
84 ${channel_ip_list}= Set Variable ${multicast_ip_addresses[0]}
85 ${channel_ip_1}= Set Variable ${channel_ip_list['channel_1']}
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +000086 ${matched} ${src_onu1} ${dst_onu1}= Get ONU details with Given Sn and Service and UNI ${test_onu1_sn} mcast
87 ... ${test_onu1_uni}
88 ${matched} ${src_onu2} ${dst_onu2}= Get ONU details with Given Sn and Service and UNI ${test_onu2_sn} mcast
89 ... ${test_onu2_uni}
90 Wait Until Keyword Succeeds ${timeout} 15 TT 2 RG MCAST Test ${src_onu1} ${dst_onu1}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +000091 ... ${channel_ip_1} ${src_onu2} ${dst_onu2} ${channel_ip_1} ${multicast_test_duration}
92 # The purpose of this sleep period is to ensure that all groups and flows are deleted from the OLT before the next test.
93 Sleep ${multicast_test_duration}
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +000094
Huseyin Ahmet AYDIN208723d2021-11-16 07:15:53 +0000952 RG Same ONU Different Channel Multicast Test
96 [Documentation] Verify that 2 RG which are connected to the same ONU could join the different channel.
Hardik Windlass8d959b32021-12-07 05:39:48 +000097 [Tags] functionalTT 2RGSameOnuDifferentChannel multicastTT non-critical
Huseyin Ahmet AYDIN208723d2021-11-16 07:15:53 +000098 [Setup] Start Logging 2RGSameOnuDifferentChannel
99 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
100 ... AND Stop Logging 2RGSameOnuDifferentChannel
101 ${test_onus_pon0}= Set Variable ${multicast_test_onu_pon_locations.pon_0[0]}
102 ${test_onu1_sn}= Set Variable ${test_onus_pon0['onu_1']}
103 ${test_onu1_uni}= Set Variable 1
104 ${test_onu2_sn}= Set Variable ${test_onus_pon0['onu_1']}
105 ${test_onu2_uni}= Set Variable 2
106 ${channel_ip_list}= Set Variable ${multicast_ip_addresses[0]}
107 ${channel_ip_1}= Set Variable ${channel_ip_list['channel_1']}
108 ${channel_ip_2}= Set Variable ${channel_ip_list['channel_2']}
109 ${matched} ${src_onu1} ${dst_onu1}= Get ONU details with Given Sn and Service and UNI ${test_onu1_sn} mcast
110 ... ${test_onu1_uni}
111 ${matched} ${src_onu2} ${dst_onu2}= Get ONU details with Given Sn and Service and UNI ${test_onu2_sn} mcast
112 ... ${test_onu2_uni}
113 Wait Until Keyword Succeeds ${timeout} 15 TT 2 RG MCAST Test ${src_onu1} ${dst_onu1}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000114 ... ${channel_ip_1} ${src_onu2} ${dst_onu2} ${channel_ip_2} ${multicast_test_duration}
115 # The purpose of this sleep period is to ensure that all groups and flows are deleted from the OLT before the next test.
116 Sleep ${multicast_test_duration}
117
1182 RG Same PON Different ONU Same Channel Multicast Test
119 [Documentation] Verify that 2 RG which are connected to the different ONUs
120 ... on the same PON Ports could join the same channel.
121 [Tags] functionalTT 2RGSamePonDifferentOnuSameChannel multicastTT
122 [Setup] Start Logging 2RGSamePonDifferentOnuSameChannel
123 [Teardown] Run Keywords Collect Logs
124 ... AND Stop Logging 2RGSamePonDifferentOnuSameChannel
125 ${test_onus_pon0}= Set Variable ${multicast_test_onu_pon_locations.pon_0[0]}
126 ${test_onu1_sn}= Set Variable ${test_onus_pon0['onu_1']}
127 ${test_onu1_uni}= Set Variable 1
128 ${test_onu2_sn}= Set Variable ${test_onus_pon0['onu_2']}
129 ${test_onu2_uni}= Set Variable 1
130 ${channel_ip_list}= Set Variable ${multicast_ip_addresses[0]}
131 ${channel_ip_1}= Set Variable ${channel_ip_list['channel_1']}
132 ${matched} ${src_onu1} ${dst_onu1}= Get ONU details with Given Sn and Service and UNI ${test_onu1_sn} mcast
133 ... ${test_onu1_uni}
134 ${matched} ${src_onu2} ${dst_onu2}= Get ONU details with Given Sn and Service and UNI ${test_onu2_sn} mcast
135 ... ${test_onu2_uni}
136 Wait Until Keyword Succeeds ${timeout} 15 TT 2 RG MCAST Test ${src_onu1} ${dst_onu1}
137 ... ${channel_ip_1} ${src_onu2} ${dst_onu2} ${channel_ip_1} ${multicast_test_duration}
138 # The purpose of this sleep period is to ensure that all groups and flows are deleted from the OLT before the next test.
139 Sleep ${multicast_test_duration}
140
1412 RG Same PON Different ONU Different Channels Multicast Test
142 [Documentation] Verify that 2 RG which are connected to the different ONUs
143 ... on the same PON Ports could join the different channels.
Hardik Windlass8d959b32021-12-07 05:39:48 +0000144 [Tags] functionalTT 2RGSamePonDifferentOnuDifferentChannel multicastTT non-critical
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000145 [Setup] Start Logging 2RGSamePonDifferentOnuDifferentChannel
146 [Teardown] Run Keywords Collect Logs
147 ... AND Stop Logging 2RGSamePonDifferentOnuDifferentChannel
148 ${test_onus_pon0}= Set Variable ${multicast_test_onu_pon_locations.pon_0[0]}
149 ${test_onu1_sn}= Set Variable ${test_onus_pon0['onu_1']}
150 ${test_onu1_uni}= Set Variable 1
151 ${test_onu2_sn}= Set Variable ${test_onus_pon0['onu_2']}
152 ${test_onu2_uni}= Set Variable 1
153 ${channel_ip_list}= Set Variable ${multicast_ip_addresses[0]}
154 ${channel_ip_1}= Set Variable ${channel_ip_list['channel_1']}
155 ${channel_ip_2}= Set Variable ${channel_ip_list['channel_2']}
156 ${matched} ${src_onu1} ${dst_onu1}= Get ONU details with Given Sn and Service and UNI ${test_onu1_sn} mcast
157 ... ${test_onu1_uni}
158 ${matched} ${src_onu2} ${dst_onu2}= Get ONU details with Given Sn and Service and UNI ${test_onu2_sn} mcast
159 ... ${test_onu2_uni}
160 Wait Until Keyword Succeeds ${timeout} 15 TT 2 RG MCAST Test ${src_onu1} ${dst_onu1}
161 ... ${channel_ip_1} ${src_onu2} ${dst_onu2} ${channel_ip_2} ${multicast_test_duration}
162 # The purpose of this sleep period is to ensure that all groups and flows are deleted from the OLT before the next test.
163 Sleep ${multicast_test_duration}
Huseyin Ahmet AYDIN208723d2021-11-16 07:15:53 +0000164
Emrehan UZUN61221162021-11-16 11:19:07 +00001652 RG Different PON Different ONU Same Channel Multicast Test
166 [Documentation] Verify that 2 RG which are connected to the different ONUs
167 ... on the different PON Ports could join the same channel.
168 [Tags] functionalTT 2RGDifferentOnuandPonSameChannel multicastTT notready
169 [Setup] Start Logging 2RGDifferentOnuandPonSameChannel
170 [Teardown] Run Keywords Collect Logs
171 ... AND Stop Logging 2RGDifferentOnuandPonSameChannel
172 ${test_onus_pon0}= Set Variable ${multicast_test_onu_pon_locations.pon_0[0]}
173 ${test_onus_pon1}= Set Variable ${multicast_test_onu_pon_locations.pon_1[0]}
174 ${test_onu1_sn}= Set Variable ${test_onus_pon0['onu_1']}
175 ${test_onu1_uni}= Set Variable 1
176 ${test_onu2_sn}= Set Variable ${test_onus_pon1['onu_1']}
177 ${test_onu2_uni}= Set Variable 1
178 ${channel_ip_list}= Set Variable ${multicast_ip_addresses[0]}
179 ${channel_ip_1}= Set Variable ${channel_ip_list['channel_1']}
180 ${matched} ${src_onu1} ${dst_onu1}= Get ONU details with Given Sn and Service and UNI ${test_onu1_sn} mcast
181 ... ${test_onu1_uni}
182 ${matched} ${src_onu2} ${dst_onu2}= Get ONU details with Given Sn and Service and UNI ${test_onu2_sn} mcast
Emrehan UZUNd80c47d2021-11-22 14:18:50 +0000183 ... ${test_onu2_uni}
Emrehan UZUN61221162021-11-16 11:19:07 +0000184 Wait Until Keyword Succeeds ${timeout} 15 TT 2 RG MCAST Test ${src_onu1} ${dst_onu1}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000185 ... ${channel_ip_1} ${src_onu2} ${dst_onu2} ${channel_ip_1} ${multicast_test_duration}
186 # The purpose of this sleep period is to ensure that all groups and flows are deleted from the OLT before the next test.
187 Sleep ${multicast_test_duration}
Emrehan UZUN61221162021-11-16 11:19:07 +0000188
Emrehan UZUNd80c47d2021-11-22 14:18:50 +00001892 RG Different PON Different ONU Different Channels Multicast Test
190 [Documentation] Verify that 2 RG which are connected to the different ONUs
191 ... on the different PON Ports could join the different channels.
192 [Tags] functionalTT 2RGDifferentOnuandPonDifferentChannels multicastTT notready
193 [Setup] Start Logging 2RGDifferentOnuandPonDifferentChannels
194 [Teardown] Run Keywords Collect Logs
195 ... AND Stop Logging 2RGDifferentOnuandPonDifferentChannels
196 ${test_onus_pon0}= Set Variable ${multicast_test_onu_pon_locations.pon_0[0]}
197 ${test_onus_pon1}= Set Variable ${multicast_test_onu_pon_locations.pon_1[0]}
198 ${test_onu1_sn}= Set Variable ${test_onus_pon0['onu_1']}
199 ${test_onu1_uni}= Set Variable 1
200 ${test_onu2_sn}= Set Variable ${test_onus_pon1['onu_1']}
201 ${test_onu2_uni}= Set Variable 1
202 ${channel_ip_list}= Set Variable ${multicast_ip_addresses[0]}
203 ${channel_ip_1}= Set Variable ${channel_ip_list['channel_1']}
204 ${channel_ip_2}= Set Variable ${channel_ip_list['channel_2']}
205 ${matched} ${src_onu1} ${dst_onu1}= Get ONU details with Given Sn and Service and UNI ${test_onu1_sn} mcast
206 ... ${test_onu1_uni}
207 ${matched} ${src_onu2} ${dst_onu2}= Get ONU details with Given Sn and Service and UNI ${test_onu2_sn} mcast
208 ... ${test_onu2_uni}
209 Wait Until Keyword Succeeds ${timeout} 15 TT 2 RG MCAST Test ${src_onu1} ${dst_onu1}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000210 ... ${channel_ip_1} ${src_onu2} ${dst_onu2} ${channel_ip_2} ${multicast_test_duration}
Emrehan UZUNd80c47d2021-11-22 14:18:50 +0000211
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000212*** Keywords ***
213Get ONU details with Given Sn and Service and UNI
214 [Documentation] This keyword finds the ONU details (as required for multicast test)
215 ... with given serial number, service type and UNI
216 [Arguments] ${onu_sn} ${service_type} ${uni}
217 ${matched}= Set Variable False
218 FOR ${I} IN RANGE 0 ${num_all_onus}
219 ${src}= Set Variable ${hosts.src[${I}]}
220 ${dst}= Set Variable ${hosts.dst[${I}]}
221 ${service}= Get Variable Value ${src['service_type']} "null"
222 ${onu}= Get Variable Value ${src['onu']} "null"
223 ${uni_id}= Get Variable Value ${src['uni_id']} "null"
224 Continue For Loop If '${onu}' != '${onu_sn}' or '${service}' != '${service_type}'
225 ${matched}= Set Variable If
226 ... '${onu}' == '${onu_sn}' and '${service}' == '${service_type}' and '${uni}' == '${uni_id}'
227 ... True False
228 Exit For Loop If ${matched}
229 END
230 [Return] ${matched} ${src} ${dst}
231
232
233TT 2 RG MCAST Test
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000234 [Documentation] This keyword performs MCAST two RG at the Same Time for TT workflow.
235 ... RG1 and RG2 could be join same channel or different channel.
236 ... It will run multicast test with given multicast_test_duration variable.
237 ... RG2 will leave channel after multicast_test_duration/2 seconds.
238 ... Function verify that RG1's multicast stream is not affected.
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000239 [Arguments] ${src_rg1} ${dst_rg1} ${channel_ip_rg1} ${src_rg2} ${dst_rg2} ${channel_ip_rg2}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000240 ... ${multicast_test_duration}
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000241 # Check for iperf and jq tools RG1
242 ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf jq
243 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
244 ... ${src_rg1['container_name']}
245 Pass Execution If ${rc} != 0 Skipping test: iperf / jq not found on the RG
246
247 # Check for iperf and jq tools RG2
248 ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf jq
249 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
250 ... ${src_rg2['container_name']}
251 Pass Execution If ${rc} != 0 Skipping test: iperf / jq not found on the RG
252
253 #Reset the IP on the interface RG1
254 ${output}= Login And Run Command On Remote System sudo ifconfig ${src_rg1['dp_iface_name']} 0
255 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
256 ... ${src_rg1['container_name']}
257 # Kill iperf on BNG
258 ${rg_output}= Run Keyword and Continue On Failure Login And Run Command On Remote System
259 ... sudo kill -9 `pidof iperf`
260 ... ${dst_rg1['bng_ip']} ${dst_rg1['bng_user']} ${dst_rg1['bng_pass']} ${dst_rg1['container_type']}
261 ... ${dst_rg1['container_name']}
262
263 #Reset the IP on the interface RG2
264 ${output}= Login And Run Command On Remote System sudo ifconfig ${src_rg1['dp_iface_name']} 0
265 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
266 ... ${src_rg2['container_name']}
267 # Kill iperf on BNG
268 ${rg_output}= Run Keyword and Continue On Failure Login And Run Command On Remote System
269 ... sudo kill -9 `pidof iperf`
270 ... ${dst_rg2['bng_ip']} ${dst_rg2['bng_user']} ${dst_rg2['bng_pass']} ${dst_rg2['container_type']}
271 ... ${dst_rg2['container_name']}
272
273 # Setup RG1 for Multi-cast test
274 ${output}= Login And Run Command On Remote System
275 ... sudo ifconfig ${src_rg1['dp_iface_name']} ${src_rg1['mcast_rg']} up ; sudo kill -9 `pidof iperf`
276 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
277 ... ${src_rg1['container_name']}
278 ${output}= Login And Run Command On Remote System
279 ... sudo ip route add ${src_rg1['mcast_grp_subnet_mask']} dev ${src_rg1['dp_iface_name']} scope link
280 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
281 ... ${src_rg1['container_name']}
282
283 # Setup RG2 for Multi-cast test
284 ${output}= Login And Run Command On Remote System
285 ... sudo ifconfig ${src_rg2['dp_iface_name']} ${src_rg2['mcast_rg']} up ; sudo kill -9 `pidof iperf`
286 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
287 ... ${src_rg2['container_name']}
288 ${output}= Login And Run Command On Remote System
289 ... sudo ip route add ${src_rg2['mcast_grp_subnet_mask']} dev ${src_rg2['dp_iface_name']} scope link
290 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
291 ... ${src_rg2['container_name']}
292
293 # Setup iperf on the BNG
294 ${server_output}= Run Keyword If '${channel_ip_rg1}'=='${channel_ip_rg2}'
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000295 ... Login And Run Command On Remote System
296 ... sudo iperf -c '${channel_ip_rg1}' -u -T 32 -t ${multicast_test_duration} -i 1 &
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000297 ... ${dst_rg1['bng_ip']} ${dst_rg1['bng_user']} ${dst_rg1['bng_pass']} ${dst_rg1['container_type']}
298 ... ${dst_rg1['container_name']}
299 ... ELSE Run Keywords Run Keyword And Continue On Failure
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000300 ... Login And Run Command On Remote System
301 ... sudo iperf -c '${channel_ip_rg1}' -u -T 32 -t ${multicast_test_duration} -i 1 &
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000302 ... ${dst_rg1['bng_ip']} ${dst_rg1['bng_user']} ${dst_rg1['bng_pass']} ${dst_rg1['container_type']}
303 ... ${dst_rg1['container_name']} AND Run Keyword And Continue On Failure
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000304 ... Login And Run Command On Remote System
305 ... sudo iperf -c '${channel_ip_rg2}' -u -T 32 -t ${multicast_test_duration} -i 1 &
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000306 ... ${dst_rg2['bng_ip']} ${dst_rg2['bng_user']} ${dst_rg2['bng_pass']} ${dst_rg2['container_type']}
307 ... ${dst_rg2['container_name']}
308
309 # Setup iperf on the RG1
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000310 ${rg_output_rg1}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000311 ... Login And Run Command On Remote System
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000312 ... rm -rf /tmp/rg1_output ; date >> /tmp/rg1_output ; sudo iperf -s -u -B '${channel_ip_rg1}' -i 1 -D >> /tmp/rg1_output
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000313 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
314 ... ${src_rg1['container_name']}
315
316 # Setup iperf on the RG2
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000317 ${rg_output_rg2}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000318 ... Login And Run Command On Remote System
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000319 ... rm -rf /tmp/rg2_output ; date >> /tmp/rg2_output ; sudo iperf -s -u -B '${channel_ip_rg2}' -i 1 -D >> /tmp/rg2_output
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000320 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
321 ... ${src_rg2['container_name']}
322
323 #Logging Outputs and Check iperf UDP Stream Outputs
324 Log ${rg_output_rg1}
325 Log ${rg_output_rg2}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000326 ${igmp_leave_time}= Evaluate ${multicast_test_duration}/2
327 ${s}= Set Variable s
328 ${sleep_time}= Set Variable ${igmp_leave_time}${s}
329 Sleep ${sleep_time}
330 ${onos_delay_tolerance}= Set Variable 5
331 ${igmp_leave_time_with_delay}= Evaluate ${igmp_leave_time} + ${onos_delay_tolerance}
332
333 # Kill iperf on the RG2
334 ${rg_kill_output_rg2}= Run Keyword and Continue On Failure Login And Run Command On Remote System
335 ... sudo kill -9 `pidof iperf` ; date >> /tmp/rg2_output ${src_rg2['ip']} ${src_rg2['user']}
336 ... ${src_rg2['pass']} ${src_rg2['container_type']} ${src_rg2['container_name']}
337
338 Sleep ${sleep_time}
339
340 # Kill iperf on the RG1
341 ${output}= Run Keyword and Continue On Failure Login And Run Command On Remote System
342 ... sudo kill -9 `pidof iperf` ; date >> /tmp/rg1_output ${src_rg1['ip']} ${src_rg1['user']}
343 ... ${src_rg1['pass']} ${src_rg1['container_type']} ${src_rg1['container_name']}
344
345 ${output_rg1}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000346 ... Login And Run Command On Remote System
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000347 ... cat /tmp/rg1_output | grep KBytes
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000348 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
349 ... ${src_rg1['container_name']}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000350 Log ${output_rg1}
351 # Check that RG1's stream count
352 ${output_rg1_count}= Get Line Count ${output_rg1}
353 ${output_rg1_count}= Evaluate ${output_rg1_count}-1
354 ${output_rg1_file}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000355 ... Login And Run Command On Remote System
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000356 ... cat /tmp/rg1_output
357 ... ${src_rg1['ip']} ${src_rg1['user']} ${src_rg1['pass']} ${src_rg1['container_type']}
358 ... ${src_rg1['container_name']}
359 Log ${output_rg1_file}
360
361
362 ${output_rg2}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
363 ... Login And Run Command On Remote System
364 ... cat /tmp/rg2_output | grep KBytes
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000365 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
366 ... ${src_rg2['container_name']}
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000367 Log ${output_rg2}
368 # Check that RG2's stream count
369 ${output_rg2_count}= Get Line Count ${output_rg2}
370 ${output_rg2_count}= Evaluate ${output_rg2_count}-1
371 ${output_rg2_file}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
372 ... Login And Run Command On Remote System
373 ... cat /tmp/rg2_output
374 ... ${src_rg2['ip']} ${src_rg2['user']} ${src_rg2['pass']} ${src_rg2['container_type']}
375 ... ${src_rg2['container_name']}
376 Log ${output_rg2_file}
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000377
378 # Kill iperf on BNG
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000379 ${server_output}= Run Keyword and Continue On Failure Login And Run Command On Remote System
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000380 ... sudo kill -9 `pidof iperf`
381 ... ${dst_rg1['bng_ip']} ${dst_rg1['bng_user']} ${dst_rg1['bng_pass']} ${dst_rg1['container_type']}
382 ... ${dst_rg1['container_name']}
383
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000384
Huseyin Ahmet AYDIN175d1582021-11-23 14:51:41 +0000385 Should Contain ${output_rg1} KBytes
386 Should Contain ${output_rg2} KBytes
387 # Verify that RG1's stream count is lower than multicast total test duration
388 Should Be Lower Than ${output_rg1_count} ${multicast_test_duration}
389 # Verify that RG1's stream count is larger than multicast igmp leave time
390 Should Be Larger Than ${output_rg1_count} ${igmp_leave_time_with_delay}
391 # Verify that RG2's stream count is lower than multicast igmp leave time
392 Should Be Lower Than ${output_rg2_count} ${igmp_leave_time_with_delay}
393
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000394
395Setup Suite
396 [Documentation] Set up the test suite
397 Common Test Suite Setup
398 ${switch_type}= Get Variable Value ${web_power_switch.type}
399 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
400 Run Keyword If ${has_dataplane} Clean Up Linux
401 Run Keyword Setup
402 Wait Until Keyword Succeeds ${timeout} 2s Provision Subscription TT
403
404
Huseyin Ahmet AYDIN7cb5ae62021-10-28 11:07:27 +0000405Clear All Devices Then Create New Device
406 [Documentation] Remove any devices from VOLTHA and ONOS
407 # Remove all devices from voltha and nos
408 Delete All Devices and Verify
409 # Execute normal test Setup Keyword
410 Setup