[VOL-4481] Add multi-uni support for DT workflow tests
Change-Id: I8f9ab1ed8d03e27f8d16fe03d8feb007dfe12916
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 9637a89..9417b8a 100755
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -90,7 +90,7 @@
${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
${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']}
# If the power switch port is not specified, continue
Continue For Loop If '${src["power_switch_port"]}' == '${None}'
# Disable Power Switch
@@ -111,7 +111,7 @@
Enable Switch Outlet ${src['power_switch_port']}
# Check ONU port is Enabled in ONOS
Wait Until Keyword Succeeds 120s 5s
- ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Wait Until Keyword Succeeds ${timeout} 2
... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
@@ -260,7 +260,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} 5s
... Validate Device ENABLED ACTIVE REACHABLE
... ${onu_device_id} onu=True onu_reason=initial-mib-downloaded by_dev_id=True
@@ -290,7 +290,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
${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,14 +343,14 @@
${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
${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']}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 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 ${timeout} 5s
- ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
# Verify subscriber access flows are added for the ONU port
Wait Until Keyword Succeeds ${timeout} 5s
... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
@@ -395,7 +395,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=initial-mib-downloaded by_dev_id=True
@@ -433,7 +433,7 @@
${of_id}= Get ofID From OLT List ${src['olt']}
${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
${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}
@@ -510,7 +510,7 @@
${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
${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']}
Reboot Device ${onu_device_id}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds ${timeout} 2s
@@ -525,7 +525,7 @@
Sleep 40s
# Check ONU port is Enabled in ONOS
Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Wait Until Keyword Succeeds ${timeout} 2
... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-add-subscriber-access ${of_id} ${onu_port}
@@ -763,7 +763,7 @@
${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
${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']}
# Remove Subscriber Access
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}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index b6b14bb..b8db993 100755
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -163,7 +163,7 @@
${olt_device_id}= Get OLTDeviceID From OLT List ${src['olt']}
${num_of_olt_onus}= Get Num of Onus From OLT SN ${src['olt']}
${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
- ... ${of_id}
+ ... ${of_id} ${src['uni_id']}
# Remove Subscriber Access
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}
@@ -231,13 +231,13 @@
${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}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Validate Device DISABLED UNKNOWN
... REACHABLE ${src['onu']} onu=True onu_reason=tech-profile-config-delete-success
Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
# TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds ${timeout} 2s
@@ -249,7 +249,7 @@
... Validate Device ENABLED ACTIVE
... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled
Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
# Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed.
Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed
# Workaround ends here for issue seen in VOL-4489.
@@ -337,9 +337,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}
+ ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds ${timeout} 2s
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
@@ -481,7 +481,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
@@ -540,7 +540,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
@@ -738,7 +738,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
@@ -805,10 +805,10 @@
... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
# ONU Auto-Discovery
${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']}
# Check ONU port is Enabled in ONOS
Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
+ ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
${onu_device_id}= Get Device ID From SN ${src['onu']}
Run Keyword If ${has_dataplane} Clean Up Linux ${onu_device_id}
# Verify ONU state in voltha