]> git.proxmox.com Git - pve-storage.git/commitdiff
nexenta: has_feature
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 27 Dec 2012 15:07:17 +0000 (16:07 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 28 Dec 2012 06:52:52 +0000 (07:52 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/NexentaPlugin.pm

index 386656fe9a5dc3514087c30c9d88a85f6d22994d..962254805dcc91efdc991eadda84aa5cc7a2288e 100644 (file)
@@ -380,4 +380,18 @@ sub volume_snapshot_delete {
     nexenta_request($scfg, 'destroy', 'snapshot', "$scfg->{pool}/$volname\@$snap", '');
 }
 
+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;