[pve-devel] [PATCH 11/21] sheepdog : add volume_snapshot_rollback

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


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

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index 14d2f88..feada7e 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -253,4 +253,12 @@ sub volume_snapshot {
     return undef;
 }
 
+sub volume_snapshot_rollback {
+    my ($class, $scfg, $storeid, $volname, $snap) = @_;
+
+    my $cmd = &$collie_cmd($scfg, 'vdi', 'rollback', '-s', $snap, $volname);
+    run_command($cmd, errmsg => "sheepdog snapshot $volname' error");
+
+}
+
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list