PBS client: get snapshots: avoid over generic param has

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-17 13:04:43 +01:00
parent 69a3a5858f
commit 2113c7e8e9

View File

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