details: Go back to old Channel naming format

The new format is too long and wordy IMO. It was added to handle
qemu-vdagent ambiguity, since without it we would print the same string
for spicevmc and qemu-vgagent channel. Let's just special case
qemu-vdagent to solve that problem

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2022-06-13 13:39:08 -04:00
parent bfe17ce627
commit 64dfb6c595
1 changed files with 4 additions and 2 deletions

View File

@ -209,8 +209,10 @@ def _label_for_device(dev, disk_bus_index):
if devtype == "channel":
pretty_type = vmmAddHardware.char_pretty_type(dev.type)
name = vmmAddHardware.char_pretty_channel_name(dev.target_name)
if name:
return _("Channel %(type)s (%(name)s)") % {"type": pretty_type, "name": name}
# Don't print channel name with qemu-vdagent, to avoid ambiguity
# with the typical spice agent channel
if name and dev.type != "qemu-vdagent":
return _("Channel (%(name)s)") % {"type": pretty_type, "name": name}
return _("Channel %(type)s") % {"type": pretty_type}
if devtype == "graphics":