[pve-devel] applied: [PATCH storage] fix 2317: list images on 'rootdir' only storages

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Aug 6 13:47:42 CEST 2019


applied

On Tue, Aug 06, 2019 at 09:23:19AM +0200, Fabian Grünbichler wrote:
> plugins can still override list_volumes if they want separate methods to
> list rootdir and images content.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> previously the filtering for configured content type only happened for
> everything besides images, but IMHO this fixed way is better..
> 
>  PVE/Storage.pm        | 2 +-
>  PVE/Storage/Plugin.pm | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 7376dbf..755eca8 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -845,7 +845,7 @@ sub template_list {
>  sub volume_list {
>      my ($cfg, $storeid, $vmid, $content) = @_;
>  
> -    my @ctypes = qw(images vztmpl iso backup snippets);
> +    my @ctypes = qw(rootdir images vztmpl iso backup snippets);
>  
>      my $cts = $content ? [ $content ] : [ @ctypes ];
>  
> diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
> index 08ec749..27f832f 100644
> --- a/PVE/Storage/Plugin.pm
> +++ b/PVE/Storage/Plugin.pm
> @@ -954,7 +954,7 @@ sub list_volumes {
>      foreach my $ct (@$content_types) {
>  	my $data;
>  
> -	if ($ct eq 'images') {
> +	if ($ct eq 'images' || $ct eq 'rootdir') {
>  	    $data = $class->list_images($storeid, $scfg, $vmid);
>  	} elsif ($scfg->{path}) {
>  	    my $path = $class->get_subdir($scfg, $ct);
> -- 
> 2.20.1




More information about the pve-devel mailing list