[VOL-4171][VOL-4212] Added support for multi-uni for ATT and TT workflow
Change-Id: Id20c3b37b385ff0c2639d5240be71e41de388e06
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index 4cafe6c..c682dea 100755
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -81,7 +81,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Disable Switch Outlet ${src['power_switch_port']}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds 60s 2s
@@ -237,7 +237,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Wait Until Keyword Succeeds ${timeout} 2s
... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
@@ -280,7 +280,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
# Bring up the device and verify it authenticates
Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
@@ -319,7 +319,7 @@
${dst}= Set Variable ${hosts.dst[${I}]}
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
@@ -343,7 +343,7 @@
[Setup] Start Logging ofagentRestart
[Teardown] Run Keywords Collect Logs
... AND Stop Logging ofagentRestart
- ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
+ ... AND Scale K8s Deployment ${NAMESPACE} ${NAMESPACE}-voltha-ofagent 1
# set timeout value
${waitforRestart} Set Variable 120s
${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
@@ -361,7 +361,8 @@
${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
# Scale Down the Of-Agent Deployment
- Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 0
+ ${ofagent-deployment}= Catenate SEPARATOR=- ${NAMESPACE} voltha-ofagent
+ Scale K8s Deployment ${NAMESPACE} ${ofagent-deployment} 0
Sleep 30s
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
@@ -369,14 +370,14 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
... ENABLED ACTIVE REACHABLE
... ${src['onu']} onu=True onu_reason=omci-flows-pushed
# Check ONU port is Disabled in ONOS
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
- ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
# Verify EAPOL flows are present for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
@@ -396,7 +397,7 @@
... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
END
# Scale Up the Of-Agent Deployment
- Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
+ Scale K8s Deployment ${NAMESPACE} ${ofagent-deployment} 1
Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
... Running
# Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
@@ -425,9 +426,9 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Run Keyword And Continue On Failure Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
- ... ${src['onu']}
+ ... ${src['onu']} ${src['uni_id']}
${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System
... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']}
... ${src['container_type']} ${src['container_name']}
@@ -453,10 +454,10 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
# Check ONU port is Enabled in ONOS
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
- ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
# Verify EAPOL flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
@@ -516,7 +517,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
# Bring up the device and verify it authenticates
Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
... ${onu_device_id} onu=True onu_reason=omci-flows-pushed by_dev_id=True
@@ -532,17 +533,17 @@
END
# Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
- Scale K8s Deployment voltha voltha-voltha-rw-core 0
- Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core
+ Scale K8s Deployment ${NAMESPACE} ${NAMESPACE}-voltha-rw-core 0
+ Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist ${NAMESPACE} ${NAMESPACE}-voltha-rw-core
# Ensure the ofagent POD goes "not-ready" as expected
Wait Until keyword Succeeds ${timeout} 2s
- ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0
+ ... Check Expected Available Deployment Replicas ${NAMESPACE} ${NAMESPACE}-voltha-ofagent 0
# Scale up the core deployment and make sure both it and the ofagent deployment are back
- Scale K8s Deployment voltha voltha-voltha-rw-core 1
+ Scale K8s Deployment ${NAMESPACE} ${NAMESPACE}-voltha-rw-core 1
Wait Until Keyword Succeeds ${timeout} 2s
- ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1
+ ... Check Expected Available Deployment Replicas ${NAMESPACE} ${NAMESPACE}-voltha-rw-core 1
Wait Until Keyword Succeeds ${timeout} 2s
- ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1
+ ... Check Expected Available Deployment Replicas ${NAMESPACE} ${NAMESPACE}-voltha-ofagent 1
# For some reason scaling down and up the POD behind a service causes the port forward to stop working,
# so restart the port forwarding for the API service
Restart VOLTHA Port Forward voltha-api
@@ -562,7 +563,7 @@
${dst}= Set Variable ${hosts.dst[${I}]}
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
@@ -631,7 +632,7 @@
[Setup] Start Logging ofagentRestart2
[Teardown] Run Keywords Collect Logs
... AND Stop Logging ofagentRestart2
- ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
+ ... AND Scale K8s Deployment ${NAMESPACE} ${NAMESPACE}-voltha-ofagent 1
Delete All Devices And Verify
setup
Run Keyword If ${has_dataplane} Clean Up Linux
@@ -649,7 +650,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
# Bring up the device and verify it authenticates
Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE
... ${onu_device_id} onu=True onu_reason=omci-flows-pushed by_dev_id=True
@@ -681,7 +682,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
# Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index dea6d12..ffa72cf 100755
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -97,7 +97,7 @@
... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
... Perform disable on the ONUs and validate that the pings do not succeed
... Perform enable on the ONUs and validate that the pings are successful
- [Tags] functional DisableEnableONU released
+ [Tags] functional DisableEnableONU released multi-uni
[Setup] Start Logging DisableEnableONU
[Teardown] Run Keywords Collect Logs
... AND Stop Logging DisableEnableONU
@@ -107,7 +107,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Disable Device ${onu_device_id}
Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
@@ -132,7 +132,7 @@
... Assuming that all the ONUs are authenticated/DHCP/pingable
... Delete a subscriber and validate that the pings do not succeed
... Re-add the subscriber and validate that the pings are successful
- [Tags] functional SubAddDelete released
+ [Tags] functional SubAddDelete released multi-uni
[Setup] Start Logging SubAddDelete
[Teardown] Run Keywords Collect Logs
... AND Stop Logging SubAddDelete
@@ -142,7 +142,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
@@ -171,7 +171,7 @@
[Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and
... when again added subscriber access, DHCP attempt, ping succeeds
... Assuming that test1 or sanity test was executed where all the ONUs are authenticated/DHCP/pingable
- [Tags] functional SubsRemoveDHCP released
+ [Tags] functional SubsRemoveDHCP released multi-uni
[Setup] Start Logging SubsRemoveDHCP
[Teardown] Run Keywords Collect Logs
... AND Stop Logging SubsRemoveDHCP
@@ -181,7 +181,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']}
... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
@@ -224,7 +224,7 @@
... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and
... validate that the pings are successful
... VOL-2284
- [Tags] functional ATT_DisableEnableONU released
+ [Tags] functional ATT_DisableEnableONU released multi-uni
[Setup] Start Logging ATT_DisableEnableONU
[Teardown] Run Keywords Collect Logs
... AND Stop Logging ATT_DisableEnableONU
@@ -234,9 +234,9 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
- ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Disable Device ${onu_device_id}
Wait Until Keyword Succeeds ${timeout} 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
@@ -275,7 +275,7 @@
... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
... Perform disable on the OLT and validate that the pings do not succeed
... Perform enable on the OLT and validate that the pings are successful
- [Tags] functional VOL-2410 DisableEnableOLT
+ [Tags] functional VOL-2410 DisableEnableOLT multi-uni
[Setup] Start Logging DisableEnableOLT
[Teardown] Run Keywords Collect Logs
... AND Stop Logging DisableEnableOLT
@@ -296,7 +296,7 @@
${onu_device_id}= Get Device ID From SN ${src['onu']}
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED
... UNREACHABLE ${src['onu']} onu=false
#Verify that ping fails
@@ -359,7 +359,7 @@
${dst}= Set Variable ${hosts.dst[${I}]}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Disable Device ${onu_device_id}
Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
Delete Device ${onu_device_id}
@@ -386,7 +386,7 @@
${dst}= Set Variable ${hosts.dst[${I}]}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Wait Until Keyword Succeeds 180s 5s Validate Device ENABLED ACTIVE
... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
END
@@ -449,20 +449,21 @@
END
# Delete all OLTs
Delete All Devices and Verify
+ # Re-create the Devices and Perform Sanity
+ Setup
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Validate authentication on a disabled ONU
[Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
... Perform disable on the ONUs and validate that the authentication do not succeed
... Perform enable on the ONUs and validate that authentication successful
- [Tags] functional DisableONU_AuthCheck
+ [Tags] functional DisableONU_AuthCheck multi-uni
# Creates Devices in the Setup
- [Setup] Run Keywords Start Logging DisableONU_AuthCheck
- ... AND Setup
+ [Setup] Start Logging DisableONU_AuthCheck
[Teardown] Run Keywords Collect Logs
... AND Stop Logging DisableONU_AuthCheck
... AND Delete All Devices and Verify
- Run Keyword If ${has_dataplane} Clean Up Linux
- Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Clean WPA Process
FOR ${I} IN RANGE 0 ${num_all_onus}
${src}= Set Variable ${hosts.src[${I}]}
@@ -470,7 +471,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
Disable Device ${onu_device_id}
Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN
... REACHABLE ${src['onu']} onu=false
@@ -515,7 +516,7 @@
Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
${subscriber_id}= Set Variable ${of_id}/${onu_port}
${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
... upstreamBandwidthProfile
@@ -570,7 +571,7 @@
Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
${subscriber_id}= Set Variable ${of_id}/${onu_port}
${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
... upstreamBandwidthProfile
@@ -668,7 +669,7 @@
... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
... Perform disable on the OLT PON Port and validate that the pings do not succeed
... Perform enable on the OLT PON Port and validate that the pings are successful
- [Tags] functional DisableEnableOltPonPort VOL-2577
+ [Tags] functional DisableEnableOltPonPort VOL-2577 multi-uni
[Setup] Run Keywords Start Logging DisableEnableOltPonPort
... AND Setup
[Teardown] Run Keywords Collect Logs