[VOL-2409]Restart ofagent

Change-Id: I9e75770b9d1836d273c24a5197453719f9a02102
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index 3d173cd..ab1a238 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -53,6 +53,28 @@
 ${scripts}        ../../scripts
 
 *** Test Cases ***
+Verify restart ofagent container after VOLTHA is operational
+    [Documentation]    Restart ofagent container after VOLTHA is operational.
+    ...    Please note this test case should be run before the restart of other containers.
+    ...    Prerequisite : ONUs are authenticated and pingable.
+    [Tags]    functional   VOL-2409   RestartPods   notready
+    [Setup]    NONE
+    [Teardown]    NONE
+    ${waitforRestart}    Set Variable    120s
+    ${podStatusOutput}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE}
+    Log    ${podStatusOutput}
+    ${countBforRestart}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
+    Restart Pod    ${NAMESPACE}    ofagent
+    Sleep    60s
+    Wait Until Keyword Succeeds    ${waitforRestart}    2s    Validate Pod Status    ofagent    ${NAMESPACE}
+    ...    Running
+    Repeat Sanity Test
+    ${podStatusOutput}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE}
+    Log    ${podStatusOutput}
+    ${countAfterRestart}=    Run    ${KUBECTL_CONFIG};kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
+    Should Be Equal As Strings    ${countAfterRestart}    ${countBforRestart}
+    Run Keyword and Ignore Error   Collect Logs
+
 Verify restart any container after VOLTHA is operational
     [Documentation]    Restart any container after VOLTHA is operational.
     ...    Prerequisite : ONUs are authenticated and pingable.
@@ -73,3 +95,4 @@
     ${countAfterRestart}=    Run    ${KUBECTL_CONFIG};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
+