-Set Connection ids and Bridge
- [Documentation] Sets the connection ids for all the nodes and get the bridge from configuration file .
- ${conn_id_1} = SSHLibrary.Open Connection ${K8s_MASTER_IP}
- SSHKeywords.Flexible_SSH_Login ${DEFAULT_USER} ${DEFAULT_PASSWORD}
- BuiltIn.Set Global Variable ${conn_id_1}
- ${conn_id_2} = SSHLibrary.Open Connection ${K8s_MINION1_IP}
- SSHKeywords.Flexible_SSH_Login ${DEFAULT_USER} ${DEFAULT_PASSWORD}
- BuiltIn.Set Global Variable ${conn_id_2}
- ${conn_id_3} = SSHLibrary.Open Connection ${K8s_MINION2_IP}
- SSHKeywords.Flexible_SSH_Login ${DEFAULT_USER} ${DEFAULT_PASSWORD}
- BuiltIn.Set Global Variable ${conn_id_3}
- ${file} = OperatingSystem.Get File ${CONFIG_FILE_TEMPLATE}
- ${line} ${bridge} = Should Match Regexp ${file} "ovsBridge": "(\\w.*)"
- BuiltIn.Set Global Variable ${bridge}
+Modifying templates in playbook
+ ${inventory} = OperatingSystem.Get File ${HOST_INVENTORY}
+ ${template} = OperatingSystem.Get File ${HOSTS_FILE_TEMPLATE}
+ ${template} = String.Replace String ${template} minion_ip ${TOOLS_SYSTEM_ALL_IPS[0]}
+ @{minions} Create List coe-minion
+ ${hosts} Set Variable coe-master:
+ FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
+ Append To List ${minions} coe-minion${i}
+ ${hosts} = Catenate ${hosts} coe-minion${i}:
+ END
+ ${hosts} = Replace String Using Regexp ${hosts} :$ ${EMPTY}
+ ${hosts} = Remove Space on String ${hosts}
+ ${minion hosts} = Replace String Using Regexp ${hosts} ^[\\w-]+: ${EMPTY}
+ FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
+ ${j} = Evaluate ${i}+1
+ ${template} = String.Replace String ${template} ${minions[${i}-1]} ${minions[${i}]}
+ ${template} = String.Replace String ${template} ${TOOLS_SYSTEM_ALL_IPS[${i}-1]} ${TOOLS_SYSTEM_ALL_IPS[${i}]}
+ ${template} = String.Replace String ${template} 192.168.50.1${i} 192.168.50.1${j}
+ ${template} = String.Replace String ${template} 10.11.${i}.0/24 10.11.${j}.0/24
+ ${template} = String.Replace String ${template} 10.11.${i}.1 10.11.${j}.1
+ Append To File ${HOST_INVENTORY} ${template}
+ END
+ ${host file} = OperatingSystem.Get File ${HOST_INVENTORY}
+ ${host file} = String.Replace String ${host file} master_ip ${TOOLS_SYSTEM_ALL_IPS[0]}
+ ${host file} = String.Replace String ${host file} odl_ip ${ODL_SYSTEM_IP}
+ ${host file} = String.Replace String ${host file} mport ${OVSDBPORT}
+ ${host file} = String.Replace String ${host file} cport ${ODL_OF_PORT_6653}
+ ${host file} = String.Replace String ${host file} filepath ${CONFIG_FILE_TEMPLATE}
+ ${host file} = String.Replace String ${host file} yamlpath ${USER_HOME}/coe.yaml
+ log ${host file}
+ [Return] ${minion hosts} ${hosts} ${host file}