This patch adds "save_output" parameter to the Host API's run method that will be used to save the command output from a python task in the following patch.
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/Controller/NetTestController.py | 2 ++ lnst/Controller/Task.py | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py index bdf1bd3..e2765f9 100644 --- a/lnst/Controller/NetTestController.py +++ b/lnst/Controller/NetTestController.py @@ -406,6 +406,8 @@ class NetTestController:
if "from" in cmd_data: cmd["from"] = cmd_data["from"] + if "save_output" in cmd_data: + cmd["save_output"] = cmd_data["save_output"] elif cmd["type"] in ["wait", "intr", "kill"]: # 'proc_id' is used to store bg_id for wait/kill/intr # 'bg_id' is used for test/exec diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py index 9968e26..e5fdb5e 100644 --- a/lnst/Controller/Task.py +++ b/lnst/Controller/Task.py @@ -172,6 +172,8 @@ class HostAPI(object): cmd["desc"] = argval elif arg == "netns": cmd["netns"] = argval + elif arg == "save_output": + cmd["save_output"] = argval else: msg = "Argument '%s' not recognised by the run() method." % arg raise TaskError(msg)
Fri, Oct 03, 2014 at 04:33:25PM CEST, jtluka@redhat.com wrote:
This patch adds "save_output" parameter to the Host API's run method that will be used to save the command output from a python task in the following patch.
Signed-off-by: Jan Tluka jtluka@redhat.com
applied
lnst-developers@lists.fedorahosted.org