From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 2/3] plugin: remove volume_snapshot_list
Date: Tue, 19 Oct 2021 09:54:51 +0200 [thread overview]
Message-ID: <20211019075459.14328-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20211019075459.14328-1-f.ebner@proxmox.com>
which was only used by replication, but now replication uses
volume_snapshot_info instead.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
Breaks old pve-guest-common.
Requires APIVER+APIAGE bump (it's in the next patch).
PVE/Storage.pm | 16 ----------------
PVE/Storage/Plugin.pm | 9 ---------
PVE/Storage/ZFSPlugin.pm | 6 ------
PVE/Storage/ZFSPoolPlugin.pm | 9 ---------
4 files changed, 40 deletions(-)
diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index f9582d0..5d389be 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -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) = @_;
diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index d4b3615..42eabdf 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -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) = @_;
diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm
index 5b84d85..d4dc2a4 100644
--- a/PVE/Storage/ZFSPlugin.pm
+++ b/PVE/Storage/ZFSPlugin.pm
@@ -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) = @_;
diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 01d0743..278438b 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -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) = @_;
--
2.30.2
next prev parent reply other threads:[~2021-10-19 7:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 7:54 [pve-devel] [PATCH-SERIES storage/guest-common/manager] Follow-up for fixing replication/rollback interaction Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH storage 1/3] plugin: add volume_snapshot_info function Fabian Ebner
2021-10-19 7:54 ` Fabian Ebner [this message]
2021-10-19 7:54 ` [pve-devel] [PATCH storage 3/3] bump APIVER and APIAGE Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH guest-common 1/4] replication: refactor finding most recent common replication snapshot Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH guest-common 2/4] replication: prepare: return additional information about snapshots Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH guest-common 3/4] replication: find common snapshot: use additional information Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [RFC guest-common 4/4] config: snapshot delete check: use volume_snapshot_info Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH manager 1/3] test: replication: avoid implicit return for volume_snapshot Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH manager 2/3] test: replication: mock volume_snapshot_info Fabian Ebner
2021-10-19 7:54 ` [pve-devel] [PATCH manager 3/3] test: replication: remove mocking for obsolete volume_snapshot_list Fabian Ebner
2021-11-09 16:50 ` [pve-devel] applied-series: [PATCH-SERIES storage/guest-common/manager] Follow-up for fixing replication/rollback interaction Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211019075459.14328-3-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox