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

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

 



On 01/28/2014 04:18 AM, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxx>
> ---
>  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:
> 

ACK, but please use parentheses around the statement, I try to avoid the line
break escape:

if (target_port is not None and
    chardev... ):

Thanks,
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