[VOL-3638] Updating ONU test to latest keyword arguments
Change-Id: Ic89f882b5d8824e70a232d8f43702bea2ae8a428
diff --git a/tests/functional/Voltha_ScaleFunctionalTests.robot b/tests/functional/Voltha_ScaleFunctionalTests.robot
index 6858aa5..3eb1576 100644
--- a/tests/functional/Voltha_ScaleFunctionalTests.robot
+++ b/tests/functional/Voltha_ScaleFunctionalTests.robot
@@ -121,8 +121,11 @@
[Documentation] Verify dhcp allocation for multiple ONU user
[Tags] VOL-1824 active
#validate total number of DHCP allocations
- Wait Until Keyword Succeeds ${long_timeout} 20s Validate DHCP Allocations ${ONOS_SSH_IP}
- ... ${ONOS_SSH_PORT} 16
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Wait Until Keyword Succeeds ${long_timeout} 20s Validate DHCP Allocations ${onos_ssh_connection}
+ ... 16 ${olt_serial_number} BBSM
+ END
#validate DHCP allocation for each port
FOR ${I} IN RANGE 0 ${num_onus}
${src}= Set Variable ${hosts.src[${I}]}
@@ -181,6 +184,7 @@
Setup Suite
[Documentation] Set up the test suite
Common Test Suite Setup
+ ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Teardown Suite
[Documentation] Clean up devices if desired
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index 608580b..10c859d 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -96,9 +96,12 @@
... Assuming that ONU State Test was executed where all the ONUs are reached the expected state!
[Tags] functionalOnuGo PortTestOnuGo
[Setup] Start Logging ONUPortTest
- Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
- ... Do Onu Port Check
- ... ELSE Pass Execution ${skip_message} skipped
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed'
+ ... Do Onu Port Check ${olt_serial_number}
+ ... ELSE Pass Execution ${skip_message} skipped
+ END
[Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
... AND Stop Logging ONUPortTest
@@ -209,7 +212,10 @@
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
Validate Onu Data In Etcd 0
- Wait for Ports in ONOS ${onos_ssh_connection} 0 BBSM
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Wait for Ports in ONOS ${onos_ssh_connection} 0 ${olt_serial_number} BBSM
+ END
Close ONOS SSH Connection ${onos_ssh_connection}
Remove Tech Profile
@@ -304,7 +310,8 @@
Do Onu Port Check
[Documentation] Check that all the UNI ports show up in ONOS
- Wait for Ports in ONOS ${onos_ssh_connection} ${num_all_onus} BBSM
+ [Arguments] ${olt_serial_number}
+ Wait for Ports in ONOS ${onos_ssh_connection} ${num_all_onus} ${olt_serial_number} BBSM
Do Onu Etcd Data Check
[Documentation] Check Onu data stored in etcd
@@ -445,12 +452,18 @@
Do Current State Test All Onus ${state2checkafterdisable} alternativeonustate=${alternative_onu_reason}
Log Ports
#check no port is enabled in ONOS
- Wait for Ports in ONOS ${onos_ssh_connection} 0 BBSM
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Wait for Ports in ONOS ${onos_ssh_connection} 0 ${olt_serial_number} BBSM
+ END
Do Enable Onu Device
Do Current State Test All Onus ${state2check}
Log Ports onlyenabled=True
#check that all the UNI ports show up in ONOS again
- Wait for Ports in ONOS ${onos_ssh_connection} ${num_all_onus} BBSM
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Wait for Ports in ONOS ${onos_ssh_connection} ${num_all_onus} ${olt_serial_number} BBSM
+ END
Do Reconcile Onu Device
[Documentation] This keyword reconciles ONU device and check the state afterwards.
@@ -472,7 +485,10 @@
Sleep 5s
Wait For Pods Ready ${namespace} ${list_openonu_apps}
Do Disable Enable Onu Test
- Do Onu Port Check
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Do Onu Port Check ${olt_serial_number}
+ END
Do Power Off Power On Onu Device
[Documentation] This keyword power off/on all onus and checks the states.
@@ -497,7 +513,10 @@
Run Keyword Unless ${has_dataplane} Do Disable Enable Onu Test checkstatebeforedisable=False
... state2checkafterdisable=omci-admin-lock
Run Keyword If ${has_dataplane} Do Current State Test All Onus omci-flows-pushed
- Do Onu Port Check
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Do Onu Port Check ${olt_serial_number}
+ END
Do Disable Onu Device
[Documentation] This keyword disables all onus.
diff --git a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
index 9dc86d0..422ad02 100755
--- a/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUTemplateTests.robot
@@ -87,7 +87,10 @@
Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up!
Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes
Run Keyword If ${teardown_device} Delete All Devices and Verify
- Wait for Ports in ONOS ${onos_ssh_connection} 0 BBSM
+ FOR ${I} IN RANGE 0 ${num_olts}
+ ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
+ Wait for Ports in ONOS ${onos_ssh_connection} 0 ${olt_serial_number} BBSM
+ END
# delete etcd MIB Template Data (for repeating test)
Delete MIB Template Data
Close ONOS SSH Connection ${onos_ssh_connection}