SLICING-01 - Basic Network Slicing robot test
Change-Id: I3696b4f2ad207c0d6f4fc26f317d241b40f2ee59
Signed-off-by: melian <javier.melian@atos.net>
diff --git a/robot-systest/lib/ssh_lib.robot b/robot-systest/lib/ssh_lib.robot
index 3d2d708..23e5ae4 100644
--- a/robot-systest/lib/ssh_lib.robot
+++ b/robot-systest/lib/ssh_lib.robot
@@ -40,6 +40,20 @@
Close All Connections
[Return] ${output}
+Ping Many
+ [Arguments] ${host} ${username} ${password} ${privatekey} @{ip_list}
+
+ Open Connection ${host}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
+ FOR ${ip} IN @{ip_list}
+ ${result}= Execute Command ping -c 5 -W 1 ${ip} > /dev/null && echo OK shell=True
+ Log ${result}
+ Should Contain ${result} OK
+ END
+ Close All Connections
+
+
Execute Remote Command Check Rc Return Output
[Arguments] ${host} ${username} ${password} ${privatekey} ${command}
@@ -51,4 +65,5 @@
log ${stdout}
Close All Connections
Should Be Equal As Integers ${rc} 0
- [Return] ${stdout}
\ No newline at end of file
+ [Return] ${stdout}
+