]> git.proxmox.com Git - pve-storage.git/commitdiff
Revert "Include new storage function volume_send."
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 10 May 2017 04:58:44 +0000 (06:58 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 10 May 2017 04:58:44 +0000 (06:58 +0200)
This reverts commit b76774e57fe66a483a7544ec5a05ba2e998eb836.

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

index 17a1b5d835659b28d312f175bc5928038f9f7c03..c06983dee43d87981a0751ff3378048a5cd8501d 100755 (executable)
@@ -217,24 +217,6 @@ sub volume_snapshot {
     }
 }
 
-sub volume_send {
-    my ($cfg, $volid, $snap, $ip, $incremental_snap, $verbose, $limit,
-       $target_path) = @_;
-
-    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_send($scfg, $storeid, $volname, $ip, $snap,
-                                   $incremental_snap, $verbose, $limit, $target_path);
-
-    } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
-       die "send file/device '$volid' is not possible\n";
-    } else {
-       die "unable to parse volume ID '$volid'\n";
-    }
-}
-
 sub volume_snapshot_rollback {
     my ($cfg, $volid, $snap) = @_;
 
index 641ab045a8b85581f6e8b8b72b93f8d4b2c24027..0a5e9048d53ea2624584109ee3e3ff8de75016a0 100644 (file)
@@ -697,14 +697,6 @@ sub volume_snapshot {
     return undef;
 }
 
-sub volume_send {
-    my ($class, $scfg, $storeid, $volname, $ip, $snap,
-       $incremental_snap, $verbose, $limit, $target_path) = @_;
-
-    # implement in subclass
-    die "Volume_send is not implemented for $class";
-}
-
 sub volume_rollback_is_possible {
     my ($class, $scfg, $storeid, $volname, $snap) = @_; 
 
index c7c7ba30025be7118da6119a04f4ea31bb505721..500cb09fd43c04c7a30895e8eae62f609c108d48 100644 (file)
@@ -336,13 +336,6 @@ sub volume_snapshot_rollback {
     $class->zfs_add_lun_mapping_entry($scfg, $volname);
 }
 
-sub volume_send {
-    my ($class, $scfg, $storeid, $volname, $ip, $snap,
-       $incremental_snap, $verbose, $limit, $target_path) = @_;
-
-    die "Volume_send is not implemented for ZFS over iSCSI.\n";
-}
-
 sub volume_has_feature {
     my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
 
index e8f7fd25c0463074c09be238394df20e546fe5f2..265b557cf9ac603d5c1ca2f20409d1bcec1e8e04 100644 (file)
@@ -466,58 +466,6 @@ sub volume_snapshot {
     $class->zfs_request($scfg, undef, 'snapshot', "$scfg->{pool}/$vname\@$snap");
 }
 
-sub volume_send {
-    my ($class, $scfg, $storeid, $volname, $ip, $snap,
-       $incremental_snap, $verbose, $limit, $target_path) = @_;
-
-    my ($vtype, $name, $vmid) = $class->parse_volname($volname);
-
-    my $zpath = "$scfg->{pool}/$name";
-
-    die "$vtype is not allowed in ZFSPool!" if ($vtype ne "images");
-
-    my $cmdsend = [];
-    my $cmdlimit = [];
-
-    push @$cmdsend, 'zfs', 'send', '-R';
-    push @$cmdsend, '-v' if defined($verbose);
-
-    if( defined($incremental_snap)) {
-       push @$cmdsend, '-I', "$zpath\@${incremental_snap}";
-    }
-
-    push @$cmdsend, '--', "$zpath\@${snap}";
-
-    # limit in kByte/s
-    if ($limit){
-       my $bwl = $limit * 1024;
-       push @$cmdlimit, 'cstream', '-t', $bwl;
-    }
-
-    my $cmdrecv = [];
-
-    if ($ip) {
-       $ip = "[$ip]" if Net::IP::ip_is_ipv6($ip);
-       push @$cmdrecv, 'ssh', '-o', 'BatchMode=yes', "root\@${ip}", '--';
-    }
-
-    push @$cmdrecv, 'zfs', 'recv', '-F', '--';
-
-    $zpath = $target_path if defined($target_path);
-    push @$cmdrecv, $zpath;
-
-
-    if ($limit) {
-       eval { run_command([$cmdsend, $cmdlimit, $cmdrecv]) };
-    } else {
-       eval { run_command([$cmdsend, $cmdrecv]) };
-    }
-
-    if (my $err = $@) {
-       die $err;
-    }
-}
-
 sub volume_snapshot_delete {
     my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;