plugin: remove volume_snapshot_list
which was only used by replication, but now replication uses volume_snapshot_info instead. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
8c20d8afa3
commit
dc992e7b89
@ -380,22 +380,6 @@ sub volume_snapshot_info {
|
|||||||
return $plugin->volume_snapshot_info($scfg, $storeid, $volname);
|
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 {
|
sub get_image_dir {
|
||||||
my ($cfg, $storeid, $vmid) = @_;
|
my ($cfg, $storeid, $vmid) = @_;
|
||||||
|
|
||||||
|
|||||||
@ -1222,15 +1222,6 @@ sub volume_snapshot_info {
|
|||||||
die "volume_snapshot_info is not implemented for $class";
|
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 {
|
sub activate_storage {
|
||||||
my ($class, $storeid, $scfg, $cache) = @_;
|
my ($class, $storeid, $scfg, $cache) = @_;
|
||||||
|
|
||||||
|
|||||||
@ -391,12 +391,6 @@ sub volume_has_feature {
|
|||||||
return undef;
|
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 {
|
sub activate_storage {
|
||||||
my ($class, $storeid, $scfg, $cache) = @_;
|
my ($class, $storeid, $scfg, $cache) = @_;
|
||||||
|
|
||||||
|
|||||||
@ -532,15 +532,6 @@ sub volume_snapshot_info {
|
|||||||
return $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 sub dataset_mounted_heuristic {
|
||||||
my ($dataset) = @_;
|
my ($dataset) = @_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user