[VOL-3400] Add OLT Soft reboot test to nightly jobs

Change-Id: I7aae0faf0ee24c4fc2b1a08e63eff6bbd2f2ece0
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index 7966f62..4e3d545 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -543,6 +543,41 @@
         ...    Validate Subscriber DHCP Allocation    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${onu_port}
     END
 
+Verify OLT Soft Reboot
+    [Documentation]    Test soft reboot of the OLT using voltctl command
+    [Tags]    VOL-2745   OLTSoftReboot    functional
+    [Setup]    Start Logging    OLTSoftReboot
+    [Teardown]    Run Keywords    Collect Logs
+    ...           AND             Stop Logging    OLTSoftReboot
+    Delete All Devices and Verify
+    Setup
+    ## Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
+    Run Keyword If    ${has_dataplane}    Clean Up Linux
+    Wait Until Keyword Succeeds    ${timeout}    2s    Perform Sanity Test
+    # 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_ssh_ip}
+    # Waiting extra time for the ONUs to come up
+    # Check OLT states
+    Wait Until Keyword Succeeds    360s    5s    Validate OLT Device    ENABLED    ACTIVE    REACHABLE
+    ...    ${olt_serial_number}
+    Run Keyword And Ignore Error    Collect Logs
+    #Check after reboot that ONUs are active, authenticated/DHCP/pingable
+    Run Keyword If    ${has_dataplane}    Clean Up Linux
+    Wait Until Keyword Succeeds    ${timeout}    2s    Perform Sanity Test
+
 Verify ONU Soft Reboot
     [Documentation]    Test soft reboot of the ONU using voltctl command
     [Tags]    VOL-1957    ONUSoftReboot   notready