[VOL-4267] Added openolt-adapter restart scenario with continuous ping running in background for DT
Change-Id: I4a51f8fbc5b84bde8ea02f274fab8139d4126315
diff --git a/libraries/utils.robot b/libraries/utils.robot
index c08d1ac..4d31cb0 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -1341,9 +1341,12 @@
[Arguments] ${ip} ${user} ${pass}=${None}
... ${container_type}=${None} ${container_name}=${None}
[Documentation] Stops the 'ping' running in background on remote system
+ ${cmd}= Run Keyword If '${container_type}' == 'LXC' or '${container_type}' == 'K8S'
+ ... Set Variable kill -SIGINT `pgrep ping`
+ ... ELSE
+ ... Set Variable sudo kill -SIGINT `pgrep ping`
${result}= Login And Run Command On Remote System
- ... sudo kill -SIGINT `pgrep ping`
- ... ${ip} ${user} ${pass} ${container_type} ${container_name}
+ ... ${cmd} ${ip} ${user} ${pass} ${container_type} ${container_name}
Log ${result}
Retrieve Remote File Contents