Due to IPv6 support introduced in commit
0d71e928a58944d2cd4391e407b8eb0d598b6029 "IPv6: support in basic
vpn_service tests", if a value of ${ip_address} doesn't match IPv4
address regexp, use ping6 instead of ping in Check Ping keyword.
Change-Id: I9ab68779c5c0b05ae74339610788188b7371f02c
Signed-off-by: Valentina Krasnobaeva <valentina.krasnobaeva@6wind.com>
Check Ping
[Arguments] ${ip_address} ${ttl}=64
[Documentation] Run Ping command on the IP available as argument
- ${output}= Write Commands Until Expected Prompt ping -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT}
+ ${ethertype}= Get Regexp Matches ${ip_address} ${IP_REGEX}
+ ${output}= Run Keyword If ${ethertype} Write Commands Until Expected Prompt ping -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT}
+ ... ELSE Write Commands Until Expected Prompt ping6 -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT}
Should Contain ${output} 64 bytes
Check Metadata Access