]> git.proxmox.com Git - pve-storage.git/commitdiff
volume_snapshot_list: remove $ip parameter
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 10 May 2017 05:02:42 +0000 (07:02 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 10 May 2017 05:02:42 +0000 (07:02 +0200)
We want to handle ssh connections somewhere else (not inside the
storage plugins).

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

index c06983dee43d87981a0751ff3378048a5cd8501d..14b8289fe34db303085d136efc66b386e27fcff3 100755 (executable)
@@ -264,13 +264,13 @@ sub volume_has_feature {
 }
 
 sub volume_snapshot_list {
-    my ($cfg, $volid, $prefix, $ip) = @_;
+    my ($cfg, $volid, $prefix) = @_;
 
     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, $ip);
+       return $plugin->volume_snapshot_list($scfg, $storeid, $volname, $prefix);
     } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
        die "send file/device '$volid' is not possible\n";
     } else {
index 0a5e9048d53ea2624584109ee3e3ff8de75016a0..b10e2d95eabfa764765a3f86433b558cb971ec81 100644 (file)
@@ -825,7 +825,7 @@ sub status {
 }
 
 sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname, $prefix, $ip) = @_;
+    my ($class, $scfg, $storeid, $volname, $prefix) = @_;
 
     # implement in subclass
     die "Volume_snapshot_list is not implemented for $class";
index 500cb09fd43c04c7a30895e8eae62f609c108d48..032bdf0d74d388e9201d9b4386f7c8a69bd80aa1 100644 (file)
@@ -363,7 +363,7 @@ sub volume_has_feature {
 }
 
 sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname, $prefix, $ip) = @_;
+    my ($class, $scfg, $storeid, $volname, $prefix) = @_;
     # return an empty array if dataset does not exist.
     die "Volume_snapshot_list is not implemented for ZFS over iSCSI.\n";
 }
index 265b557cf9ac603d5c1ca2f20409d1bcec1e8e04..0636ee1d40252f20fe6a6de26aadf770c874235c 100644 (file)
@@ -495,7 +495,7 @@ sub volume_rollback_is_possible {
 }
 
 sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname, $prefix, $ip) = @_;
+    my ($class, $scfg, $storeid, $volname, $prefix) = @_;
 
     my ($vtype, $name, $vmid) = $class->parse_volname($volname);
 
@@ -507,11 +507,6 @@ sub volume_snapshot_list {
     my $cmd = ['zfs', 'list', '-r', '-H', '-S', 'name', '-t', 'snap', '-o',
               'name', $zpath];
 
-    if ($ip) {
-       $ip = "[$ip]" if Net::IP::ip_is_ipv6($ip);
-       unshift @$cmd, 'ssh', '-o', ' BatchMode=yes', "root\@${ip}", '--';
-    }
-
     my $outfunc = sub {
        my $line = shift;