From: Ondrej Lichtner <olichtne(a)redhat.com>
Enum defining various result levels that can be used for filtering when
viewing.
Setting the default level of the BaseResult class to DEBUG.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/RecipeResults.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lnst/Controller/RecipeResults.py b/lnst/Controller/RecipeResults.py
index b79516d..2dcafdc 100644
--- a/lnst/Controller/RecipeResults.py
+++ b/lnst/Controller/RecipeResults.py
@@ -14,6 +14,12 @@ olichtne(a)redhat.com (Ondrej Lichtner)
"""
import time
+from enum import IntEnum
+
+class ResultLevel(IntEnum):
+ IMPORTANT = 1
+ NORMAL = 2
+ DEBUG = 3
class BaseResult(object):
"""Base class for storing result data
@@ -39,6 +45,10 @@ class BaseResult(object):
def data(self):
return None
+ @property
+ def level(self):
+ return ResultLevel.DEBUG
+
class JobResult(BaseResult):
"""Base class for storing result data of Jobs
--
2.17.0