+ ${output}= MininetKeywords.Send Mininet Command ${mininet_conn} ${cmd}
+ ${flows}= String.Get RegExp Matches ${output} (?<=flow_count\=).*?(?=\r)
+ ${total_flows}= BuiltIn.Evaluate sum(map(int, ${flows}))
+ Should Be Equal As Numbers ${total_flows} ${flow_count}
+
+Verify Mininet Ping
+ [Arguments] ${host1} ${host2}
+ [Documentation] Send ping from mininet and verify connectivity.
+ SSHLibrary.Write ${host1} ping -w 3 ${host2}
+ ${result}= SSHLibrary.Read Until mininet>
+ Should Contain ${result} 64 bytes
+
+Verify Mininet No Ping
+ [Arguments] ${host1} ${host2}
+ [Documentation] Send ping from mininet and verify no conectivity.
+ SSHLibrary.Write ${host1} ping -w 3 ${host2}
+ ${result}= SSHLibrary.Read Until mininet>
+ Should Contain ${result} 100% packet loss
+
+Ping All Hosts
+ [Arguments] @{host_list}
+ [Documentation] Do one round of ping from one host to all other hosts in mininet.
+ ... Note that a single ping failure will exit the loop and return a non zero value.
+ ${source}= Get From List ${host_list} ${0}
+ : FOR ${h} IN @{host_list}
+ \ ${status}= Ping Two Hosts ${source} ${h} 1
+ \ Exit For Loop If ${status}!=${0}
+ [Return] ${status}
+
+Ping Two Hosts
+ [Arguments] ${host1} ${host2} ${pingcount}=2
+ [Documentation] Ping between mininet hosts. Must be used only after a mininet session is in place.
+ ... Returns non zero value if there is 100% packet loss.
+ SSHLibrary.Write ${host1} ping -c ${pingcount} ${host2}
+ ${out}= SSHLibrary.Read Until mininet>
+ ${ret}= String.Get Lines Matching Regexp ${out} .*100% packet loss.*
+ ${len}= Get Length ${ret}
+ [Return] ${len}
+
+Get Mininet Hosts
+ [Documentation] Get all the hosts from mininet
+ ${host_list}= Create List
+ SSHLibrary.Write nodes
+ ${out}= SSHLibrary.Read Until mininet>
+ @{words}= String.Split String ${out} ${SPACE}
+ : FOR ${item} IN @{words}
+ \ ${h}= String.Get Lines Matching Regexp ${item} h[0-9]*
+ \ Run Keyword If '${h}' != '${EMPTY}' Append To List ${host_list} ${h}
+ [Return] ${host_list}