commit 54976a6bc6842ac56d076a28c41ea4e258302f57
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri Oct 3 16:33:25 2014 +0200
Controller: add save_output argument to command
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(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/NetTestController.py | 2 ++
lnst/Controller/Task.py | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
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)
Show replies by date