From 9986074ab0eb47a9b732d716cfd2be1380a3014a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 7 Jul 2014 17:57:50 -0400 Subject: [PATCH] connection: Revive option to show QEMU/KVM in pretty desc I thought it was unused, but it was just grep fail --- virtManager/connection.py | 9 ++++++++- virtManager/create.py | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/virtManager/connection.py b/virtManager/connection.py index a7a12c50..56079bca 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -355,7 +355,11 @@ class vmmConnection(vmmGObject): #################################### def get_pretty_desc(self, shorthost=True, show_transport=False, - show_user=False): + show_user=False, show_kvm=False): + """ + @show_kvm: Show hv as QEMU/KVM. Only works if connection is + active though + """ def match_whole_string(orig, reg): match = re.match(reg, orig) if not match: @@ -416,6 +420,9 @@ class vmmConnection(vmmGObject): if scheme in pretty_map: hv = pretty_map[scheme] + if hv == "QEMU" and show_kvm and self.caps.is_kvm_available(): + hv += "/KVM" + if show_transport and transport: hv += "+" + transport diff --git a/virtManager/create.py b/virtManager/create.py index e0ac5211..ba755b6a 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -763,7 +763,8 @@ class vmmCreate(vmmGObjectUI): # Favor local connections over remote connections default = len(model) - model.append([connobj.get_uri(), connobj.get_pretty_desc()]) + model.append([connobj.get_uri(), + connobj.get_pretty_desc(show_kvm=True)]) no_conns = (len(model) == 0)