Simplifying check on IGMP groups
Change-Id: Ie4ac3472a7286d267a291b23bcb3048445650b5d
diff --git a/libraries/onos.robot b/libraries/onos.robot
index 3225d5f..4a0413e 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -432,28 +432,9 @@
[Documentation] Verifies there exists a group bucket list with certain entries/count
... Note: Currently, this validates only if all ONUs of an OLT joined the same igmp group
[Arguments] ${onos_ssh_connection} ${count} ${deviceId}
- ${result}= Execute ONOS CLI Command on open connection ${onos_ssh_connection} groups -j
- Log Groups: ${result}
- ${groups}= To Json ${result}
- ${length}= Get Length ${groups}
- ${buckets}= Create List
- ${matched}= Set Variable False
- FOR ${INDEX} IN RANGE 0 ${length}
- ${value}= Get From List ${groups} ${INDEX}
- ${devId}= Get From Dictionary ${value} deviceId
- ${bucket}= Get From Dictionary ${value} buckets
- Run Keyword If '${devId}'=='${deviceId}'
- ... Append To List ${buckets} ${bucket}
- END
- ${bucket_len}= Get Length ${buckets}
- ${bucket_vals_len}= Evaluate 0
- FOR ${INDEX_1} IN RANGE 0 ${bucket_len}
- ${value}= Get From List ${buckets} ${INDEX_1}
- ${bucket_vals_len}= Get Length ${value}
- ${matched}= Set Variable If ${bucket_vals_len}==${count} True False
- Exit For Loop If ${matched}
- END
- Should Be True ${matched} Bucket list count for a group: Found:${bucket_vals_len} Expected:${count}
+ ${result}= Execute ONOS CLI Command on open connection ${onos_ssh_connection}
+ ... groups added ${deviceId} | grep bucket | wc -l
+ Should Be Equal As Integers ${result} ${count} Bucket list count for a group: Found=${result} Expected=${count}
Verify ONU in Group Bucket
[Documentation] Matches if ONU port in Group Bucket
diff --git a/tests/scale/Voltha_Scale_Tests.robot b/tests/scale/Voltha_Scale_Tests.robot
index e903ca9..04163a3 100644
--- a/tests/scale/Voltha_Scale_Tests.robot
+++ b/tests/scale/Voltha_Scale_Tests.robot
@@ -219,17 +219,6 @@
... Verify ONUs in Group Count in ONOS ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId}
END
-#Verify Igmp Join
-# [Documentation] Verifies Igmp Groups in ONOS
-# [Tags] non-critical igmp igmp-join igmp-verify igmp-join-verify
-# ${onos_devices}= Compute Device IDs
-# FOR ${INDEX} IN RANGE 0 ${olt}
-# ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX}
-# ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel}
-# ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod}
-# Verify Igmp Groups in ONOS ${onos_devices}[${INDEX}] ${onu_list}
-# END
-
Perform Igmp Leave
[Documentation] Performs Igmp Leave for all the ONUs of all the OLTs (based on Rest Endpoint)
[Tags] non-critical igmp igmp-leave
@@ -253,17 +242,6 @@
... Verify Empty Group in ONOS ${onos_ssh_connection} ${deviceId}
END
-#Verify Igmp Leave
-# [Documentation] Verifies Igmp Groups in ONOS
-# [Tags] non-critical igmp igmp-leave igmp-verify igmp-leave-verify
-# ${onos_devices}= Compute Device IDs
-# FOR ${INDEX} IN RANGE 0 ${olt}
-# ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX}
-# ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel}
-# ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod}
-# Verify Igmp Groups in ONOS ${onos_devices}[${INDEX}] ${onu_list} False
-# END
-
Disable and Delete devices
[Documentation] Disable and delete the OLTs in VOLTHA
[Tags] non-critical teardown
@@ -320,12 +298,3 @@
JoinOrLeave Igmp Rest Based ${bbsim_rel_session} ${onu} ${task} 224.0.0.22
END
-Verify Igmp Groups in ONOS
- [Documentation] Verifies Igmp Groups in ONOS for all ONUs of an OLT
- [Arguments] ${devId} ${onu_list} ${group_exist}=True
- FOR ${onu} IN @{onu_list}
- ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Get ONU Port in ONOS ${onu} ${devId}
- Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
- ... Verify ONU in Groups ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${devId} ${onu_port} ${group_exist}
- END