mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-12 09:18:00 +03:00
connection: Revive option to show QEMU/KVM in pretty desc
I thought it was unused, but it was just grep fail
This commit is contained in:
parent
02e2fd9cd4
commit
9986074ab0
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user