[pmg-devel] applied: [RFC/PATCH pve-storage 1/1] api: pbs: file restore: don't use namespaced parameters

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Nov 4 14:17:17 CET 2022


applied & dumped dependency accordingly

On Wed, Jul 20, 2022 at 12:59:48PM +0200, Fabian Ebner wrote:
> Instead, rely on PBSClient to set namespace according to the initial
> configuration.
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
> 
> Dependency bump for new libpve-common-perl needed.
> 
>  PVE/API2/Storage/FileRestore.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/API2/Storage/FileRestore.pm b/PVE/API2/Storage/FileRestore.pm
> index 5630f52..ccc56e5 100644
> --- a/PVE/API2/Storage/FileRestore.pm
> +++ b/PVE/API2/Storage/FileRestore.pm
> @@ -119,7 +119,7 @@ __PACKAGE__->register_method ({
>  	my (undef, $snap) = PVE::Storage::parse_volname($cfg, $volid);
>  
>  	my $client = PVE::PBSClient->new($scfg, $storeid);
> -	my $ret = $client->file_restore_list([$scfg->{namespace}, $snap], $path, $base64);
> +	my $ret = $client->file_restore_list($snap, $path, $base64);
>  
>  	# 'leaf' is a proper JSON boolean, map to perl-y bool
>  	# TODO: make PBSClient decode all bools always as 1/0?
> @@ -188,7 +188,7 @@ __PACKAGE__->register_method ({
>  	$rpcenv->fork_worker('pbs-download', undef, $user, sub {
>  	    my $name = decode_base64($path);
>  	    print "Starting download of file: $name\n";
> -	    $client->file_restore_extract($fifo, [$scfg->{namespace}, $snap], $path, 1);
> +	    $client->file_restore_extract($fifo, $snap, $path, 1);
>  	});
>  
>  	my $ret = {
> -- 
> 2.30.2




More information about the pmg-devel mailing list