[pve-devel] [PATCH container] require -experimental for pct clone and template

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Mar 15 09:01:18 CET 2016


---
Note: this should be removed again when template/clone is stable for LXC

 src/PVE/API2/LXC.pm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 12e97f4..2f1011a 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -906,6 +906,12 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid', { completion => \&PVE::LXC::complete_ctid_stopped }),
+	    experimental => {
+		type => 'boolean',
+		description => "The template feature is experimental, set this " .
+		    "flag if you know what you are doing.",
+		default => 0,
+	    },
 	},
     },
     returns => { type => 'null'},
@@ -1011,6 +1017,12 @@ __PACKAGE__->register_method({
 		    "you clone a normal CT. For CT templates, we try to create a linked clone by default.",
 		default => 0,
 	    },
+	    experimental => {
+		type => 'boolean',
+		description => "The clone feature is experimental, set this " .
+		    "flag if you know what you are doing.",
+		default => 0,
+	    },
 #	    target => get_standard_option('pve-node', {
 #		description => "Target node. Only allowed if the original VM is on shared storage.",
 #		optional => 1,
-- 
2.1.4





More information about the pve-devel mailing list