[VOL-4328] Added rw-core restart with ping in background scenario for DT and TT,
[VOL-4367] Added voltha control plane functionality verification after pod restart for DT and TT,
and Also updated cord-robot library requirement to version 2.1.7
Change-Id: Ia72a57ad46fbbf0fa2baac416e591c7ecdc350bf
diff --git a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
index ec52e55..f1f425e 100755
--- a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
+++ b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
@@ -277,36 +277,6 @@
Run Keyword If ${has_dataplane} Clean Up Linux
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT
-Verify restart openonu-adapter container after subscriber provisioning for TT
- [Documentation] Restart openonu-adapter container after VOLTHA is operational.
- ... Prerequisite : ONUs are authenticated and pingable.
- [Tags] functionalTT Restart-OpenOnu-TT
- [Setup] Start Logging Restart-OpenOnu-TT
- [Teardown] Run Keywords Collect Logs
- ... AND Delete All Devices and Verify
- ... AND Collect Logs
- ... AND Stop Logging Restart-OpenOnu-TT
- # Add OLT device
- Setup
- # 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 Tests TT
- ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
- Log ${podStatusOutput}
- ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
- ${podName} Set Variable adapter-open-onu
- Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
- Sleep 5s
- Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
- ... app ${podName} Running
- Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName}
- Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT ${suppressaddsubscriber}
- ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
- Log ${podStatusOutput}
- ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
- Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
- Log to console Pod ${podName} restarted and sanity checks passed successfully
-
Verify restart openolt-adapter container before subscriber provisioning for TT
[Documentation] Restart openolt-adapter container after VOLTHA is operational.
[Tags] functionalTT Restart-OpenOlt-Before-Subscription-TT
@@ -343,31 +313,6 @@
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT
Log to console Pod ${podName} restarted and sanity checks passed successfully
-Verify restart openolt-adapter container after subscriber provisioning for TT
- [Documentation] Restart openolt-adapter container after VOLTHA is operational.
- [Tags] functionalTT Restart-OpenOlt-TT
- [Setup] Start Logging Restart-OpenOlt-TT
- [Teardown] Run Keywords Collect Logs
- ... AND Stop Logging Restart-OpenOlt-TT
- Setup
- Run Keyword If ${has_dataplane} Clean Up Linux
- Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT
- ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
- Log ${podStatusOutput}
- ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
- ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL}
- Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
- Sleep 5s
- Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
- ... app ${podName} Running
- Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName}
- Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT ${suppressaddsubscriber}
- ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
- Log ${podStatusOutput}
- ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
- Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
- Log to console Pod ${podName} restarted and sanity checks passed successfully
-
Verify restart ofagent container after subscriber is provisioned for TT
[Documentation] Restart ofagent container after VOLTHA is operational.
[Tags] functionalTT ofagentRestart-TT
@@ -481,11 +426,12 @@
END
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT
-Verify restart openonu-adapter container while continuously running ping in background for TT
+Verify restart openonu-adapter container for TT
[Documentation] Restart openonu-adapter container after VOLTHA is operational.
... Run the ping continuously in background during container restart,
... and verify that there should be no affect on the dataplane.
- [Tags] functionalTT Restart-OpenOnu-Ping-TT non-critical
+ ... Also, verify that the voltha control plane functionality is not affected.
+ [Tags] functionalTT Restart-OpenOnu-Ping-TT
[Setup] Start Logging Restart-OpenOnu-Ping-TT
[Teardown] Run Keywords Collect Logs
... AND Stop Logging Restart-OpenOnu-Ping-TT
@@ -539,12 +485,15 @@
... ${src['container_type']} ${src['container_name']}
Check Ping Result True ${ping_output}
END
+ # Verify Control Plane Functionality by Deleting and Re-adding the Subscriber
+ Verify Control Plane After Pod Restart TT
-Verify restart openolt-adapter container while continuously running ping in background for TT
+Verify restart openolt-adapter container for TT
[Documentation] Restart openolt-adapter container after VOLTHA is operational.
... Run the ping continuously in background during container restart,
... and verify that there should be no affect on the dataplane.
- [Tags] functionalTT Restart-OpenOlt-Ping-TT non-critical
+ ... Also, verify that the voltha control plane functionality is not affected.
+ [Tags] functionalTT Restart-OpenOlt-Ping-TT
[Setup] Start Logging Restart-OpenOlt-Ping-TT
[Teardown] Run Keywords Collect Logs
... AND Stop Logging Restart-OpenOlt-Ping-TT
@@ -598,6 +547,73 @@
... ${src['container_type']} ${src['container_name']}
Check Ping Result True ${ping_output}
END
+ # Verify Control Plane Functionality by Deleting and Re-adding the Subscriber
+ Verify Control Plane After Pod Restart TT
+
+Verify restart rw-core container for TT
+ [Documentation] Restart rw-core container after VOLTHA is operational.
+ ... Run the ping continuously in background during container restart,
+ ... and verify that there should be no affect on the dataplane.
+ ... Also, verify that the voltha control plane functionality is not affected.
+ [Tags] functionalTT Restart-RwCore-Ping-TT
+ [Setup] Start Logging Restart-RwCore-Ping-TT
+ [Teardown] Run Keywords Collect Logs
+ ... AND Stop Logging Restart-RwCore-Ping-TT
+ Clear All Devices Then Create New Device
+ # 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 TT
+ FOR ${I} IN RANGE 0 ${num_all_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${service_type}= Get Variable Value ${src['service_type']} "null"
+ Continue For Loop If '${service_type}' == 'mcast'
+ ${ping_output_file}= Set Variable /tmp/${src['onu']}_${service_type}_ping
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds 60s 2s
+ ... Run Ping In Background ${ping_output_file} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
+ ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
+ END
+ ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
+ Log ${podStatusOutput}
+ ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
+ ${podName} Set Variable rw-core
+ Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
+ Sleep 5s
+ Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
+ ... app ${podName} Running
+ Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName}
+ # 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
+ ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
+ Log ${podStatusOutput}
+ ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
+ Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
+ FOR ${I} IN RANGE 0 ${num_all_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${service_type}= Get Variable Value ${src['service_type']} "null"
+ Continue For Loop If '${service_type}' == 'mcast'
+ Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds 60s 2s
+ ... Stop Ping Running In Background ${src['ip']} ${src['user']} ${src['pass']}
+ ... ${src['container_type']} ${src['container_name']}
+ END
+ FOR ${I} IN RANGE 0 ${num_all_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${service_type}= Get Variable Value ${src['service_type']} "null"
+ Continue For Loop If '${service_type}' == 'mcast'
+ ${ping_output_file}= Set Variable /tmp/${src['onu']}_${service_type}_ping
+ ${ping_output}= Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds 60s 2s
+ ... Retrieve Remote File Contents ${ping_output_file} ${src['ip']} ${src['user']} ${src['pass']}
+ ... ${src['container_type']} ${src['container_name']}
+ Check Ping Result True ${ping_output}
+ END
+ # Verify Control Plane Functionality by Deleting and Re-adding the Subscriber
+ Verify Control Plane After Pod Restart TT
*** Keywords ***
Setup Suite
@@ -618,3 +634,35 @@
Delete All Devices and Verify
# Execute normal test Setup Keyword
Setup
+
+Verify Control Plane After Pod Restart TT
+ [Documentation] Verifies the control plane functionality after the voltha pod restart
+ ... by deleting and re-adding the subscriber
+ Run Keyword If ${has_dataplane} Clean Up Linux
+ FOR ${I} IN RANGE 0 ${num_all_onus}
+ ${src}= Set Variable ${hosts.src[${I}]}
+ ${dst}= Set Variable ${hosts.dst[${I}]}
+ ${service_type}= Get Variable Value ${src['service_type']} "null"
+ ${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} ${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}
+ Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast'
+ ... Wait Until Keyword Succeeds ${timeout} 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']}
+ # Add Subscriber Access
+ 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}
+ 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
+ Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds ${timeout} 2s Sanity Test TT one ONU ${src}
+ ... ${dst} ${suppressaddsubscriber}
+ ... ELSE IF ${has_dataplane} and '${service_type}' == 'mcast' Run Keyword And Continue On Failure
+ ... Wait Until Keyword Succeeds ${timeout} 2s Sanity Test TT MCAST one ONU ${src}
+ ... ${dst} ${suppressaddsubscriber}
+ END