[VOL-2818][VOL-2745]:OLT soft reboot for DT and ATT

Change-Id: I07230cd208a92aec27737e0c98e34a969ebc098d
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 9b9223f..1ebfb40 100644
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -367,6 +367,43 @@
         ...    ${dst['container_name']}
     END
 
+Verify OLT Soft Reboot for DT
+    [Documentation]    Test soft reboot of the OLT using voltctl command
+    [Tags]    VOL-2818   OLTSoftRebootDt    notready
+    [Setup]    Start Logging    OLTSoftRebootDt
+    #...        AND             Setup
+    [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
+    #Verify that ping fails
+    FOR    ${I}    IN RANGE    0    ${num_onus}
+        ${src}=    Set Variable    ${hosts.src[${I}]}
+        ${dst}=    Set Variable    ${hosts.dst[${I}]}
+        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']}
+    END
+    # Wait for the OLT to come back up
+    Run Keyword If    ${has_dataplane}    Wait Until Keyword Succeeds    120s    10s
+    ...    Check Remote System Reachability    True    ${olt_ip}
+    # Waiting extra time for the ONUs to come up
+    Sleep    60s
+    # Check OLT states
+    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    ENABLED    ACTIVE    REACHABLE
+    ...    ${olt_serial_number}
+    Run Keyword And Ignore Error    Collect Logs
+    #Check after reboot that ONUs are active, DHCP and pingable
+    Run Keyword If    ${has_dataplane}    Clean Up Linux
+    Wait Until Keyword Succeeds    ${timeout}    2s    Perform Sanity Test DT
+
+
 *** Keywords ***
 Setup Suite
     [Documentation]    Set up the test suite