[pve-devel] [PATCH 18/21] sheepdog: add volume_snapshot_delete

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


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

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index feada7e..346a2f2 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -261,4 +261,15 @@ sub volume_snapshot_rollback {
 
 }
 
+sub volume_snapshot_delete {
+    my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
+
+    return 1 if $running;
+
+    my $cmd = &$collie_cmd($scfg, 'vdi', 'delete', '-s', $snap, $volname);
+    run_command($cmd, errmsg => "sheepdog snapshot $volname' error");
+
+    return undef;
+}
+
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list