[VOL-3717] Allowing to pass the olt type via pod-configs yaml file
Change-Id: Ic3873d05d15b40bbbac02eb1d221644a7aaa4c56
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 36ccb6f..e54ea22 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -71,10 +71,11 @@
${pass} Evaluate ${olts}[${I}].get("pass")
${serial_number} Evaluate ${olts}[${I}].get("serial")
${olt_ssh_ip} Evaluate ${olts}[${I}].get("sship")
+ ${type} Evaluate ${olts}[${I}].get("type")
${onu_count}= Get ONU Count For OLT ${hosts.src} ${serial_number}
${onu_list}= Get ONU List For OLT ${hosts.src} ${serial_number}
${olt} Create Dictionary ip ${ip} user ${user} pass
- ... ${pass} sn ${serial_number} onucount ${onu_count}
+ ... ${pass} sn ${serial_number} onucount ${onu_count} type ${type}
... sship ${olt_ssh_ip} onus ${onu_list}
Append To List ${list_olts} ${olt}
END
@@ -89,7 +90,7 @@
Set Suite Variable ${list_olts}
${olt_count}= Get Length ${list_olts}
Set Suite Variable ${olt_count}
- @{container_list}= Create List adapter-open-olt adapter-open-onu voltha-api-server
+ @{container_list}= Create List ${OLT_ADAPTER_APP_LABEL} adapter-open-onu voltha-api-server
... voltha-ro-core voltha-rw-core-11 voltha-rw-core-12 voltha-ofagent
Set Suite Variable ${container_list}
${datetime}= Get Current Date
@@ -555,7 +556,9 @@
${olt_ids} Create List
FOR ${I} IN RANGE 0 ${num_olts}
#create/preprovision device
- ${olt_device_id}= Create Device ${list_olts}[${I}][ip] ${OLT_PORT}
+ ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}"
+ ... Create Device ${list_olts}[${I}][ip] ${OLT_PORT}
+ ... ELSE Create Device ${list_olts}[${I}][ip] ${OLT_PORT} ${list_olts}[${I}][type]
${olt_serial_number}= Set Variable ${list_olts}[${I}][sn]
#Set Suite Variable ${olt_device_id}
#validate olt states