]> git.proxmox.com Git - pve-manager.git/commitdiff
pvesr: rename last_snapshots to local_snapshots
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 13 Jun 2022 10:29:54 +0000 (12:29 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 2 Aug 2022 09:04:55 +0000 (11:04 +0200)
while dropping the instance where the local variable was unused.
prepare() was changed a while ago to return all local snapshots.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/CLI/pvesr.pm

index cb79e2bf9e925e6f3dbe604568e102d01f8eed20..a1be88af72e7c717bee81294248e1c05ea86889e 100644 (file)
@@ -136,16 +136,16 @@ __PACKAGE__->register_method ({
            my $images = $plugin->list_images($storeid, $scfg, $vmid, undef, $cache);
            push @$volids, map { $_->{volid} } @$images;
        }
-       my ($last_snapshots, $cleaned_replicated_volumes) = PVE::Replication::prepare($storecfg, $volids, $jobid, $last_sync, $parent_snapname, $logfunc);
+       my ($local_snapshots, $cleaned_replicated_volumes) = PVE::Replication::prepare($storecfg, $volids, $jobid, $last_sync, $parent_snapname, $logfunc);
        foreach my $volid (keys %$cleaned_replicated_volumes) {
            if (!$wanted_volids->{$volid}) {
                $logfunc->("$jobid: delete stale volume '$volid'");
                PVE::Storage::vdisk_free($storecfg, $volid);
-               delete $last_snapshots->{$volid};
+               delete $local_snapshots->{$volid};
            }
        }
 
-       print to_json($last_snapshots) . "\n";
+       print to_json($local_snapshots) . "\n";
 
        return undef;
     }});
@@ -200,8 +200,7 @@ __PACKAGE__->register_method ({
            print STDERR "$msg\n";
        };
 
-       my $last_snapshots = PVE::Replication::prepare(
-           $storecfg, $volids, $jobid, $last_sync, undef, $logfunc);
+       PVE::Replication::prepare($storecfg, $volids, $jobid, $last_sync, undef, $logfunc);
 
        return undef;
     }});