Load the container information and pass to reset onu keywoard
- Remove the vlan inforamtion from the dp_inface_name when we reset the
ONU
- Call the reset function in VOltha_PODTests (also DT workflow)
Change-Id: I09226ab654d34a5dd441a15760203874a8e8d3fa
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 2527af0..76eaa29 100644
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -81,8 +81,6 @@
Set Suite Variable ${container_list}
${datetime}= Get Current Date
Set Suite Variable ${datetime}
- #Restore all ONUs
- RestoreONUs ${num_onus}
WPA Reassociate
[Documentation] Executes a particular wpa_cli reassociate, which performs force reassociation
@@ -546,24 +544,28 @@
[Arguments] ${num_onus}
FOR ${I} IN RANGE 0 ${num_onus}
${src}= Set Variable ${hosts.src[${I}]}
+ ${container_type}= Get Variable Value ${src['container_type']} "null"
+ ${container_name}= Get Variable Value ${src['container_name']} "null"
${onu_type}= Get Variable Value ${src['onu_type']} "null"
+ #Get ens6f0 from ens6f0.22
+ ${if_name}= Replace String Using Regexp ${src['dp_iface_name']} \\..* \
Run Keyword IF '${onu_type}' == 'alpha' AlphaONURestoreDefault ${src['ip']} ${src['user']}
- ... ${src['pass']} ${src['dp_iface_name']} admin admin
+ ... ${src['pass']} ${if_name} admin admin ${container_type} ${container_name}
END
AlphaONURestoreDefault
[Documentation] Restore the Alpha ONU to factory setting
[Arguments] ${rg_ip} ${rg_user} ${rg_pass} ${onu_ifname}
- ... ${onu_user} ${onu_pass}
+ ... ${onu_user} ${onu_pass} ${container_type}=${None} ${container_name}=${None}
${output}= Login And Run Command On Remote System sudo ifconfig ${onu_ifname} 192.168.1.3/24
- ... ${rg_ip} ${rg_user} ${rg_pass}
+ ... ${rg_ip} ${rg_user} ${rg_pass} ${container_type} ${container_name}
${cmd} Catenate
... (echo open "192.168.1.1"; sleep 1;
... echo "${onu_user}"; sleep 1;
... echo "${onu_pass}"; sleep 1;
... echo "restoredefault"; sleep 1) | telnet
${output}= Login And Run Command On Remote System ${cmd}
- ... ${rg_ip} ${rg_user} ${rg_pass}
+ ... ${rg_ip} ${rg_user} ${rg_pass} ${container_type} ${container_name}
Log To Console ${output}
${output}= Login And Run Command On Remote System sudo ifconfig ${onu_ifname} 0
- ... ${rg_ip} ${rg_user} ${rg_pass}
+ ... ${rg_ip} ${rg_user} ${rg_pass} ${container_type} ${container_name}
diff --git a/tests/dt-workflow/Voltha_DT_PODTests.robot b/tests/dt-workflow/Voltha_DT_PODTests.robot
index 2252e1e..0c33c73 100644
--- a/tests/dt-workflow/Voltha_DT_PODTests.robot
+++ b/tests/dt-workflow/Voltha_DT_PODTests.robot
@@ -474,6 +474,8 @@
Setup Suite
[Documentation] Set up the test suite
Common Test Suite Setup
+ #Restore all ONUs
+ Run Keyword If ${has_dataplane} RestoreONUs ${num_onus}
Clear All Devices Then Create New Device
[Documentation] Remove any devices from VOLTHA and ONOS
diff --git a/tests/functional/Voltha_PODTests.robot b/tests/functional/Voltha_PODTests.robot
index 22d7099..ac1a0d4 100644
--- a/tests/functional/Voltha_PODTests.robot
+++ b/tests/functional/Voltha_PODTests.robot
@@ -564,6 +564,8 @@
Setup Suite
[Documentation] Set up the test suite
Common Test Suite Setup
+ #Restore all ONUs
+ Run Keyword If ${has_dataplane} RestoreONUs ${num_onus}
Clear All Devices Then Create New Device
[Documentation] Remove any devices from VOLTHA and ONOS