[pve-devel] [PATCH 08/13] forbid configuration update of a template

Alexandre Derumier aderumier at odiso.com
Tue Jan 8 15:44:49 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 91cf569..63dbd33 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -873,6 +873,8 @@ __PACKAGE__->register_method({
 	    die "checksum missmatch (file change by other user?)\n"
 		if $digest && $digest ne $conf->{digest};
 
+	    die "You can't change the configuration of a template" if $conf->{template};
+
 	    PVE::QemuServer::check_lock($conf) if !$skiplock;
 
 	    if ($param->{memory} || defined($param->{balloon})) {
-- 
1.7.10.4




More information about the pve-devel mailing list