[VOL-4521] - Make disble/enable ONU and PON port tests non-critical

Change-Id: I832d98151ac675a490dd823f48f19aef19982376
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 3829fe0..cfd4235 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -1577,3 +1577,12 @@
         ...    Validate Device    ENABLED    ACTIVE
         ...    REACHABLE    ${onu_sn}    onu=True    onu_reason=${reason}
     END
+
+Set Non-Critical Tag for XGSPON Tech
+    [Documentation]    Dynamically sets the test tag for xgs-pon based to non-critical
+    FOR    ${I}    IN RANGE    0    ${num_olts}
+        ${board_tech}    Evaluate    ${olts}[${I}].get("board_technology")
+        Run Keyword If    "${board_tech}"=="XGS-PON"    Run Keywords
+        ...    Set Tags    non-critical
+        ...    AND    Exit For Loop
+    END
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 6c34f6e..08588db 100755
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -789,6 +789,9 @@
         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 If    ${has_dataplane}    Run Keyword And Continue On Failure
         ...    Wait Until Keyword Succeeds    ${timeout}    2s
         ...    Check Ping    True    ${dst['dp_iface_ip_qinq']}    ${src['dp_iface_name']}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index fc52253..af6d6b8 100755
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -218,7 +218,8 @@
     ...    Perform disable on the ONUs and validate that the pings do not succeed
     ...    Perform enable on the ONUs and validate that the pings are successful
     [Tags]    functionalDt    DisableEnableONUDt    soak
-    [Setup]    Start Logging    DisableEnableONUDt
+    [Setup]    Run Keywords    Start Logging    DisableEnableONUDt
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...           AND             Stop Logging    DisableEnableONUDt
     FOR    ${I}    IN RANGE    0    ${num_all_onus}
@@ -391,7 +392,8 @@
     ...    Devices will be removed during the execution of this TC
     ...    so calling setup at the end to add the devices back to avoid the confusion.
     [Tags]    functionalDt    DisableDeleteONUOLTDt
-    [Setup]    Start Logging    DisableDeleteONUOLTDt
+    [Setup]    Run Keywords    Start Logging    DisableDeleteONUOLTDt
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...           AND             Stop Logging    DisableDeleteONUOLTDt
     @{onu_reason}=    Create List    initial-mib-downloaded    omci-flows-pushed
@@ -641,7 +643,8 @@
     ...    Perform disable on the OLT PON Port and validate that the pings do not succeed
     ...    Perform enable on the OLT PON Port and validate that the pings are successful
     [Tags]    functionalDt    DisableEnableOltPonPortDt    VOL-2577    soak
-    [Setup]    Start Logging    DisableEnableOltPonPortDt
+    [Setup]    Run Keywords    Start Logging    DisableEnableOltPonPortDt
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...           AND             Stop Logging    DisableEnableOltPonPortDt
     FOR   ${I}    IN RANGE    0    ${olt_count}
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 14b5a54..f87df61 100755
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -103,7 +103,8 @@
     ...    Perform disable on the ONUs and validate that the pings do not succeed
     ...    Perform enable on the ONUs and validate that the pings are successful
     [Tags]    functional    DisableEnableONU    released    multi-uni
-    [Setup]    Start Logging    DisableEnableONU
+    [Setup]    Run Keywords    Start Logging    DisableEnableONU
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     [Teardown]    Run Keywords    Collect Logs
     ...           AND             Stop Logging    DisableEnableONU
     FOR    ${I}    IN RANGE    0    ${num_all_onus}
@@ -239,7 +240,8 @@
     ...    validate that the pings are successful
     ...    VOL-2284
     [Tags]    functional    ATT_DisableEnableONU    released    multi-uni
-    [Setup]    Start Logging    ATT_DisableEnableONU
+    [Setup]    Run Keywords    Start Logging    ATT_DisableEnableONU
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     [Teardown]    Run Keywords    Collect Logs
     ...           AND             Stop Logging    ATT_DisableEnableONU
     FOR    ${I}    IN RANGE    0    ${num_all_onus}
@@ -690,6 +692,7 @@
     ...    Perform enable on the OLT PON Port and validate that the pings are successful
     [Tags]    functional    DisableEnableOltPonPort    VOL-2577    multi-uni
     [Setup]    Run Keywords    Start Logging    DisableEnableOltPonPort
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     ...        AND    Setup
     [Teardown]    Run Keywords    Collect Logs
     ...           AND             Delete All Devices and Verify
diff --git a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
index 2874a82..11c597a 100755
--- a/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
+++ b/tests/tt-workflow/Voltha_TT_MultiTcontTests.robot
@@ -193,7 +193,7 @@
     ...    is received at the BNG.
     ...    Then pump ONU2 and ONU3 HSIA combined. ONUs must be share rest of bw in PON Port. (Expect fixed tcont1)
     ...    Note: Currently, only Flex Pod supports the deployment configuration required to test this scenario.
-    [Tags]    functionalTT    VOL-4094
+    [Tags]    functionalTT    VOL-4094    non-critical
     [Setup]    Run Keyword    Start Logging    TcontType1Type4Onu1Onu2Onu3
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...           AND             Stop Logging    TcontType1Type4Onu1Onu2Onu3
@@ -308,7 +308,7 @@
     ...    Firstly, pump 500Mbps from the RG of ONU1 for the VoD service and
     ...    then verify that close to 500Mbps is received at the BNG.
     ...    Also verify that the VoD rate is now truncated to 500Mbps at BNG for ONU2.
-    [Tags]    functionalTT    VOL-4096
+    [Tags]    functionalTT    VOL-4096    non-critical
     [Setup]    Run Keyword    Start Logging    TcontType2Onu1Type3Onu2
     [Teardown]    Run Keywords    Run Keyword If    ${logging}    Collect Logs
     ...           AND             Stop Logging    TcontType2Onu1Type3Onu2
diff --git a/tests/tt-workflow/Voltha_TT_PODTests.robot b/tests/tt-workflow/Voltha_TT_PODTests.robot
index 70f1ed7..2381375 100755
--- a/tests/tt-workflow/Voltha_TT_PODTests.robot
+++ b/tests/tt-workflow/Voltha_TT_PODTests.robot
@@ -221,7 +221,8 @@
     ...    Perform disable on the ONUs and validate that the pings do not succeed
     ...    Perform enable on the ONUs and validate that the pings are successful
     [Tags]    functionalTT    DisableEnableONUTT
-    [Setup]    Start Logging    DisableEnableONUTT
+    [Setup]    Run Keywords    Start Logging    DisableEnableONUTT
+    ...        AND    Run Keyword If    ${has_dataplane}    Set Non-Critical Tag for XGSPON Tech
     [Teardown]    Run Keywords    Collect Logs
     ...           AND             Stop Logging    DisableEnableONUTT
     FOR    ${I}    IN RANGE    0    ${num_all_onus}