Building ONU list per OLT
Change-Id: I9b56b5d7df2601fabe90652f6b15c7bf789334a2
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 892d457..2cfe4ea 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -351,7 +351,7 @@
#Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
#${List_ONU_Serial} Create List
#Set Suite Variable ${List_ONU_Serial}
- #Build ONU SN List ${List_ONU_Serial}
+ #Build ONU SN List ${List_ONU_Serial} ${olt_serial_number}
#Log ${List_ONU_Serial}
#Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
#... ${List_ONU_Serial} ${onu_flows}
@@ -380,7 +380,7 @@
... ${olt_device_id}
${List_ONU_Serial} Create List
Set Suite Variable ${List_ONU_Serial}
- Build ONU SN List ${List_ONU_Serial}
+ Build ONU SN List ${List_ONU_Serial} ${olt_serial_number}
Log ${List_ONU_Serial}
Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
... ${List_ONU_Serial} ${onu_flows}
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
index c7819e1..59b85f9 100755
--- a/libraries/voltctl.robot
+++ b/libraries/voltctl.robot
@@ -674,10 +674,11 @@
[Return] ${id}
Build ONU SN List
- [Arguments] ${serial_numbers} ${num_onus}=${num_all_onus}
- [Documentation] Appends all ONU SNs to the ${serial_numbers} list
+ [Arguments] ${serial_numbers} ${olt_serial_number}=${EMPTY} ${num_onus}=${num_all_onus}
+ [Documentation] Appends all ONU SNs for the given OLT to the ${serial_numbers} list
FOR ${INDEX} IN RANGE 0 ${num_onus}
- Append To List ${serial_numbers} ${hosts.src[${INDEX}].onu}
+ Run Keyword IF "${olt_serial_number}"=="${hosts.src[${INDEX}].olt}" or "${olt_serial_number}"=="${EMPTY}"
+ ... Append To List ${serial_numbers} ${hosts.src[${INDEX}].onu}
END
Get SN From Device ID
diff --git a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
index 7ad96f3..7b91460 100644
--- a/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
+++ b/tests/dt-workflow/Voltha_DT_FailureScenarios.robot
@@ -135,7 +135,7 @@
#Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
#${List_ONU_Serial} Create List
#Set Suite Variable ${List_ONU_Serial}
- #Build ONU SN List ${List_ONU_Serial}
+ #Build ONU SN List ${List_ONU_Serial} ${olt_serial_number}
#Log ${List_ONU_Serial}
#Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
#... ${List_ONU_Serial} ${onu_flows}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index ce8409a..36ff38b 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -268,7 +268,7 @@
... ${olt_device_id}
${List_ONU_Serial} Create List
Set Suite Variable ${List_ONU_Serial}
- Build ONU SN List ${List_ONU_Serial} ${num_onus}
+ Build ONU SN List ${List_ONU_Serial} ${num_onus} ${olt_serial_number}
Log ${List_ONU_Serial}
Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
... ${List_ONU_Serial} ${onu_flows}