From: Ondrej Lichtner <olichtne(a)redhat.com>
These can be useful to retrieve additional information about the host
that we are running our tests on even if these parameters weren't
directly requested for matching.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Host.py | 1 +
lnst/Controller/Machine.py | 4 +++-
lnst/Controller/SlavePoolManager.py | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lnst/Controller/Host.py b/lnst/Controller/Host.py
index 89b6b25..a50a7ad 100644
--- a/lnst/Controller/Host.py
+++ b/lnst/Controller/Host.py
@@ -40,6 +40,7 @@ class Host(Namespace):
def __init__(self, machine, **kwargs):
super(Host, self).__init__(machine)
self.params = Parameters()
+ self.params._from_dict(self._machine._pool_params)
self.params._from_dict(self._machine._slave_desc)
self._machine.set_initns(self)
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 4b9afcb..f63fd6f 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -45,7 +45,7 @@ class Machine(object):
"""
def __init__(self, m_id, hostname, msg_dispatcher, ctl_config,
- libvirt_domain=None, rpcport=None, security=None):
+ libvirt_domain=None, rpcport=None, security=None, pool_params=None):
self._id = m_id
self._hostname = hostname
self._mapped = False
@@ -59,6 +59,8 @@ def __init__(self, m_id, hostname, msg_dispatcher, ctl_config,
self._security["privkey"] =
ctl_config.get_option("security",
"privkey")
+ self._pool_params = pool_params
+
self._domain_ctl = None
self._network_bridges = None
self._libvirt_domain = libvirt_domain
diff --git a/lnst/Controller/SlavePoolManager.py b/lnst/Controller/SlavePoolManager.py
index 3456332..fc863c1 100644
--- a/lnst/Controller/SlavePoolManager.py
+++ b/lnst/Controller/SlavePoolManager.py
@@ -73,7 +73,7 @@ def __init__(self, pools, msg_dispatcher, ctl_config,
pool_checks=True):
pool[m_id] = Machine(m_id, hostname, self._msg_dispatcher,
ctl_config, libvirt_domain, rpc_port,
- m_spec["security"])
+ m_spec["security"], params)
pool[m_id].init_connection()
#TODO check if all described devices are available
--
2.28.0