[pve-devel] [PATCH] has_feature : template

Alexandre Derumier aderumier at odiso.com
Sat Feb 16 08:52:07 CET 2013


for plugin-rbd-sheepdog-nexenta

+ indentation fix

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

diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm
index 1b0f683..4c0e14a 100644
--- a/PVE/Storage/NexentaPlugin.pm
+++ b/PVE/Storage/NexentaPlugin.pm
@@ -481,7 +481,8 @@ sub volume_has_feature {
     my $features = {
 	snapshot => { current => 1, snap => 1},
 	clone => { base => 1},
-        copy => { base => 1, current => 1},
+	template => { current => 1},
+	copy => { base => 1, current => 1},
     };
 
     my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index ebeb78b..88e34a9 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -682,9 +682,10 @@ sub volume_has_feature {
     my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
 
     my $features = {
-        snapshot => { current => { qcow2 => 1}, snap => { qcow2 => 1} },
-        clone => { base => {qcow2 => 1, raw => 1, vmdk => 1} },
-        copy => { base => {qcow2 => 1, raw => 1, vmdk => 1},
+	snapshot => { current => { qcow2 => 1}, snap => { qcow2 => 1} },
+	clone => { base => {qcow2 => 1, raw => 1, vmdk => 1} },
+	template => { current => {qcow2 => 1, raw => 1, vmdk => 1} },
+	copy => { base => {qcow2 => 1, raw => 1, vmdk => 1},
 		  current => {qcow2 => 1, raw => 1, vmdk => 1},
 		  snap => {qcow2 => 1} },
     };
diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 00c93d2..dfc51b7 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -469,9 +469,10 @@ sub volume_has_feature {
     my ($class, $scfg, $feature, $storeid, $volname, $snapname, $running) = @_;
 
    my $features = {
-        snapshot => { current => 1, snap => 1},
-        clone => { base => 1},
-        copy => { base => 1, current => 1, snap => 1},
+	snapshot => { current => 1, snap => 1},
+	clone => { base => 1},
+	template => { current => 1},
+	copy => { base => 1, current => 1, snap => 1},
     };
 
     my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index d506b57..d14cf5b 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -432,6 +432,7 @@ sub volume_has_feature {
    my $features = {
 	snapshot => { current => 1, snap => 1},
 	clone => { base => 1},
+	template => { current => 1},
 	copy => { base => 1, current => 1, snap => 1},
     };
 
-- 
1.7.10.4




More information about the pve-devel mailing list