Adding EAPOL flow validation to ATT Sanity Test
Change-Id: I6be2b837564a0a49480deeb2b3c7937802775345
diff --git a/libraries/onos.robot b/libraries/onos.robot
index d5a859c..54a631d 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -532,10 +532,12 @@
Should Be Empty ${pending_flows}
Verify Eapol Flows Added For ONU
- [Arguments] ${ip} ${port} ${onu_port}
+ [Arguments] ${ip} ${port} ${olt_of_id} ${onu_port} ${c_tag}=4091
[Documentation] Verifies if the Eapol Flows are added in ONOS for the ONU
- ${eapol_flows_added}= Execute ONOS CLI Command use single connection ${ip} ${port}
- ... flows -s -f ADDED | grep eapol | grep IN_PORT:${onu_port}
+ ${eapol_flow_cmd}= Catenate SEPARATOR=
+ ... flows -s ADDED ${olt_of_id} | grep IN_PORT:${onu_port} | grep ETH_TYPE:eapol |
+ ... grep VLAN_ID:${c_tag} | grep OUTPUT:CONTROLLER
+ ${eapol_flows_added}= Execute ONOS CLI Command use single connection ${ip} ${port} ${eapol_flow_cmd}
Should Not Be Empty ${eapol_flows_added}
Verify UNI Port Is Enabled
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 4d31cb0..1c3b9ae 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -227,10 +227,10 @@
# Check ONU port is Enabled in ONOS
Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
- # Verify EAPOL flows are added for the ONU port
+ # Verify default EAPOL flows are added for the ONU port
Run Keyword Unless ${supress_add_subscriber}
... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
+ ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
... ENABLED ACTIVE REACHABLE
@@ -254,6 +254,10 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
+ # Verify subscriber EAPOL flow is installed
+ Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
+ ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
+ ... ${onu_port} ${src['c_tag']}
# Verify Meters in ONOS
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Verify Meters in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port}
@@ -751,7 +755,7 @@
... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
# Verify EAPOL flows are added for the ONU port
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
+ ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port}
# Verify ONU state in voltha
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
... ENABLED ACTIVE REACHABLE
@@ -868,7 +872,7 @@
... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
# Verify EAPOL flows are added for the ONU port
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
+ ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port}
# Verify ONU state in voltha
... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Validate Device ENABLED ACTIVE REACHABLE