[VOL-3738] Framework code clean up
Change-Id: I83127f368485b7c5cadc31259d70be70ffe698d6
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 3aaba81..2aba5d1 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -62,13 +62,9 @@
${onos_auth}= Create List karaf karaf
${HEADERS} Create Dictionary Content-Type=application/json
Create Session ONOS http://${ONOS_REST_IP}:${ONOS_REST_PORT} auth=${ONOS_AUTH}
- #${olt_ip}= Evaluate ${olts}[0].get("ip")
- #${olt_ssh_ip}= Evaluate ${olts}[0].get("sship")
- #${olt_user}= Evaluate ${olts}[0].get("user")
- #${olt_pass}= Evaluate ${olts}[0].get("pass")
- #${olt_serial_number}= Evaluate ${olts}[0].get("serial")
${num_olts} Get Length ${olts}
${list_olts} Create List
+ # Create olt list from the configuration file
FOR ${I} IN RANGE 0 ${num_olts}
${ip} Evaluate ${olts}[${I}].get("ip")
${user} Evaluate ${olts}[${I}].get("user")
@@ -93,11 +89,6 @@
Set Suite Variable ${list_olts}
${olt_count}= Get Length ${list_olts}
Set Suite Variable ${olt_count}
- #Set Suite Variable ${olt_serial_number}
- #Set Suite Variable ${olt_ip}
- #Set Suite Variable ${olt_ssh_ip}
- #Set Suite Variable ${olt_user}
- #Set Suite Variable ${olt_pass}
@{container_list}= Create List adapter-open-olt adapter-open-onu voltha-api-server
... voltha-ro-core voltha-rw-core-11 voltha-rw-core-12 voltha-ofagent
Set Suite Variable ${container_list}
@@ -215,15 +206,6 @@
... Sanity test performs authentication, dhcp and pings for all the ONUs given for the POD
... This keyword can be used to call in any other tests where sanity check is required
... and avoids duplication of code. - ATT workflow
- #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s
- #... Validate OLT Device in ONOS ${olt_serial_number}
- #Set Global Variable ${of_id}
- #${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- #... Get NNI Port in ONOS ${of_id}
- #Set Global Variable ${nni_port}
- # Verify Default Meter in ONOS (valid only for ATT)
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Default Meter Present in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -316,11 +298,6 @@
... Sanity test performs dhcp and pings (without EAPOL and DHCP flows) for all the ONUs given for the POD
... This keyword can be used to call in any other tests where sanity check is required
... and avoids duplication of code.
- #${of_id}= Wait Until Keyword Succeeds 360s 15s Validate OLT Device in ONOS ${olt_serial_number}
- #Set Global Variable ${of_id}
- #${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- #... Get NNI Port in ONOS ${of_id}
- #Set Global Variable ${nni_port}
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -355,24 +332,6 @@
Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
Run Keyword and Ignore Error Collect Logs
END
- # Verify ONOS Flows
- # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
- #${onos_flows_count}= Evaluate 4 * ${num_onus}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
- #... ${onos_flows_count}
- # Verify VOLTHA Flows
- # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
- #${olt_flows}= Evaluate 2 * ${num_onus} + 1
- # Number of per ONU Flows equals 2 (one each for downstream and upstream)
- #${onu_flows}= Set Variable 2
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
- #${List_ONU_Serial} Create List
- #Set Suite Variable ${List_ONU_Serial}
- #Build ONU SN List ${List_ONU_Serial} ${olt_serial_number}
- #Log ${List_ONU_Serial}
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
- #... ${List_ONU_Serial} ${onu_flows}
Validate All OLT Flows
[Documentation] This keyword iterate all OLTs and performs Sanity Test Procedure for DT workflow
@@ -557,8 +516,6 @@
[Documentation] Pre-test Setup
#test for empty device list
Test Empty Device List
- #Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up
- #... ${olt_ip} ${olt_user} ${olt_pass}
Run Keyword If ${has_dataplane} Sleep 230s
# Create a list of olt ids (logical and device_id)
${olt_ids} Create List
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 7b91460..19462dd 100644
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -121,24 +121,6 @@
END
# Verify flows for all OLTs
Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows
- # Verify ONOS Flows
- # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
- #${onos_flows_count}= Evaluate 4 * ${num_onus}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- #... ${of_id} ${onos_flows_count}
- # Verify VOLTHA Flows
- # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
- #${olt_flows}= Evaluate 2 * ${num_onus} + 1
- # Number of per ONU Flows equals 2 (one each for downstream and upstream)
- #${onu_flows}= Set Variable 2
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
- #${List_ONU_Serial} Create List
- #Set Suite Variable ${List_ONU_Serial}
- #Build ONU SN List ${List_ONU_Serial} ${olt_serial_number}
- #Log ${List_ONU_Serial}
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
- #... ${List_ONU_Serial} ${onu_flows}
Verify OLT after Rebooting Physically for DT
[Documentation] Test the physical reboot of the OLT
@@ -442,9 +424,6 @@
[Teardown] Run Keywords Collect Logs
... AND Stop Logging OLTSoftRebootDt
#... AND Delete Device and Verify
- ## Performing Sanity Test to make sure subscribers are all DHCP and pingable
- #Run Keyword If ${has_dataplane} Clean Up Linux
- #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
# Reboot the OLT using "voltctl device reboot" command
Reboot Device ${olt_device_id}
Run Keyword And Ignore Error Collect Logs
@@ -478,9 +457,6 @@
[Teardown] Run Keywords Collect Logs
... AND Stop Logging ONUSoftRebootDt
#... AND Delete Device and Verify
- # Performing Sanity Test to make sure subscribers are all DHCP and pingable
- #Run Keyword If ${has_dataplane} Clean Up Linux
- #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
#Reboot the ONU and verify that ping fails
FOR ${I} IN RANGE 0 ${num_onus}
${src}= Set Variable ${hosts.src[${I}]}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 8e7083c..869d7ac 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -167,24 +167,6 @@
END
# Verify flows for all OLTs
Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows
- # Verify ONOS Flows
- # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
- #${onos_flows_count}= Evaluate 4 * ${num_all_onus}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- #... ${of_id} ${onos_flows_count}
- # Verify VOLTHA Flows
- # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
- #${olt_flows}= Evaluate 2 * ${num_all_onus} + 1
- # Number of per ONU Flows equals 2 (one each for downstream and upstream)
- #${onu_flows}= Set Variable 2
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
- #${List_ONU_Serial} Create List
- #Set Suite Variable ${List_ONU_Serial}
- #Build ONU SN List ${List_ONU_Serial}
- #Log ${List_ONU_Serial}
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
- #... ${List_ONU_Serial} ${onu_flows}
Test Disable and Enable ONU for DT
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
@@ -283,37 +265,6 @@
... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Run Keyword and Ignore Error Collect Logs
END
- #Disable Device ${olt_device_id}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Validate OLT Device DISABLED UNKNOWN REACHABLE
- #... ${olt_serial_number}
-
- # Validate ONUs
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONUs After OLT Disable
- # Verify ONOS Flows
- # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
- #${onos_flows_count}= Evaluate 4 * ${num_all_onus}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- #... ${of_id} ${onos_flows_count}
- # Verify VOLTHA Flows
- # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
- #${olt_flows}= Evaluate 2 * ${num_all_onus} + 1
- # Number of per ONU Flows equals 2 (one each for downstream and upstream)
- #${onu_flows}= Set Variable 2
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
- #${List_ONU_Serial} Create List
- #Set Suite Variable ${List_ONU_Serial}
- #Build ONU SN List ${List_ONU_Serial}
- #Log ${List_ONU_Serial}
- #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
- #... ${List_ONU_Serial} ${onu_flows}
- # Delete OLT and Validate Empty Device List
- #Delete Device ${olt_device_id}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
- #Run Keyword and Ignore Error Collect Logs
# Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
Run Keyword Setup
Run Keyword If ${has_dataplane} Clean Up Linux
@@ -339,10 +290,6 @@
Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
... ${olt_serial_number}
END
- #Disable Device ${olt_device_id}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Validate OLT Device DISABLED UNKNOWN REACHABLE
- #... ${olt_serial_number}
# Validate ONUs
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
@@ -415,7 +362,6 @@
[Setup] Start Logging DisableDeleteONUOLTDt
[Teardown] Run Keywords Collect Logs
... AND Stop Logging DisableDeleteONUOLTDt
- #${olt_device_id}= Get Device ID From SN ${olt_serial_number}
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -434,7 +380,6 @@
... Validate OLT Device ENABLED ACTIVE
... REACHABLE ${src['olt']}
END
- #Disable Device ${olt_device_id}
# Disable all OLTs
FOR ${I} IN RANGE 0 ${olt_count}
${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
@@ -542,8 +487,6 @@
... AND Stop Logging BandwidthProfileUDPDt
Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
... physical pod. Skipping this test in BBSIM.
- #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
- #... ${olt_serial_number}
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index 93a5b95..cbebeff 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -598,11 +598,6 @@
[Setup] Start Logging OLTSoftReboot
[Teardown] Run Keywords Collect Logs
... AND Stop Logging OLTSoftReboot
- #Delete All Devices and Verify
- #Setup
- ## Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
- #Run Keyword If ${has_dataplane} Clean Up Linux
- #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
FOR ${I} IN RANGE 0 ${olt_count}
${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
@@ -723,10 +718,6 @@
[Teardown] Run Keywords Collect Logs
... AND Stop Logging ONUSoftReboot
#... AND Delete Device and Verify
- # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
- #Run Keyword If ${has_dataplane} Clean Up Linux
- #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
- #Reboot the ONU and verify that ping fails
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -783,9 +774,6 @@
Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
Run Keyword And Ignore Error Collect Logs
END
- #Delete All Devices And Verify
- #Run Keyword If ${has_dataplane} Clean Up Linux
- #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
*** Keywords ***
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 21e0ca5..7c2ee38 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -459,10 +459,6 @@
END
# Delete all OLTs
Delete All Devices and Verify
- #Delete Device ${olt_device_id}
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List
- #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
- #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Validate authentication on a disabled ONU
[Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
@@ -522,8 +518,6 @@
setup
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
- #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
- #... ${olt_serial_number}
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
@@ -579,7 +573,6 @@
... AND Stop Logging BandwidthProfileUDP
Pass Execution If '${has_dataplane}'=='False'
... Bandwidth profile validation can be done only in physical pod. Skipping this test in BBSIM.
- #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number}
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}