From: Ondrej Lichtner <olichtne(a)redhat.com>
Since the method is often used when adding Recipe results (started or
finished) that get automatically logged to the terminal, it's useful to
also see what host the Job is associated with.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Job.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/Job.py b/lnst/Controller/Job.py
index 9c50210..3e5b3e6 100644
--- a/lnst/Controller/Job.py
+++ b/lnst/Controller/Job.py
@@ -218,6 +218,8 @@ def _to_dict(self):
def __str__(self):
attrs = ["type(%s)" % self.type]
+ attrs.append("host(%s)" % self.host.hostid)
+
if self._netns is not None:
attrs.append("netns(%s)" % self._netns.name)
--
2.22.0