[pve-devel] applied: [PATCH container] vmstatus: Align name if not set in config to VMs
Wolfgang Bumiller
w.bumiller at proxmox.com
Mon Jan 20 08:51:19 CET 2020
applied
On Thu, Jan 16, 2020 at 02:35:58PM +0100, Aaron Lauterer wrote:
> VMs have a space in between VM and the VMID.
>
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
>
> While this is a small optical nit pick we could also think about
> replacing the whitespace between CT/VM and the ID with a dash. We do not
> allow a space when setting the name in the config AFAICT.
>
> This could potentially break something down the line if the names are
> used for more than just display.
>
> src/PVE/LXC.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index 34949c6..81d2dd4 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -197,7 +197,7 @@ sub vmstatus {
>
> $unprivileged->{$vmid} = $conf->{unprivileged};
>
> - $d->{name} = $conf->{'hostname'} || "CT$vmid";
> + $d->{name} = $conf->{'hostname'} || "CT $vmid";
> $d->{name} =~ s/[\s]//g;
>
> $d->{cpus} = $conf->{cores} || $conf->{cpulimit};
> --
> 2.20.1
More information about the pve-devel
mailing list