[virt-tools-list] [virt-manager PATCH] details: show port number of console device in typelabel

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Tue Jan 28 09:18:52 UTC 2014


From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

We could set multi console for VM and containers.
But our UI did not show the number of it.
It would bring troubles when we want to delete one.
This patch will show port number of console device
int typelabel.

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 virtManager/details.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/virtManager/details.py b/virtManager/details.py
index 39a016a..662aa7b 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -3021,6 +3021,9 @@ class vmmDetails(vmmGObjectUI):
         else:
             typelabel = _("%s Device") % char_type.capitalize()
 
+        if target_port is not None and \
+                chardev.virtual_device_type == "console":
+            typelabel += " %s" % (int(target_port) + 1)
         if target_port is not None and not show_target_type:
             typelabel += " %s" % (int(target_port) + 1)
         if primary:
-- 
1.8.2.1




More information about the virt-tools-list mailing list