[VOL-2869] Verify Zero ONOS Flows Count on OLT Delete

Change-Id: I2aaec2c4a2c467ca8bfab3d0d3da8d7437fb2c10
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 3f25744..edc988c 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -308,10 +308,12 @@
     ...           AND             Stop Logging    DeleteOLT
     ...           AND             Announce Message    END TEST DeleteOLT
     Run Keyword If    ${has_dataplane}    Clean Up Linux
-    Run Keyword If    ${has_dataplane}    Delete Device and Verify
+    Delete Device and Verify
+    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Verify Device Flows Removed    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
     Run Keyword and Ignore Error    Collect Logs
     # Recreate the OLT
-    Run Keyword If    ${has_dataplane}    Setup
+    Setup
     Wait Until Keyword Succeeds    ${timeout}   2s    Perform Sanity Test
 
 Check Mib State on OLT recreation after ONU, OLT deletion
@@ -336,8 +338,10 @@
         Delete Device     ${onu_device_id}
     END
     #Disable and Delete the OLT
-    Run Keyword If    ${has_dataplane}    Delete Device and Verify
-    #Recreate the OLT back
+    Delete Device and Verify
+    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Verify Device Flows Removed    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
+    # Recreate the OLT
     Run Keyword If    ${has_dataplane}    Sleep    180s
     ${olt_device_id}=    Create Device    ${olt_ip}    ${OLT_PORT}
     Set Suite Variable    ${olt_device_id}
@@ -408,6 +412,8 @@
     END
     Delete Device    ${olt_device_id}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s    Test Empty Device List
+    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
+    ...    Verify Device Flows Removed    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
 
 Validate authentication on a disabled ONU
     [Documentation]    Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable