Add list data return from SSH response
Changes:
- Add new parameter in SSH to accept type
- Support ONLY string and list
Change-Id: I579ebb98a1bc633e682471e124030330a0a775ae
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ffdc/plugins/ssh_execution.py b/ffdc/plugins/ssh_execution.py
index d544d58..f50d195 100644
--- a/ffdc/plugins/ssh_execution.py
+++ b/ffdc/plugins/ssh_execution.py
@@ -23,7 +23,8 @@
username,
password,
command,
- timeout=60):
+ timeout=60,
+ type=None):
r"""
Description of argument(s):
@@ -32,6 +33,7 @@
password Password for user on remote host
command Command to run on remote host
timeout Time, in second, to wait for command completion
+ type Data type return as list or others.
"""
ssh_remoteclient = SSHRemoteclient(hostname,
username,
@@ -54,4 +56,7 @@
if ssh_remoteclient:
ssh_remoteclient.ssh_remoteclient_disconnect()
- return response
+ if type == "list":
+ return response.split('\n')
+ else:
+ return response