blob: 3dd97d16bfad6e84cbdabe84bdea244c454ac997 [file] [log] [blame]
TorstenThieme1619db22020-04-03 12:01:15 +00001*** Settings ***
2Documentation Test states of ONU Go adapter
3Suite Setup Setup Suite
4Suite Teardown Teardown Suite
5Test Setup Setup
6Test Teardown Teardown
7Library Collections
8Library String
9Library OperatingSystem
10Library XML
11Library RequestsLibrary
12Library ../../libraries/DependencyLibrary.py
13Resource ../../libraries/onos.robot
14Resource ../../libraries/voltctl.robot
15Resource ../../libraries/voltha.robot
16Resource ../../libraries/utils.robot
17Resource ../../libraries/k8s.robot
18Resource ../../variables/variables.robot
19
20*** Variables ***
21${POD_NAME} flex-ocp-cord
22${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
23${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
24#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
25${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
26${HELM_CHARTS_DIR} ~/helm-charts
27${VOLTHA_POD_NUM} 8
28${NAMESPACE} voltha
29# For below variable value, using deployment name as using grep for
30# parsing radius pod name, we can also use full radius pod name
31${RESTART_POD_NAME} radius
TorstenThieme94e4ae42020-05-18 13:01:42 +000032${timeout} 180s
TorstenThieme1619db22020-04-03 12:01:15 +000033${of_id} 0
34${logical_id} 0
35${has_dataplane} True
36${external_libs} True
37${teardown_device} True
38${scripts} ../../scripts
39# Per-test logging on failure is turned off by default; set this variable to enable
40${container_log_dir} ${None}
TorstenThiemee0e5bba2020-08-05 11:20:13 +000041# state to test variable, can be passed via the command line too, valid values: 1-6
42# 1 -> activating-onu
43# 2 -> starting-openomci
44# 3 -> discovery-mibsync-complete
45# 4 -> initial-mib-downloaded
46# 5 -> tech-profile-config-download-success
47# 6 -> omci-flows-pushed
TorstenThieme87cd6202020-09-09 10:01:28 +000048# example: -v state2test:5
TorstenThieme1619db22020-04-03 12:01:15 +000049${state2test} 6
TorstenThiemee0e5bba2020-08-05 11:20:13 +000050# test mode variable, can be passed via the command line too, valid values: SingleState, Up2State, SingleStateTime
TorstenThieme87cd6202020-09-09 10:01:28 +000051# example: -v testmode:SingleStateTime
TorstenThieme1619db22020-04-03 12:01:15 +000052${testmode} SingleState
TorstenThiemee0e5bba2020-08-05 11:20:13 +000053# flag for execute Tech Profile check, can be passed via the command line too
TorstenThieme87cd6202020-09-09 10:01:28 +000054# example: -v profiletest:False
TorstenThiemee0e5bba2020-08-05 11:20:13 +000055${profiletest} True
TorstenThieme87cd6202020-09-09 10:01:28 +000056# used tech profile, can be passed via the command line too, valid values: default (=1T1GEM), 1T4GEM, 1T8GEM
57# example: -v techprofile:1T4GEM
TorstenThiemee0e5bba2020-08-05 11:20:13 +000058${techprofile} default
59# flag for execute port test, can be passed via the command line too
TorstenThieme87cd6202020-09-09 10:01:28 +000060# example: -v porttest:False
TorstenThieme1619db22020-04-03 12:01:15 +000061${porttest} True
TorstenThieme87cd6202020-09-09 10:01:28 +000062# flag for execute flow test, can be passed via the command line too
63# example: -v flowtest:False
64${flowtest} True
65# flag for execute reconcile onu device test, can be passed via the command line too
66# example: -v reconciletest:True
67${reconciletest} False
TorstenThiemee0e5bba2020-08-05 11:20:13 +000068# flag debugmode is used, if true timeout calculation various, can be passed via the command line too
TorstenThieme87cd6202020-09-09 10:01:28 +000069# example: -v debugmode:True
TorstenThieme401af432020-06-11 15:53:53 +000070${debugmode} False
TorstenThiemee0e5bba2020-08-05 11:20:13 +000071# logging flag to enable Collect Logs, can be passed via the command line too
TorstenThieme87cd6202020-09-09 10:01:28 +000072# example: -v logging:True
TorstenThieme5e324e42020-07-27 09:36:16 +000073${logging} False
TorstenThiemee0e5bba2020-08-05 11:20:13 +000074# if True execution will be paused before clean up
TorstenThieme87cd6202020-09-09 10:01:28 +000075# example: -v pausebeforecleanup:True
TorstenThiemeb41007d2020-06-22 12:14:12 +000076${pausebeforecleanup} False
TorstenThiemee0e5bba2020-08-05 11:20:13 +000077${data_dir} ../data
78
TorstenThieme1619db22020-04-03 12:01:15 +000079
80*** Test Cases ***
81ONU State Test
82 [Documentation] Validates the ONU Go adapter states
TorstenThieme401af432020-06-11 15:53:53 +000083 [Tags] statetest onutest
TorstenThieme1619db22020-04-03 12:01:15 +000084 [Setup] Run Keywords Start Logging ONUStateTest
85 ... AND Setup Test
86 Run Keyword If ${has_dataplane} Clean Up Linux
87 Enable Device ${olt_device_id}
TorstenThieme94e4ae42020-05-18 13:01:42 +000088 ${timeStart} = Get Current Date
89 Set Global Variable ${timeStart}
TorstenThieme1619db22020-04-03 12:01:15 +000090 Run Keyword If "${testmode}"=="SingleState" Do ONU Single State Test
91 ... ELSE IF "${testmode}"=="Up2State" Do ONU Up To State Test
TorstenThieme94e4ae42020-05-18 13:01:42 +000092 ... ELSE IF "${testmode}"=="SingleStateTime" Do ONU Single State Test Time
TorstenThieme1619db22020-04-03 12:01:15 +000093 ... ELSE Fail The testmode (${testmode}) is not valid!
TorstenThieme5e324e42020-07-27 09:36:16 +000094 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
TorstenThieme1619db22020-04-03 12:01:15 +000095 ... AND Stop Logging ONUStateTest
96
TorstenThiemee0e5bba2020-08-05 11:20:13 +000097Check Loaded Tech Profile
98 [Documentation] Validates the loaded Tech Profile
99 ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
100 ... Check will be executed only the reached ONU state is 5 (tech-profile-config-download-success) or higher
101 [Tags] onutest
102 [Setup] Start Logging ONUCheckTechProfile
103 Run Keyword If ${state2test}>=5 and ${profiletest} Do Check Tech Profile
104 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
105 ... AND Stop Logging ONUCheckTechProfile
106
TorstenThieme401af432020-06-11 15:53:53 +0000107Onu Port Check
TorstenThieme87cd6202020-09-09 10:01:28 +0000108 [Documentation] Validates that all the UNI ports show up in ONOS
TorstenThieme00958682020-06-19 11:29:31 +0000109 ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
TorstenThieme401af432020-06-11 15:53:53 +0000110 [Tags] onutest
111 [Setup] Start Logging ONUPortTest
112 Run Keyword If ${porttest} Do Onu Port Check
TorstenThieme5e324e42020-07-27 09:36:16 +0000113 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
TorstenThieme401af432020-06-11 15:53:53 +0000114 ... AND Stop Logging ONUPortTest
115
TorstenThieme015d5c02020-09-11 09:53:34 +0000116Reconcile Onu Device
117 [Documentation] Reconciles ONU Device and check state
118 ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
119 [Tags] onutest
120 [Setup] Start Logging ReconcileONUDevice
121 Run Keyword If ${state2test}>=5 and ${reconciletest} Do Reconcile Onu Device
122 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
123 ... AND Stop Logging ReconcileONUDevice
124
TorstenThieme1619db22020-04-03 12:01:15 +0000125*** Keywords ***
126Setup Suite
127 [Documentation] Set up the test suite
TorstenThieme87cd6202020-09-09 10:01:28 +0000128 ${LogInfo}= Catenate
129 ... \r\nPassed arguments:
130 ... state2test:${state2test}, testmode:${testmode}, profiletest:${profiletest}, techprofile:${techprofile},
131 ... porttest:${porttest}, flowtest:${flowtest}, reconciletest:${reconciletest},
TorstenThieme015d5c02020-09-11 09:53:34 +0000132 ... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup},
TorstenThieme87cd6202020-09-09 10:01:28 +0000133 Log ${LogInfo} console=yes
TorstenThieme1619db22020-04-03 12:01:15 +0000134 Common Test Suite Setup
135 Run Keyword If ${num_onus}>4 Calculate Timeout
TorstenThieme87cd6202020-09-09 10:01:28 +0000136 Run Keyword If "${techprofile}"=="1T1GEM" ${techprofile}= Set Variable default
137 Run Keyword If "${techprofile}"=="default" Log To Console \nTechProfile:default (1T1GEM)
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000138 ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM
139 ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM
140 ... ELSE Fail The TechProfile (${techprofile}) is not valid!
141 ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
142 Set Suite Variable ${onos_ssh_connection}
TorstenThieme1619db22020-04-03 12:01:15 +0000143
TorstenThiemeb41007d2020-06-22 12:14:12 +0000144Teardown Suite
145 [Documentation] Replaces the Suite Teardown in utils.robot.
146 ... Cleans up and checks all ONU ports disabled in ONOS.
147 ... Furthermore gives the possibility to pause the execution.
148 Run Keyword If ${pausebeforecleanup} Import Library Dialogs
149 Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
TorstenThieme87cd6202020-09-09 10:01:28 +0000150 Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
TorstenThiemeb41007d2020-06-22 12:14:12 +0000151 Run Keyword If ${teardown_device} Delete All Devices and Verify
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000152 # Wait for Ports in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM
153 Wait for Ports in ONOS ${onos_ssh_connection} 0 BBSM
154 Close ONOS SSH Connection ${onos_ssh_connection}
TorstenThieme87cd6202020-09-09 10:01:28 +0000155 Remove Tech Profile
TorstenThiemeb41007d2020-06-22 12:14:12 +0000156
TorstenThieme1619db22020-04-03 12:01:15 +0000157Setup Test
158 [Documentation] Pre-test Setup
159 #test for empty device list
160 Test Empty Device List
161 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up
Suchitra Vemurib7253a52020-07-14 22:35:17 -0700162 ... ${olt_ssh_ip} ${olt_user} ${olt_pass}
TorstenThieme1619db22020-04-03 12:01:15 +0000163 Run Keyword If ${has_dataplane} Sleep 60s
164 #create/preprovision device
165 ${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT}
166 Set Suite Variable ${olt_device_id}
167 #validate olt states
168 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN
169 ... ${olt_device_id}
170 Sleep 5s
171
172Calculate Timeout
173 [Documentation] Calculates the timeout regarding num-onus in case of more than 4 onus
174 ${timeout} Fetch From Left ${timeout} s
175 ${timeout}= evaluate ${timeout}+((${num_onus}-4)*30)
TorstenThieme401af432020-06-11 15:53:53 +0000176 ${timeout}= Set Variable If (not ${debugmode}) and (${timeout}>600) 600 ${timeout}
TorstenThieme1619db22020-04-03 12:01:15 +0000177 ${timeout}= Catenate SEPARATOR= ${timeout} s
178 Set Suite Variable ${timeout}
TorstenThieme1619db22020-04-03 12:01:15 +0000179
180Do ONU Up To State Test
181 [Documentation] This keyword performs Up2State Test
182 ... All states up to the passed have to be checked
183 FOR ${I} IN RANGE 0 ${num_onus}
184 ${src}= Set Variable ${hosts.src[${I}]}
185 ${dst}= Set Variable ${hosts.dst[${I}]}
186 Run Keyword If ${state2test}>=1
187 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
188 ... Validate Device ENABLED ACTIVATING REACHABLE
189 ... ${src['onu']} onu=True onu_reason=activating-onu
190 Run Keyword If ${state2test}>=2
191 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
192 ... Validate Device ENABLED ACTIVATING REACHABLE
193 ... ${src['onu']} onu=True onu_reason=starting-openomci
194 Run Keyword If ${state2test}>=3
195 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
196 ... Validate Device ENABLED ACTIVATING REACHABLE
197 ... ${src['onu']} onu=True onu_reason=discovery-mibsync-complete
198 Run Keyword If ${state2test}>=4
199 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
200 ... Validate Device ENABLED ACTIVE REACHABLE
201 ... ${src['onu']} onu=True onu_reason=initial-mib-downloaded
202 Run Keyword If ${state2test}>=5
203 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
204 ... Validate Device ENABLED ACTIVE REACHABLE
205 ... ${src['onu']} onu=True onu_reason=tech-profile-config-download-success
206 Run Keyword If ${state2test}>=6
207 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
208 ... Validate Device ENABLED ACTIVE REACHABLE
209 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
210 END
211
212Do ONU Single State Test
213 [Documentation] This keyword performs SingleState Test
214 ... Only the passed state has to be checked
215 FOR ${I} IN RANGE 0 ${num_onus}
216 ${src}= Set Variable ${hosts.src[${I}]}
217 ${dst}= Set Variable ${hosts.dst[${I}]}
TorstenThieme015d5c02020-09-11 09:53:34 +0000218 ${admin_state} ${oper_status} ${connect_status} ${onu_state}= Map State ${state2test}
219 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
220 ... Validate Device ${admin_state} ${oper_status} ${connect_status}
221 ... ${src['onu']} onu=True onu_reason=${onu_state}
TorstenThieme1619db22020-04-03 12:01:15 +0000222 END
223
TorstenThieme94e4ae42020-05-18 13:01:42 +0000224Do ONU Single State Test Time
225 [Documentation] This keyword performs SingleState Test with calculate running time
226 ... Only the passed state has to be checked and the duration each single onu adapter needed
227 ... will be calculated and printed out
228 ${ListfinishedONUs} Create List
229 Set Global Variable ${ListfinishedONUs}
230 Create File ONU_Startup_Time.txt This file contains the startup times of all ONUs.
231 ${list_onus} Create List
TorstenThieme401af432020-06-11 15:53:53 +0000232 Build ONU SN List ${list_onus}
TorstenThieme015d5c02020-09-11 09:53:34 +0000233 ${admin_state} ${oper_status} ${connect_status} ${onu_state}= Map State ${state2test}
234 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
TorstenThieme9949b172020-06-16 10:00:15 +0000235 ... Validate ONU Devices MIB State With Duration
TorstenThieme015d5c02020-09-11 09:53:34 +0000236 ... ${onu_state} ${list_onus} ${timeStart} print2console=True
TorstenThieme401af432020-06-11 15:53:53 +0000237 ... output_file=ONU_Startup_Time.txt
TorstenThieme94e4ae42020-05-18 13:01:42 +0000238
TorstenThieme1619db22020-04-03 12:01:15 +0000239Do Onu Port Check
TorstenThieme00958682020-06-19 11:29:31 +0000240 [Documentation] Check that all the UNI ports show up in ONOS
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000241 Wait for Ports in ONOS ${onos_ssh_connection} ${num_onus} BBSM
TorstenThieme9949b172020-06-16 10:00:15 +0000242
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000243Set Tech Profile
244 [Documentation] This keyword set the passed TechProfile for the test
245 [Arguments] ${TechProfile}
TorstenThieme87cd6202020-09-09 10:01:28 +0000246 Log To Console \nTechProfile:${TechProfile}
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000247 ${namespace}= Set Variable default
Andrea Campanella60dde302020-09-09 18:42:56 +0200248 ${podname}= Set Variable etcd
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000249 ${src}= Set Variable ${data_dir}/TechProfile-${TechProfile}.json
250 ${dest}= Set Variable /tmp/flexpod.json
251 ${command} Catenate
252 ... /bin/sh -c 'cat ${dest} | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/XGS-PON/64'
253 Copy File To Pod ${namespace} ${podname} ${src} ${dest}
254 Exec Pod ${namespace} ${podname} ${command}
255 ${commandget} Catenate
256 ... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/XGS-PON/64'
257 Exec Pod ${namespace} ${podname} ${commandget}
258
259Remove Tech Profile
260 [Documentation] This keyword removes TechProfile
TorstenThieme015d5c02020-09-11 09:53:34 +0000261 Log To Console \nTechProfile:${TechProfile}
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000262 ${namespace}= Set Variable default
Andrea Campanella60dde302020-09-09 18:42:56 +0200263 ${podname}= Set Variable etcd
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000264 ${command} Catenate
265 ... /bin/sh -c 'ETCDCTL_API=3 etcdctl del --prefix service/voltha/technology_profiles/XGS-PON/64'
266 Exec Pod ${namespace} ${podname} ${command}
267 ${commandget} Catenate
268 ... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/XGS-PON/64'
269 Exec Pod ${namespace} ${podname} ${commandget}
270
271Do Check Tech Profile
272 [Documentation] This keyword checks the loaded TechProfile
273 ${namespace}= Set Variable default
Andrea Campanella60dde302020-09-09 18:42:56 +0200274 ${podname}= Set Variable etcd
TorstenThiemee0e5bba2020-08-05 11:20:13 +0000275 ${commandget} Catenate
276 ... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/XGS-PON/64'
277 ${result}= Exec Pod ${namespace} ${podname} ${commandget}
278 ${num_gem_ports}= Set Variable 1
279 ${num_gem_ports}= Set Variable If
280 ... "${techprofile}"=="default" 1
281 ... "${techprofile}"=="1T4GEM" 4
282 ... "${techprofile}"=="1T8GEM" 8
283 @{resultList} Split String ${result} separator=,
284 ${num_of_count_matches}= Get Match Count ${resultList} "num_gem_ports": ${num_gem_ports}
285 ... whitespace_insensitive=True
286 ${num_of_expected_matches}= Run Keyword If "${techprofile}"=="default" Evaluate ${num_onus}
287 ... ELSE Evaluate ${num_onus}+1
288 Run Keyword If ${num_of_expected_matches}!=${num_of_count_matches} Log To Console
289 ... \nTechProfile (${TechProfile}) not loaded correctly:${num_of_count_matches} of ${num_of_expected_matches}
TorstenThieme015d5c02020-09-11 09:53:34 +0000290
291Do Disable Enable Onu Test
292 [Documentation] This keyword disables/enables all onus and checks the states.
293 FOR ${I} IN RANGE 0 ${num_onus}
294 ${src}= Set Variable ${hosts.src[${I}]}
295 ${onu_device_id}= Get Device ID From SN ${src['onu']}
296 #check for previous state is kept (normally omci-flows-pushed)
297 Do Current State Test ${state2test} ${src['onu']}
298 Disable Device ${onu_device_id}
299 Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
300 #check state for omci-admin-lock
301 Do Current State Test omci-admin-lock ${src['onu']}
302 Enable Device ${onu_device_id}
303 #check state for onu-reenabled
304 Do Current State Test onu-reenabled ${src['onu']}
305 #check for previous state is reached again (normally omci-flows-pushed)
306 Do Current State Test ${state2test} ${src['onu']}
307 END
308
309Do Reconcile Onu Device
310 [Documentation] This keyword reconciles ONU device and check the state afterwards.
311 ... Following steps will be executed:
312 ... - restart openonu adaptor
313 ... - check openonu adaptor is ready again
314 ... - check previous state is kept
315 ... - ONU-Disable
316 ... - wait some seconds
317 ... - check for state omci-admin-lock
318 ... - ONU-Enable
319 ... - wait some seconds
320 ... - check for state onu-reenabled
321 ... - port check
322 # set open-onu app name
323 ${list_openonu_apps} Create List adapter-open-onu
324 ${namespace}= Set Variable voltha
325 ${adaptorname}= Set Variable open-onu
326 # restart openonu adapter
327 # Restart Pod ${namespace} ${adaptorname}
328 # use kill command instaed of libraries restart keyword (requested by Holger)
329 Kill Adaptor ${namespace} ${adaptorname}
330 Sleep 5s
331 Wait For Pods Ready ${namespace} ${list_openonu_apps}
332 Do Disable Enable Onu Test
333 Run Keyword If ${porttest} Do Onu Port Check
334
335Do Current State Test
336 [Documentation] This keyword checks the passed state of the given onu.
337 [Arguments] ${state} ${onu}
338 ${admin_state} ${oper_status} ${connect_status} ${onu_state}= Map State ${state}
339 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 50ms
340 ... Validate Device ${admin_state} ${oper_status} ${connect_status}
341 ... ${onu} onu=True onu_reason=${onu_state}
342
343Kill Adaptor
344 [Documentation] This keyword kills the passed adaptor.
345 [Arguments] ${namespace} ${name}
346 ${cmd} Catenate
347 ... kubectl exec -it -n voltha $(kubectl get pods -n ${namespace} | grep ${name} | awk 'NR==1{print $1}')
348 ... -- /bin/sh -c "kill 1"
349 ${rc} ${output}= Run and Return Rc and Output ${cmd}
350 Log ${output}
351
352Map State
353 [Documentation] This keyword converts the passed numeric value or name of a onu state to its state values.
354 [Arguments] ${state}
355 # create state lists with corresponding return values
356 # ADMIN-STATE OPER-STATUS CONNECT-STATUS ONU-STATE
357 ${state1} Create List ENABLED ACTIVATING REACHABLE activating-onu
358 ${state2} Create List ENABLED ACTIVATING REACHABLE starting-openomci
359 ${state3} Create List ENABLED ACTIVATING REACHABLE discovery-mibsync-complete
360 ${state4} Create List ENABLED ACTIVE REACHABLE initial-mib-downloaded
361 ${state5} Create List ENABLED ACTIVE REACHABLE tech-profile-config-download-success
362 ${state6} Create List ENABLED ACTIVE REACHABLE omci-flows-pushed
363 ${state7} Create List DISABLED UNKNOWN UNREACHABLE omci-admin-lock
364 ${state8} Create List ENABLED ACTIVE REACHABLE onu-reenabled
365 ${admin_state} ${oper_status} ${connect_status} ${onu_state}= Set Variable If
366 ... '${state}'=='1' or '${state}'=='activating-onu' ${state1}
367 ... '${state}'=='2' or '${state}'=='starting-openomci' ${state2}
368 ... '${state}'=='3' or '${state}'=='discovery-mibsync-complete' ${state3}
369 ... '${state}'=='4' or '${state}'=='initial-mib-downloaded' ${state4}
370 ... '${state}'=='5' or '${state}'=='tech-profile-config-download-success' ${state5}
371 ... '${state}'=='6' or '${state}'=='omci-flows-pushed' ${state6}
372 ... '${state}'=='7' or '${state}'=='omci-admin-lock' ${state7}
373 ... '${state}'=='8' or '${state}'=='onu-reenabled' ${state8}
374 [Return] ${admin_state} ${oper_status} ${connect_status} ${onu_state}