[pve-devel] [PATCH v5 qemu-server 7/9] api2: qemu : don't display cloudinit value

Fabian Ebner f.ebner at proxmox.com
Wed Jun 8 12:13:59 CEST 2022


Am 16.05.22 um 18:07 schrieb Alexandre Derumier:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  PVE/API2/Qemu.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 1d5b66f..57a75fc 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -1227,6 +1227,7 @@ __PACKAGE__->register_method({
>  	    $conf = PVE::QemuConfig->load_current_config($param->{vmid}, $param->{current});

It'd be a bit nicer to have load_current_config() not return the
cloudinit section. And because the implementation in AbstractConfig.pm
shouldn't need to know about the cloudinit section, I think we should
override load_current_config() in QemuConfig.pm (calling the parent
method and removing the cloudinit section there).

>  	}
>  	$conf->{cipassword} = '**********' if $conf->{cipassword};
> +	delete $conf->{cloudinit};
>  	return $conf;
>  
>      }});




More information about the pve-devel mailing list