[VOL-4174] Updated Validate Device keyword to use filter

Change-Id: I0b4239e81780d299027302f5684c205007663ca2
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 92ad026..910ff28 100755
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -262,7 +262,7 @@
         ...    ${of_id}
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    360s    5s    Validate Device        ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed
+        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed    by_dev_id=True
     END
     # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1
     Scale K8s Deployment by Pod Label    ${NAMESPACE}    app    ${OLT_ADAPTER_APP_LABEL}    0
@@ -394,7 +394,7 @@
         ...    ${of_id}
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    360s    5s    Validate Device    ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=initial-mib-downloaded
+        ...    ${onu_device_id}    onu=True    onu_reason=initial-mib-downloaded    by_dev_id=True
     END
 
     # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index db84926..ff9d47e 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -104,7 +104,7 @@
         ${bbsim_olt_device_id}=    Create Device    ${ip}    ${bbsim_port}
         Log    ${bbsim_olt_device_id}
         Wait Until Keyword Succeeds    ${timeout}    5s
-        ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${bbsim_olt_device_id}
+        ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${bbsim_olt_device_id}    by_dev_id=True
         Enable Device    ${bbsim_olt_device_id}
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
         ...    Validate OLT Device    ENABLED    ACTIVE    REACHABLE    ${serial_number}
diff --git a/tests/functional/Voltha_ErrorScenarios.robot b/tests/functional/Voltha_ErrorScenarios.robot
index 8637d2d..ec1a9a0 100644
--- a/tests/functional/Voltha_ErrorScenarios.robot
+++ b/tests/functional/Voltha_ErrorScenarios.robot
@@ -82,7 +82,7 @@
         ...    ELSE    Create Device    ${olt_ip}    ${olt_port}    ${list_olts}[${I}][type]
         Set Suite Variable    ${olt_device_id}
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN
-        ...    ${olt_device_id}
+        ...    ${olt_device_id}    by_dev_id=True
         ${rc}    ${output}=    Run and Return Rc and Output
         ...    voltctl -c ${VOLTCTL_CONFIG} device create -t openolt -H ${olt_ip}:${olt_port}
         Should Not Be Equal As Integers    ${rc}    0
@@ -202,7 +202,7 @@
         Set Suite Variable    ${olt_device_id}
         #validate olt states
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    PREPROVISIONED    UNKNOWN
-        ...    UNKNOWN    ${olt_device_id}
+        ...    UNKNOWN    ${olt_device_id}    by_dev_id=True
         #Try disabling pre-provisioned OLT
         ${rc}    ${output}=    Run and Return Rc and Output
         ...    voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id}
@@ -250,7 +250,7 @@
         Set Suite Variable    ${olt_device_id}
         #validate olt states
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    PREPROVISIONED    UNKNOWN
-        ...    UNKNOWN    ${olt_device_id}
+        ...    UNKNOWN    ${olt_device_id}    by_dev_id=True
         #Enable the created OLT device
         Enable Device    ${olt_device_id}
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    ENABLED    ACTIVE
@@ -300,7 +300,7 @@
         ...    ELSE    Create Device    ${olt_ip}    ${olt_port}    ${list_olts}[${I}][type]
         Set Suite Variable    ${olt_device_id}
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    PREPROVISIONED    UNKNOWN
-        ...    UNKNOWN    ${olt_device_id}
+        ...    UNKNOWN    ${olt_device_id}    by_dev_id=True
         Enable Device    ${olt_device_id}
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    ENABLED    ACTIVE    REACHABLE
         ...    ${olt_serial_number}
diff --git a/tests/functional/Voltha_FailureScenarios.robot b/tests/functional/Voltha_FailureScenarios.robot
index 1e29331..859e1f2 100644
--- a/tests/functional/Voltha_FailureScenarios.robot
+++ b/tests/functional/Voltha_FailureScenarios.robot
@@ -284,7 +284,7 @@
 
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    360s    5s    Validate Device        ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed
+        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed    by_dev_id=True
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${ONOS_SSH_IP}
         ...    ${ONOS_SSH_PORT}    ${onu_port}
         ${wpa_log}=    Run Keyword If    ${has_dataplane}    Catenate    SEPARATOR=.
@@ -519,7 +519,7 @@
         ...    ${of_id}
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    360s    5s    Validate Device    ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed
+        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed    by_dev_id=True
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${ONOS_SSH_IP}
         ...    ${ONOS_SSH_PORT}    ${onu_port}
         ${wpa_log}=    Run Keyword If    ${has_dataplane}    Catenate    SEPARATOR=.
@@ -649,7 +649,7 @@
         ...    ${of_id}
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device        ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed
+        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed    by_dev_id=True
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${ONOS_SSH_IP}
         ...    ${ONOS_SSH_PORT}    ${onu_port}
         ${wpa_log}=    Run Keyword If    ${has_dataplane}    Catenate    SEPARATOR=.
diff --git a/tests/functional/Voltha_FailureScenarios2.robot b/tests/functional/Voltha_FailureScenarios2.robot
index ab21938..289cca7 100644
--- a/tests/functional/Voltha_FailureScenarios2.robot
+++ b/tests/functional/Voltha_FailureScenarios2.robot
@@ -108,7 +108,7 @@
         ...    ${of_id}
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device        ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed
+        ...    ${onu_device_id}    onu=True    onu_reason=omci-flows-pushed    by_dev_id=True
         Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${ONOS_SSH_IP}
         ...    ${ONOS_SSH_PORT}    ${onu_port}
         ${wpa_log}=    Run Keyword If    ${has_dataplane}    Catenate    SEPARATOR=.
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 52acdb3..23147c9 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -376,7 +376,7 @@
     ...    ELSE    Create Device    ${list_olts}[${I}][ip]    ${list_olts}[${I}][oltport]    ${list_olts}[${I}][type]
     Set Suite Variable    ${olt_device_id}
     Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    PREPROVISIONED
-    ...    UNKNOWN    UNKNOWN    ${olt_device_id}
+    ...    UNKNOWN    UNKNOWN    ${olt_device_id}    by_dev_id=True
     Enable Device    ${olt_device_id}
     Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device    ENABLED    ACTIVE    REACHABLE
     ...    ${olt_serial_number}
diff --git a/tests/functional/Voltha_ScaleFunctionalTests.robot b/tests/functional/Voltha_ScaleFunctionalTests.robot
index deb6251..f7b0cc9 100644
--- a/tests/functional/Voltha_ScaleFunctionalTests.robot
+++ b/tests/functional/Voltha_ScaleFunctionalTests.robot
@@ -50,12 +50,12 @@
     Set Global Variable    ${olt_device_id}
     #validate olt states
     Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device   PREPROVISIONED    UNKNOWN    UNKNOWN
-    ...    ${olt_device_id}
+    ...    ${olt_device_id}    by_dev_id=True
     #enable device
     Enable Device    ${olt_device_id}
     #validate olt states
     Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Device   ENABLED    ACTIVE    REACHABLE
-    ...    ${olt_device_id}
+    ...    ${olt_device_id}    by_dev_id=True
 
 ONU Discovery
     [Documentation]    Discover lists of ONUS, their Serial Numbers and device id
diff --git a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
index 8aa9ccb..8e8bf03 100755
--- a/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUReconcileTests.robot
@@ -212,7 +212,7 @@
         ${olt_serial_number}=    Set Variable    ${list_olts}[${I}][sn]
         #validate olt states
         Wait Until Keyword Succeeds    ${timeout}    5s
-        ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${olt_device_id}
+        ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${olt_device_id}    by_dev_id=True
         Sleep    5s
         ${logical_id}=    Get Logical Device ID From SN    ${olt_serial_number}
         ${olt}    Create Dictionary    device_id    ${olt_device_id}    logical_id    ${logical_id}
diff --git a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
index ff7f136..68a86ff 100755
--- a/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
+++ b/tests/openonu-go-adapter/Voltha_ONUStateTests.robot
@@ -247,7 +247,7 @@
         ${olt_serial_number}=    Set Variable    ${list_olts}[${I}][sn]
         #validate olt states
         Wait Until Keyword Succeeds    ${timeout}    5s
-        ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${olt_device_id}
+        ...    Validate OLT Device    PREPROVISIONED    UNKNOWN    UNKNOWN    ${olt_device_id}    by_dev_id=True
         Sleep    5s
         ${logical_id}=    Get Logical Device ID From SN    ${olt_serial_number}
         ${olt}    Create Dictionary    device_id    ${olt_device_id}    logical_id    ${logical_id}
diff --git a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
index 065a191..8cef76e 100755
--- a/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
+++ b/tests/tt-workflow/Voltha_TT_FailureScenarios.robot
@@ -436,7 +436,7 @@
         ...    ${of_id}
         # Bring up the device and verify it authenticates
         Wait Until Keyword Succeeds    360s    5s    Validate Device    ENABLED    ACTIVE    REACHABLE
-        ...    ${onu_device_id}    onu=True    onu_reason=initial-mib-downloaded
+        ...    ${onu_device_id}    onu=True    onu_reason=initial-mib-downloaded    by_dev_id=True
     END
 
     # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1