]> git.proxmox.com Git - pve-storage.git/commitdiff
plugin: remove volume_snapshot_list
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 19 Oct 2021 07:54:51 +0000 (09:54 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 8 Nov 2021 09:35:53 +0000 (10:35 +0100)
which was only used by replication, but now replication uses
volume_snapshot_info instead.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm
PVE/Storage/Plugin.pm
PVE/Storage/ZFSPlugin.pm
PVE/Storage/ZFSPoolPlugin.pm

index f9582d0d9bc0e0f6ebe5fbb3862ecc4c6970d957..5d389bef8986d14136562436ba2c17a1eb5b6ea4 100755 (executable)
@@ -380,22 +380,6 @@ sub volume_snapshot_info {
     return $plugin->volume_snapshot_info($scfg, $storeid, $volname);
 }
 
-sub volume_snapshot_list {
-    my ($cfg, $volid) = @_;
-
-    my ($storeid, $volname) = parse_volume_id($volid, 1);
-    if ($storeid) {
-       my $scfg = storage_config($cfg, $storeid);
-       my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
-       return $plugin->volume_snapshot_list($scfg, $storeid, $volname);
-    } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
-       die "send file/device '$volid' is not possible\n";
-    } else {
-       die "unable to parse volume ID '$volid'\n";
-    }
-    # return an empty array if dataset does not exist.
-}
-
 sub get_image_dir {
     my ($cfg, $storeid, $vmid) = @_;
 
index d4b3615b7b3937e7e68ea020ed79635a3e819303..42eabdf49c169492987a0ff94051de39ffe80fac 100644 (file)
@@ -1222,15 +1222,6 @@ sub volume_snapshot_info {
     die "volume_snapshot_info is not implemented for $class";
 }
 
-sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname) = @_;
-
-    # implement in subclass
-    die "Volume_snapshot_list is not implemented for $class";
-
-    # return an empty array if dataset does not exist.
-}
-
 sub activate_storage {
     my ($class, $storeid, $scfg, $cache) = @_;
 
index 5b84d85f2efca5f1d96fe003d47c21bd415857eb..d4dc2a47a5ae363bf955c3fedbf15c09a9bba966 100644 (file)
@@ -391,12 +391,6 @@ sub volume_has_feature {
     return undef;
 }
 
-sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname) = @_;
-    # return an empty array if dataset does not exist.
-    die "Volume_snapshot_list is not implemented for ZFS over iSCSI.\n";
-}
-
 sub activate_storage {
     my ($class, $storeid, $scfg, $cache) = @_;
 
index 01d074387a750ec1f1884a2bef3518fb41599dc0..278438bcd5cc0cb7154463bd107bd38eff1563ba 100644 (file)
@@ -532,15 +532,6 @@ sub volume_snapshot_info {
     return $info;
 }
 
-sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname) = @_;
-
-    my $snaps = [];
-    # return an empty array if dataset does not exist.
-    eval { $snaps = $class->zfs_get_sorted_snapshot_list($scfg, $volname, ['-S', 'name']); };
-    return $snaps;
-}
-
 my sub dataset_mounted_heuristic {
     my ($dataset) = @_;