Thu, Jun 25, 2015 at 03:27:26PM CEST, jprochaz(a)redhat.com wrote:
For issue #111. Since RPC connection is created after mapping, we
can't get
interface driver info sooner without creating extra connection to the Slave.
This patch stores driver info after device configuration, after method
interface_update() was called, so driver info should be present in Slave.
Btw, if you enter something like "Fixes #111" in the description then github
will automagically close the issue for you, see [1].
And one more thing. Please, please, please, describe what you're fixing,
patching, enhancing as first, then include github related data like
reference to issue, e.g. this post [2].
[1]
https://help.github.com/articles/closing-issues-via-commit-messages/
[2]
https://lists.fedorahosted.org/pipermail/lnst-developers/2015-June/002901...
Thanks,
Jan
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/NetTestController.py | 5 +++++
lnst/Controller/NetTestResultSerializer.py | 14 +++++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 5c2695d..0791897 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -204,6 +204,11 @@ class NetTestController:
for iface in ifaces:
iface.configure()
+ if m._libvirt_domain is None:
+ driver = iface._driver
+ if_id = iface._id
+ mapped_machine = self._slave_pool._map['machines'][m_id]
+ mapped_machine['interfaces'][if_id]['driver'] =
driver
for iface in ifaces:
iface.up()
diff --git a/lnst/Controller/NetTestResultSerializer.py
b/lnst/Controller/NetTestResultSerializer.py
index 9f8955a..49f632c 100644
--- a/lnst/Controller/NetTestResultSerializer.py
+++ b/lnst/Controller/NetTestResultSerializer.py
@@ -100,9 +100,17 @@ class NetTestResultSerializer:
(m_id, m["target"]), ""))
for if_id, pool_if in m["interfaces"].iteritems():
pool_id = pool_if["target"]
- output_pairs.append((6*" " + "interface
\"%s\" "\
- "matched to
\"%s\"" %\
- (if_id, pool_id), ""))
+ if "driver" in pool_if:
+ driver = pool_if["driver"]
+ output_pairs.append((6*" " + "interface
\"%s\" "
+ "matched to \"%s\"
"
+ "(driver:
\"%s\")" %
+ (if_id, pool_id,
+ driver), ""))
+ else:
+ output_pairs.append((6*" " + "interface
\"%s\" "
+ "matched to \"%s\"
" %
+ (if_id, pool_id), ""))
if recipe["result"] == "FAIL" and \
"err_msg" in recipe and recipe["err_msg"] !=
"":
--
2.4.3
_______________________________________________
LNST-developers mailing list
LNST-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers