From: Ondrej Lichtner <olichtne(a)redhat.com>
Now that the tester can connect to slaves during test execution, it
should also be possible to map devices manually.
Though this is just a work in progress method and it's precise
parameters will likely change to provide a much better experience
compared to searching just by mac address.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Controller.py | 2 +-
lnst/Controller/Host.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lnst/Controller/Controller.py b/lnst/Controller/Controller.py
index e087ef3..3e5473f 100644
--- a/lnst/Controller/Controller.py
+++ b/lnst/Controller/Controller.py
@@ -150,7 +150,7 @@ class Controller(object):
self._prepare_machine(machine)
for if_id, i in m["interfaces"].items():
- host._map_device(if_id, i)
+ host.map_device(if_id, i)
if match["virtual"]:
req_host = getattr(requested, m_id)
diff --git a/lnst/Controller/Host.py b/lnst/Controller/Host.py
index f455fa9..a77b8f6 100644
--- a/lnst/Controller/Host.py
+++ b/lnst/Controller/Host.py
@@ -55,7 +55,8 @@ class Host(Namespace):
ret.append(x)
return ret
- def _map_device(self, dev_id, how):
+ def map_device(self, dev_id, how):
+ #TODO if this is supposed to be public it should be better than
dict["hwaddr"]!!!!
hwaddr = how["hwaddr"]
dev = self._machine.get_dev_by_hwaddr(hwaddr)
if dev:
--
2.17.0