[VOL-2824] Fix for Verify Subscriber Access Flows Added For ONUs for DT workflow

Change-Id: Id0d89ae539a1050a1f37cda45999923c78d95202
diff --git a/libraries/onos.robot b/libraries/onos.robot
index dc30c9a..d03e27b 100644
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -104,36 +104,36 @@
     [Return]    ${of_id}
 
 Verify Subscriber Access Flows Added for ONU DT
-    [Arguments]    ${ip}    ${port}    ${onu_port}    ${nni_port}    ${s_tag}
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${nni_port}    ${s_tag}
     [Documentation]    Verifies if the Subscriber Access Flows are added in ONOS for the ONU
     # Verify upstream table=0 flow
     ${upstream_flow_0_added}=    Execute ONOS CLI Command    ${ip}    ${port}
-    ...    flows -s -f ADDED | grep IN_PORT:${onu_port} | grep VLAN_VID:Any | grep transition=TABLE:1
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:Any | grep transition=TABLE:1
     Should Not Be Empty    ${upstream_flow_0_added}
     # Verify upstream table=1 flow
     ${flow_vlan_push_cmd}=    Catenate    SEPARATOR=
-    ...    flows -s -f ADDED | grep IN_PORT:${onu_port} | grep VLAN_VID:Any |
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep VLAN_VID:Any |
     ...     grep VLAN_PUSH | grep VLAN_ID:${s_tag} | grep OUTPUT:${nni_port}
     ${upstream_flow_1_added}=    Execute ONOS CLI Command    ${ip}    ${port}
     ...    ${flow_vlan_push_cmd}
     Should Not Be Empty    ${upstream_flow_1_added}
     # Verify downstream table=0 flow
     ${flow_vlan_pop_cmd}=    Catenate    SEPARATOR=
-    ...    flows -s -f ADDED | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:${s_tag} |
     ...     grep VLAN_POP | grep transition=TABLE:1
     ${downstream_flow_0_added}=    Execute ONOS CLI Command    ${ip}    ${port}
     ...    ${flow_vlan_pop_cmd}
     Should Not Be Empty    ${downstream_flow_0_added}
     # Verify downstream table=1 flow
     ${downstream_flow_1_added}=    Execute ONOS CLI Command    ${ip}    ${port}
-    ...    flows -s -f ADDED | grep IN_PORT:${nni_port} | grep VLAN_VID:Any | grep OUTPUT:${onu_port}
+    ...    flows -s ADDED ${olt_of_id} | grep IN_PORT:${nni_port} | grep VLAN_VID:Any | grep OUTPUT:${onu_port}
     Should Not Be Empty    ${downstream_flow_1_added}
 
 Verify Subscriber Access Flows Added Count DT
-    [Arguments]    ${ip}    ${port}    ${expected_flows}
+    [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${expected_flows}
     [Documentation]    Matches for total number of subscriber access flows added for all onus
     ${access_flows_added}=    Execute ONOS CLI Command    ${ip}    ${port}
-    ...    flows -s -f ADDED | grep -v deviceId | grep -v ETH_TYPE:lldp | wc -l
+    ...    flows -s ADDED ${olt_of_id} | grep -v deviceId | grep -v ETH_TYPE:lldp | wc -l
     Should Be Equal As Integers    ${access_flows_added}    ${expected_flows}
 
 Verify Eapol Flows Added
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 4b98f51..006cf0e 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -217,8 +217,8 @@
         ...    volt-add-subscriber-access ${of_id} ${onu_port}
         # Verify subscriber access flows are added for the ONU port
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
-        ...    Verify Subscriber Access Flows Added For ONU DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${onu_port}
-        ...    ${nni_port}    ${src['s_tag']}
+        ...    Verify Subscriber Access Flows Added For ONU DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
+        ...    ${onu_port}    ${nni_port}    ${src['s_tag']}
         # Verify ONU state in voltha
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s    Validate Device
         ...    ENABLED    ACTIVE    REACHABLE
@@ -236,7 +236,8 @@
     # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
     ${onos_flows_count}=    Evaluate    4 * ${num_onus}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
-    ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${onos_flows_count}
+    ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
+    ...    ${onos_flows_count}
     # Verify VOLTHA Flows
     # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
     ${olt_flows}=    Evaluate    2 * ${num_onus} + 1
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 54d4631..431a1f7 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -102,7 +102,7 @@
         ${onos_flows_count}=    Evaluate    4 * ( ${num_onus} - 1 )
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
         ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
-        ...    ${onos_flows_count}
+        ...    ${of_id}    ${onos_flows_count}
         # Verify VOLTHA flows for OLT equals twice the number of ONUS (minus ONU under test) + 1 for LLDP
         ${olt_flows}=    Evaluate    2 * ( ${num_onus} - 1 ) + 1
         Run Keyword    Wait Until Keyword Succeeds    ${timeout}    5s    Validate OLT Flows    ${olt_flows}
@@ -125,8 +125,8 @@
         Sleep    10s
         # Verify subscriber access flows are added for the ONU port
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
-        ...    Verify Subscriber Access Flows Added For ONU DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${onu_port}
-        ...    ${nni_port}    ${src['s_tag']}
+        ...    Verify Subscriber Access Flows Added For ONU DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${of_id}
+        ...    ${onu_port}    ${nni_port}    ${src['s_tag']}
         Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
         ...    Validate Device    ENABLED    ACTIVE
         ...    REACHABLE    ${src['onu']}    onu=True    onu_reason=omci-flows-pushed
@@ -142,7 +142,8 @@
     # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
     ${onos_flows_count}=    Evaluate    4 * ${num_onus}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
-    ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${onos_flows_count}
+    ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
+    ...    ${of_id}    ${onos_flows_count}
     # Verify VOLTHA Flows
     # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
     ${olt_flows}=    Evaluate    2 * ${num_onus} + 1
@@ -222,7 +223,8 @@
     # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
     ${onos_flows_count}=    Evaluate    4 * ${num_onus}
     Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    ${timeout}    5s
-    ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}    ${onos_flows_count}
+    ...    Verify Subscriber Access Flows Added Count DT    ${ONOS_SSH_IP}    ${ONOS_SSH_PORT}
+    ...    ${of_id}    ${onos_flows_count}
     # Verify VOLTHA Flows
     # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
     ${olt_flows}=    Evaluate    2 * ${num_onus} + 1