[VOL-3013][VOL-3015] Update DT and ATT TCs to replicate desired workflow
Change-Id: I2d4a3501ac6008b076eaaddbd8c5e6384369ea4f
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 1ebfb40..67d5cce 100644
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -77,28 +77,41 @@
${dst}= Set Variable ${hosts.dst[${I}]}
${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
... Get ONU Port in ONOS ${src['onu']} ${of_id}
+ # Disable Power Switch
Disable Switch Outlet ${src['power_switch_port']}
Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
... Wait Until Keyword Succeeds 60s 2s
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
-
+ # Remove Subscriber Access (To replicate DT workflow)
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
+ # Delete ONU Device (To replicate DT workflow)
+ Delete Device ${onu_device_id}
+ Sleep 5s
+ # Enable Power Switch
Enable Switch Outlet ${src['power_switch_port']}
+ ${onu_device_id}= Get Device ID From SN ${src['onu']}
# 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} ${onu_port}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
+ ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... volt-add-subscriber-access ${of_id} ${onu_port}
# 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=discovery-mibsync-complete
+ ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
... ${onu_port} ${nni_port} ${src['s_tag']}
- Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
- ... Wait Until Keyword Succeeds 60s 2s
- ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
+ ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
+ ... ${dst['container_name']}
Run Keyword And Ignore Error Collect Logs
END
# Verify ONOS Flows
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 043a5b9..37ef5d9 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -254,65 +254,35 @@
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_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}
- Log ${List_ONU_Serial}
- Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
- ... ${List_ONU_Serial} ${onu_flows}
+ FOR ${I} IN RANGE 0 ${num_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${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}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
+ ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds 60s 2s
+ ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
+ ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ # Remove Subscriber Access (To replicate DT workflow)
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
+ # Delete ONU Device (To replicate DT workflow)
+ Delete Device ${onu_device_id}
+ END
+ Sleep 15s
# Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
Enable Device ${olt_device_id}
Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
... ${olt_serial_number}
Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
... PON_OLT ETHERNET_NNI
- FOR ${I} IN RANGE 0 ${num_onus}
- ${src}= Set Variable ${hosts.src[${I}]}
- ${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}
- Wait Until Keyword Succeeds ${timeout} 10s Validate Device ENABLED ACTIVE
- ... REACHABLE ${src['onu']} onu=True onu_reason=discovery-mibsync-complete
- # Verify that ping works fine again
- Run Keyword If ${has_dataplane}
- ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s
- ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
- ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
- 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}
- Log ${List_ONU_Serial}
- Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
- ... ${List_ONU_Serial} ${onu_flows}
+ # Waiting extra time for the ONUs to come up
+ Sleep 60s
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Test Delete and ReAdd OLT for DT
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index f91c8ff..3fd4249 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -83,6 +83,9 @@
... Wait Until Keyword Succeeds 60s 2s
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ # Remove Subscriber Access (To replicate ATT workflow)
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Enable Switch Outlet ${src['power_switch_port']}
# Check ONU port is Enabled in ONOS
@@ -95,14 +98,33 @@
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
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ # Perform Authentication
+ ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
+ ... /tmp/wpa ${src['dp_iface_name']} log
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
+ ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
+ ... ${src['container_type']} ${src['container_name']} ${wpa_log}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
+ ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
+ ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... volt-add-subscriber-access ${of_id} ${onu_port}
+ # Verify that no pending flows exist for the ONU port
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
+ ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
# Verify subscriber access flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
- Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
- ... Wait Until Keyword Succeeds 60s 2s
- ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
+ ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
+ ... ${dst['container_name']}
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
+ ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
+ Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
Run Keyword And Ignore Error Collect Logs
END
# Deleting OLT after tests completes independently (as this test doesn't not run on each POD)
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index d7f49e7..7671f1a 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -84,6 +84,8 @@
${src}= Set Variable ${hosts.src[${I}]}
${dst}= Set Variable ${hosts.dst[${I}]}
${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}
Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED
... UNREACHABLE ${src['onu']} onu=false
#Verify that ping fails
@@ -91,6 +93,9 @@
... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s
... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ # Remove Subscriber Access (To replicate ATT workflow)
+ Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
+ ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
END
#Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
Enable Device ${olt_device_id}
@@ -98,24 +103,8 @@
... ${olt_serial_number}
Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
... PON_OLT ETHERNET_NNI
- FOR ${I} IN RANGE 0 ${num_onus}
- ${src}= Set Variable ${hosts.src[${I}]}
- ${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}
- Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE
- ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
- Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
- #Verify that ping workss fine again
- Run Keyword If ${has_dataplane}
- ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s
- ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
- ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
- Run Keyword and Ignore Error Collect Logs
- END
-
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Test Disable and Enable ONU
[Documentation] Validates E2E Ping Connectivity and object states for the given scenario: