[pve-devel] [PATCH 10/21] rbd: add volume_snapshot_rollback

Alexandre Derumier aderumier at odiso.com
Thu Sep 6 10:28:00 CEST 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/RBDPlugin.pm |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 7a2222e..277d1e8 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -288,4 +288,11 @@ sub volume_snapshot {
     return undef;
 }
 
+sub volume_snapshot_rollback {
+    my ($class, $scfg, $storeid, $volname, $snap) = @_;
+
+    my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'rollback', '--snap', $snap, $volname);
+    run_command($cmd, errmsg => "rbd snapshot $volname to $snap' error", errfunc => sub {});
+}
+
 1;
-- 
1.7.2.5



More information about the pve-devel mailing list