+ FOR ${nodes} IN @{TOOLS_SYSTEM_ALL_IPS}
+ ${kube} = Utils.Run Command On Remote System And Log ${nodes} sudo kubeadm reset
+ BuiltIn.Should Contain ${kube} Stopping the kubelet service.
+ END
+
+Create Pods
+ [Documentation] Creates pods using the labels of the nodes and busy box names passed as arguments.
+ [Arguments] ${label} ${yaml} ${name}
+ ${busybox} = OperatingSystem.Get File ${BUSY_BOX}
+ ${busybox} = String.Replace String ${busybox} string ${label}
+ ${busybox} = String.Replace String ${busybox} busyboxname ${name}
+ OperatingSystem.Create File ${VARIABLES_PATH}/${yaml} ${busybox}
+ SSHKeywords.Move_file_To_Remote_System ${K8s_MASTER_IP} ${VARIABLES_PATH}/${yaml} ${USER_HOME}
+ Utils.Run Command On Remote System And Log ${K8s_MASTER_IP} kubectl create -f ${yaml}
+
+Collect Pod Names and Ping
+ [Documentation] This keyword collects the pod names and checks connectivity between each and every pod with respect to one another.
+ SSHLibrary.Switch Connection ${TOOLS_SYSTEM_ALL_CONN_IDS[0]}
+ ${get pods} = Write Commands Until Expected Prompt kubectl get pods -o wide ${DEFAULT_LINUX_PROMPT_STRICT}
+ @{pod ips} = String.Get Regexp Matches ${get pods} \\d+\\.\\d+\\.\\d+\\.\\d+
+ @{pod names} = String.Get Regexp Matches ${get pods} ss\\w+-\\w+
+ FOR ${pod_name} IN @{pod names}
+ ${logs} = Log Statements ${pod ips} ${pod names} ${pod_name}
+ Ping Pods ${pod_name} ${pod ips} ${logs}
+ END
+
+Log Statements
+ [Arguments] ${pod ips} ${pod names} ${pod_name}
+ @{log statement} = Create List
+ ${i} = Set Variable 0
+ FOR ${pod_ip} IN @{pod ips}
+ ${ping statement} = Set Variable Ping from ${pod_name} to ${pod names[${i}]} (${pod ip})
+ Append To List ${log statement} ${ping statement}
+ ${i} = Evaluate ${i}+1
+ END
+ RETURN @{log statement}
+
+Ping Pods
+ [Arguments] ${pod_name} ${pod ips} ${logs}
+ ${i} = Set Variable 0
+ FOR ${ping info} IN @{logs}
+ ${ping} = Write Commands Until Expected Prompt
+ ... kubectl exec -it ${pod_name} -- ping -c 3 ${pod ips[${i}]}
+ ... ${DEFAULT_LINUX_PROMPT_STRICT}
+ BuiltIn.log ${ping}
+ BuiltIn.Should Contain ${ping} 64 bytes
+ ${i} = Evaluate ${i}+1
+ END
+
+Coe Suite Teardown
+ [Documentation] COE project requires stop suite to be executed only for the last test suite.This keyword find the current suite,compares it with the stored last suite value and executes Coe.Stop suite only if the cuurent suite is equal to the last suite.
+ ${current suite} ${suite names updated} = Extract current suite name
+ ${last_suite} = Set Variable ${suite names updated[-1]}
+ ${status} = BuiltIn.Evaluate '${last_suite}' == '${current suite}'
+ IF '${status}' == 'True' Coe.Stop Suite
+
+Extract current suite name
+ [Documentation] This keyword returns the name of current test suite.Appropriate replacement in text is done to make test suite names in SUITES and SUITE_NAME similar.
+ BuiltIn.Log SUITE_NAME: ${SUITE_NAME}
+ BuiltIn.Log SUITES: ${SUITES}
+ @{suite_names} = Get Regexp Matches ${SUITES} coe\\/(\\w+).robot 1
+ @{suite_names_updated} = Create List
+ FOR ${suite} IN @{suite_names}
+ ${suite} = Replace String ${suite} _ ${SPACE}
+ Append To List ${suite_names_updated} ${suite}
+ END
+ ${num_suites} = BuiltIn.Get Length ${suite_names_updated}
+ IF ${num_suites} > ${1}
+ ${suite line} ${current_suite} = Should Match Regexp ${SUITE_NAME} .txt.(\\w.*)
+ ELSE
+ ${suite line} ${current_suite} = BuiltIn.Set Variable
+ ... ${suite_names_updated}[0]
+ ... ${suite_names_updated}[0]
+ END
+ RETURN ${current_suite} ${suite_names_updated}
+
+Check For Stale veth Ports
+ [Documentation] Check on switches(except master) where pods were created and deleted to ensure there are no stale veth ports left behind.
+ FOR ${minion_index} IN RANGE 2 ${NUM_TOOLS_SYSTEM}+1
+ ${switch output} = Utils.Run Command On Remote System And Log
+ ... ${TOOLS_SYSTEM_${minion_index}_IP}
+ ... sudo ovs-vsctl show
+ BuiltIn.Should Not Contain ${switch output} veth
+ END