]> git.proxmox.com Git - pve-storage.git/commitdiff
PVE::Storage::volume_snapshot_list - remove $prefix parameter
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 7 Jun 2017 04:20:07 +0000 (06:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 7 Jun 2017 04:20:07 +0000 (06:20 +0200)
Always return the full list of snapshots. Users of this library can easily
filter with a simply 'grep' instead.

PVE/Storage.pm
PVE/Storage/Plugin.pm
PVE/Storage/ZFSPlugin.pm
PVE/Storage/ZFSPoolPlugin.pm

index cfd7b2ca88505fa4bd2978fd070f4a4c9fc90ff8..0b40416f723aff93a2a2707cdc13e307b9509d58 100755 (executable)
@@ -264,13 +264,13 @@ sub volume_has_feature {
 }
 
 sub volume_snapshot_list {
-    my ($cfg, $volid, $prefix) = @_;
+    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, $prefix);
+       return $plugin->volume_snapshot_list($scfg, $storeid, $volname);
     } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
        die "send file/device '$volid' is not possible\n";
     } else {
index 4df6608a109e641c77ece903fd46bc6612d242ab..6d94b64aa4fc221108f44e2d96c2c7949fe81dcf 100644 (file)
@@ -825,7 +825,7 @@ sub status {
 }
 
 sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname, $prefix) = @_;
+    my ($class, $scfg, $storeid, $volname) = @_;
 
     # implement in subclass
     die "Volume_snapshot_list is not implemented for $class";
index 032bdf0d74d388e9201d9b4386f7c8a69bd80aa1..8658f0e168c281a13c372e1fad6d2a292362ebb0 100644 (file)
@@ -363,7 +363,7 @@ sub volume_has_feature {
 }
 
 sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname, $prefix) = @_;
+    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";
 }
index bc9da23d220f66da06b50b96d0d2b1215a43fdde..c8415ebbde5c315e0bd3a5812a43511981d2decf 100644 (file)
@@ -495,7 +495,7 @@ sub volume_rollback_is_possible {
 }
 
 sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname, $prefix) = @_;
+    my ($class, $scfg, $storeid, $volname) = @_;
 
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
 
@@ -510,7 +510,7 @@ sub volume_snapshot_list {
     my $outfunc = sub {
        my $line = shift;
 
-       if ($line =~ m/^\Q$zpath\E@(\Q$prefix\E.*)$/) {
+       if ($line =~ m/^\Q$zpath\E@(.*)$/) {
            push @$snaps, $1;
        }
     };