Extension of Workaround for issue described in VOL-4489 to all the jobs.

Change-Id: I35f9d2f97c7c8fa2f1313ead4965cf61331120b4
diff --git a/libraries/utils.robot b/libraries/utils.robot
index c7f673d..3829fe0 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -1552,7 +1552,6 @@
     Log    ${result}
     Should Be Empty    ${result}    Stale Resource Manager Data in Etcd!
 
-
 Clean Up All Nodes
     [Documentation]    Login to each node and kill all stale lxc prcoesses
     ${num_nodes}=    Get Length    ${nodes}
@@ -1563,3 +1562,18 @@
         Run Keyword And Continue On Failure    Start Remote Command    kill -9 `pidof lxc`
         ...    ${node_ip}    ${node_user}    ${node_pass}
     END
+
+Reboot XGSPON ONU
+    [Documentation]   Reboots the XGSPON ONU and verifies the ONU state after the reboot
+    [Arguments]    ${olt_sn}    ${onu_sn}    ${reason}
+    FOR    ${I}    IN RANGE    0    ${num_olts}
+        ${serial_number}    Evaluate    ${olts}[${I}].get("serial")
+        Continue For Loop If    "${serial_number}"!="${olt_sn}"
+        ${board_tech}    Evaluate    ${olts}[${I}].get("board_technology")
+        ${onu_device_id}=    Get Device ID From SN    ${onu_sn}
+        Run Keyword If    "${board_tech}"=="XGS-PON"    Run Keywords
+        ...    Reboot Device    ${onu_device_id}
+        ...    AND    Wait Until Keyword Succeeds    120s    5s
+        ...    Validate Device    ENABLED    ACTIVE
+        ...    REACHABLE    ${onu_sn}    onu=True    onu_reason=${reason}
+    END
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 01df4ed..b1ae69f 100755
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -841,17 +841,3 @@
     # Execute normal test Setup Keyword
     Setup
 
-Reboot XGSPON ONU
-    [Documentation]   Reboots the XGSPON ONU and verifies the ONU state after the reboot
-    [Arguments]    ${olt_sn}    ${onu_sn}    ${reason}
-    FOR    ${I}    IN RANGE    0    ${num_olts}
-        ${serial_number}    Evaluate    ${olts}[${I}].get("serial")
-        Continue For Loop If    "${serial_number}"!="${olt_sn}"
-        ${board_tech}    Evaluate    ${olts}[${I}].get("board_technology")
-        ${onu_device_id}=    Get Device ID From SN    ${onu_sn}
-        Run Keyword If    "${board_tech}"=="XGS-PON"    Run Keywords
-        ...    Reboot Device    ${onu_device_id}
-        ...    AND    Wait Until Keyword Succeeds    120s    5s
-        ...    Validate Device    ENABLED    ACTIVE
-        ...    REACHABLE    ${onu_sn}    onu=True    onu_reason=${reason}
-    END
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index ee306e5..14b5a54 100755
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -121,6 +121,12 @@
         ...    Check Ping    False    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
         ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         Enable Device    ${onu_device_id}
+        Wait Until Keyword Succeeds    ${timeout}    5s
+        ...    Validate Device    ENABLED    ACTIVE
+        ...    REACHABLE    ${src['onu']}    onu=True    onu_reason=omci-flows-pushed
+        # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed.
+        Run Keyword If    ${has_dataplane}    Reboot XGSPON ONU    ${src['olt']}    ${src['onu']}    omci-flows-pushed
+        # Workaround ends here for issue seen in VOL-4489.
         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 subscriber access flows are added for the ONU port
@@ -258,6 +264,9 @@
         Enable Device    ${onu_device_id}
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${ONOS_SSH_IP}
         ...    ${ONOS_SSH_PORT}    ${of_id}    ${onu_port}
+        # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed.
+        Run Keyword If    ${has_dataplane}    Reboot XGSPON ONU    ${src['olt']}    ${src['onu']}    omci-flows-pushed
+        # Workaround ends here for issue seen in VOL-4489.
         Run Keyword If    ${has_dataplane}    Run Keyword And Continue On Failure
         ...    Validate Authentication After Reassociate    True
         ...    ${src['dp_iface_name']}    ${src['ip']}    ${src['user']}    ${src['pass']}
diff --git a/tests/tt-workflow/Voltha_TT_PODTests.robot b/tests/tt-workflow/Voltha_TT_PODTests.robot
index 977e06c..41a306c 100755
--- a/tests/tt-workflow/Voltha_TT_PODTests.robot
+++ b/tests/tt-workflow/Voltha_TT_PODTests.robot
@@ -244,6 +244,11 @@
         ...    ${src['ip']}    ${src['user']}    ${src['pass']}    ${src['container_type']}    ${src['container_name']}
         Sleep    5s
         Enable Device    ${onu_device_id}
+        Wait Until Keyword Succeeds   ${timeout}    2s
+        ...    Verify UNI Port Is Enabled   ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${src['onu']}
+        # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed.
+        Run Keyword If    ${has_dataplane}    Reboot XGSPON ONU    ${src['olt']}    ${src['onu']}    omci-flows-pushed
+        # Workaround ends here for issue seen in VOL-4489.
         Run Keyword If    ${has_dataplane} and '${service_type}' == 'mcast'    Clean Up Linux
         Wait Until Keyword Succeeds   ${timeout}    2s
         ...    Verify UNI Port Is Enabled   ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${src['onu']}    ${src['uni_id']}