[PATCH 2/3] virt-manager: Add redirected devices details

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/virtManager/details.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/virtManager/details.py b/src/virtManager/details.py
index fd6cc3a..f928a42 100644
--- a/src/virtManager/details.py
+++ b/src/virtManager/details.py
@@ -186,6 +186,7 @@ def build_hostdev_label(hostdev):
     addrslt = hostdev.slot
     addrfun = hostdev.function
     addrdom = hostdev.domain
+    redirection = hostdev.redirection
 
     def dehex(val):
         if val.startswith("0x"):
@@ -195,7 +196,11 @@ def build_hostdev_label(hostdev):
     hwlabel = typ.upper()
     srclabel = typ.upper()
 
-    if vendor and product:
+    if redirection:
+        srclabel += _(" redirected to %s:%s") % (hostdev.host, hostdev.service)
+        hwlabel += _(" redirected")
+
+    elif vendor and product:
         # USB by vendor + product
         devstr = " %s:%s" % (dehex(vendor), dehex(product))
         srclabel += devstr
@@ -2975,7 +2980,10 @@ class vmmDetails(vmmGObjectUI):
         if not pretty_name:
             pretty_name = build_hostdev_label(hostdev)[0] or "-"
 
-        devlabel = "<b>Physical %s Device</b>" % devtype.upper()
+        if hostdev.redirection:
+            devlabel = "<b>Redirected %s Device</b>" % devtype.upper()
+        else:
+            devlabel = "<b>Physical %s Device</b>" % devtype.upper()
         self.widget("hostdev-title").set_markup(devlabel)
         self.widget("hostdev-source").set_text(pretty_name)
 
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]