[VOL-2113] fix to sanity test

Change-Id: Idfeb7f9f1b40f8a604f89a08002a2e853569c6e1
diff --git a/libraries/onos.robot b/libraries/onos.robot
index 6f06062..9e3ba18 100644
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -93,6 +93,12 @@
     ${eapol_flows_added}=    Execute ONOS CLI Command    ${ip}    ${port}    flows -s -f ADDED | grep eapol | grep IN_PORT | wc -l
     Should Contain    ${eapol_flows_added}    ${expected_flows}
 
+Verify Eapol Flows Added For ONU
+    [Arguments]    ${ip}    ${port}    ${onu_port}
+    [Documentation]    Verifies if the Eapol Flows are added in ONOS for the ONU
+    ${eapol_flows_added}=    Execute ONOS CLI Command    ${ip}    ${port}    flows -s -f ADDED | grep eapol | grep IN_PORT:${onu_port}
+    Should Not Be Empty    ${eapol_flows_added}
+
 Verify Number of AAA-Users
     [Arguments]    ${ip}    ${port}    ${expected_onus}
     [Documentation]    Matches for number of aaa-users authorized based on number of onus
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index e871079..1c6816d 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -57,14 +57,12 @@
     #[Setup]    Clean Up Linux
     ${of_id}=    Wait Until Keyword Succeeds    ${timeout}    15s    Validate OLT Device in ONOS    ${olt_serial_number}
     Set Global Variable    ${of_id}
-    ${num_flows}=    Evaluate    ${num_onus} * ${ports_per_onu}
-    ${flows_str}=    Convert To String    ${num_flows}
-    Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${flows_str}
+    ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${onu_serial_number}   ${of_id}
+    Wait Until Keyword Succeeds    ${timeout}    2s    Verify Eapol Flows Added For ONU    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${onu_port}
     Run Keyword If    ${has_dataplane}    Validate Authentication    True    ${src0['dp_iface_name']}
     ...    wpa_supplicant.conf    ${src0['ip']}    ${src0['user']}    ${src0['pass']}
     ...    ${src0['container_type']}    ${src0['container_name']}
     Wait Until Keyword Succeeds    ${timeout}    2s    Verify Number of AAA-Users    ${k8s_node_ip}    ${ONOS_SSH_PORT}    ${num_onus}
-    ${onu_port}=    Wait Until Keyword Succeeds    ${timeout}    2s    Get ONU Port in ONOS    ${onu_serial_number}   ${of_id}
     Wait Until Keyword Succeeds    ${timeout}    2s    Execute ONOS CLI Command    ${k8s_node_ip}    ${ONOS_SSH_PORT}
     ...    volt-add-subscriber-access ${of_id} ${onu_port}
     Run Keyword If    ${has_dataplane}    Validate DHCP and Ping    True    True    ${src0['dp_iface_name']}