]> git.proxmox.com Git - pve-common.git/commitdiff
PBS client: get snapshots: avoid over generic param has
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 12:04:43 +0000 (13:04 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 12:04:43 +0000 (13:04 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/PBSClient.pm

index a108e6f9692fe61383de35b024157640ca376945..75b3b507ec82cebd5f5e3ff4dc5334db3b367a60 100644 (file)
@@ -202,11 +202,12 @@ sub autogen_encryption_key {
     return file_get_contents($encfile);
 };
 
     return file_get_contents($encfile);
 };
 
+# lists all snapshots, optionally limited to a specific group
 sub get_snapshots {
 sub get_snapshots {
-    my ($self, $opts) = @_;
+    my ($self, $group) = @_;
 
     my $param = [];
 
     my $param = [];
-    push @$param, $opts->{group} if defined($opts->{group});
+    push @$param, $group if defined($group);
 
     return run_client_cmd($self, "snapshots", $param);
 };
 
     return run_client_cmd($self, "snapshots", $param);
 };