From 7e8c6888b274dc69211b83682798504e6c900740 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Thu, 14 Feb 2013 17:27:37 +0100 Subject: [PATCH] iscsi : has_feature : copy Signed-off-by: Alexandre Derumier --- PVE/Storage/ISCSIPlugin.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/PVE/Storage/ISCSIPlugin.pm b/PVE/Storage/ISCSIPlugin.pm index f430897..a368e17 100644 --- a/PVE/Storage/ISCSIPlugin.pm +++ b/PVE/Storage/ISCSIPlugin.pm @@ -398,6 +398,21 @@ sub volume_resize { sub volume_has_feature { my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_; + my $features = { + copy => { current => 1}, + }; + + my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) = + $class->parse_volname($volname); + + my $key = undef; + if($snapname){ + $key = $snapname + }else{ + $key = $isBase ? 'base' : 'current'; + } + return 1 if $features->{$feature}->{$key}; + return undef; }