Re: [virt-manager v2] details: show Channel label by device type

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

 



On 11/11/2015 07:26 AM, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
> 
> Currently we show channel label by its name.
> If we use name com.redhat.spice.0 but set it
> as unix socket, the label in details keep unchanged.
> 
> This patch will set label according to device type
> if we failed matching target_name
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
> ---
> v2: use device type when failed to match target name.
> 
>  virtManager/details.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/virtManager/details.py b/virtManager/details.py
> index 71ba39d..d0e8dc8 100644
> --- a/virtManager/details.py
> +++ b/virtManager/details.py
> @@ -214,6 +214,8 @@ def _label_for_device(dev):
>      if devtype == "channel":
>          label = _("Channel")
>          name = dev.pretty_channel_name(dev.target_name)
> +        if not name:
> +            name = dev.pretty_type(dev.type)
>          if name:
>              label += " %s" % name
>          return label
> 

Ah okay that looks fine, ACK

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux