From: Ondrej Lichtner <olichtne(a)redhat.com>
The tester should be able to assign a specific level to the job when
running it.
Use level DEBUG by default.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Namespace.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Controller/Namespace.py b/lnst/Controller/Namespace.py
index 16458a0..caee05b 100644
--- a/lnst/Controller/Namespace.py
+++ b/lnst/Controller/Namespace.py
@@ -22,6 +22,7 @@ from lnst.Devices.VirtualDevice import VirtualDevice
from lnst.Devices.RemoteDevice import RemoteDevice
from lnst.Controller.Common import ControllerError
from lnst.Controller.Job import Job
+from lnst.Controller.RecipeResults import ResultLevel
class HostError(ControllerError):
pass
@@ -71,7 +72,7 @@ class Namespace(object):
return self._name
def run(self, what, bg=False, fail=False, timeout=DEFAULT_TIMEOUT,
- json=False, desc=None):
+ json=False, desc=None, job_level=ResultLevel.DEBUG):
"""
Args:
what (mandatory) -- what should be run on the host. Can be either a
@@ -96,7 +97,8 @@ class Namespace(object):
the Job object will be automatically updated.
"""
- job = Job(self, what, expect=not fail, json=json, desc=desc)
+ job = Job(self, what, expect=not fail, json=json, desc=desc,
+ level=job_level)
try:
self._machine.run_job(job)
--
2.17.0