]> git.proxmox.com Git - pve-storage.git/commitdiff
iscsidirect : has_feature : copy
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 14 Feb 2013 16:27:36 +0000 (17:27 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 15 Feb 2013 06:28:15 +0000 (07:28 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/ISCSIDirectPlugin.pm

index a2bd38f35911d6068cbc593a75cc4f803ce9bdae..e13e4e658144c2f24c060bb39a02247b1b215839 100644 (file)
@@ -222,6 +222,21 @@ sub volume_snapshot_delete {
 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;
 }