From: Fabian Grünbichler Date: Thu, 14 Apr 2016 08:34:42 +0000 (+0200) Subject: VZDump: mark 'size' as deprecated, warn if set X-Git-Url: https://git.proxmox.com/?p=pve-manager.git;a=commitdiff_plain;h=e2a2525e60ada8a308172ded5fb5d774e769ccee VZDump: mark 'size' as deprecated, warn if set this parameter should be removed in a future release, just warn and change description for now to avoid breakage. --- diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 64a11393..712c7129 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -112,7 +112,7 @@ __PACKAGE__->register_method ({ die "you can only backup a single VM with option --stdout\n" if $param->{stdout} && scalar(@vmids) != 1; - foreach my $key (qw(maxfiles tmpdir dumpdir script size bwlimit ionice)) { + foreach my $key (qw(maxfiles tmpdir dumpdir script bwlimit ionice)) { raise_param_exc({ $key => "Only root may set this option."}) if defined($param->{$key}) && ($user ne 'root@pam'); } diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 12cf5ea3..0b4f9923 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -130,7 +130,7 @@ my $confdesc = { }, size => { type => 'integer', - description => "LVM snapshot size in MB.", + description => "Unused, will be removed in a future release.", optional => 1, minimum => 500, default => 1024, @@ -1194,6 +1194,10 @@ sub verify_vzdump_parameters { $param->{all} = 1 if defined($param->{exclude}); + warn "option 'size' is deprecated and will be removed in a future " . + "release, please update your script/configuration!\n" + if defined($param->{size}); + return if !$check_missing; raise_param_exc({ vmid => "property is missing"})