From c0235499b3339949fc2e81d0186590f14677bc05 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Thu, 27 Dec 2012 16:07:16 +0100 Subject: [PATCH] sheepdog : has_feature Signed-off-by: Alexandre Derumier --- PVE/Storage/SheepdogPlugin.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm index fe6cb68..455a378 100644 --- a/PVE/Storage/SheepdogPlugin.pm +++ b/PVE/Storage/SheepdogPlugin.pm @@ -325,4 +325,18 @@ sub volume_snapshot_delete { return undef; } +sub volume_has_feature { + my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_; + + my $features = { + snapshot => { current => 1, snap => 1}, + clone => { snap => 1}, + }; + + my $snap = $snapname ? 'snap' : 'current'; + return 1 if $features->{$feature}->{$snap}; + + return undef; +} + 1;