improve read new peers list for DT
Change-Id: Ife257f6efc0519b9b276408c1fdad7e754f3fa2a
diff --git a/VERSION b/VERSION
old mode 100644
new mode 100755
index bcd0f91..80803fa
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.8.7
+2.8.8
diff --git a/libraries/utils.robot b/libraries/utils.robot
index afc6613..aa5f060 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -918,6 +918,7 @@
FOR ${INDEX0} IN RANGE 0 ${olt_pon_port_list_len}
${olt_pon_port}= Get From List ${olt_pon_port_list} ${INDEX0}
${olt_peer_list}= Retrieve Peer List From OLT PON Port ${olt_device_id} ${olt_pon_port}
+ ${olt_peer_list_len}= Get Length ${olt_peer_list}
# Disable the OLT PON Port and Validate OLT Device
DisableOrEnable OLT PON Port disable ${olt_device_id} ${olt_pon_port}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
@@ -933,9 +934,8 @@
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Validate OLT PON Port Status ${olt_device_id} ${olt_pon_port}
... ENABLED ACTIVE
- # Waiting extra time for the ONUs to come up
- Sleep 30s
- ${olt_peer_list_new}= Retrieve Peer List From OLT PON Port ${olt_device_id} ${olt_pon_port}
+ ${olt_peer_list_new}= Wait Until Keyword Succeeds ${timeout} 5s
+ ... Retrieve Peer List From OLT PON Port ${olt_device_id} ${olt_pon_port} ${olt_peer_list_len}
Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
... Validate ONUs for PON OLT Enable DT ${olt_serial_number} ${olt_peer_list_new}
END
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
index 452730e..e389641 100755
--- a/libraries/voltctl.robot
+++ b/libraries/voltctl.robot
@@ -531,7 +531,7 @@
[Return] ${olt_pon_list}
Retrieve Peer List From OLT PON Port
- [Arguments] ${olt_device_id} ${pon_port}
+ [Arguments] ${olt_device_id} ${pon_port} ${expected_num_peers}=0
[Documentation] Retrieves the list of peer device ids list from the OLT PON port
${rc} ${output}= Run and Return Rc and Output
... voltctl -c ${VOLTCTL_CONFIG} device port list ${olt_device_id} -o json
@@ -550,6 +550,8 @@
END
Should Be True ${matched} No PON port found for OLT ${olt_device_id}
${length}= Get Length ${peers}
+ Run Keyword If ${expected_num_peers}>0 Should Be Equal As Integers ${length} ${expected_num_peers}
+ ... Number of found peers does not match expected number ${length}:${expected_num_peers}
${olt_peer_list}= Create List
FOR ${INDEX} IN RANGE 0 ${length}
${value}= Get From List ${peers} ${INDEX}