]> git.proxmox.com Git - pve-manager.git/commitdiff
VZDump: mark 'size' as deprecated, warn if set
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 14 Apr 2016 08:34:42 +0000 (10:34 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Apr 2016 08:39:45 +0000 (10:39 +0200)
this parameter should be removed in a future release, just
warn and change description for now to avoid breakage.

PVE/API2/VZDump.pm
PVE/VZDump.pm

index 64a113930be81dc723cb4b398bf2ec053e3526fb..712c7129915e5f2219166af4cd7204ee325a98a2 100644 (file)
@@ -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');        
        }
index 12cf5ea371df24bb44a8c9ad3f7f3ecd02ee28dd..0b4f9923284982d95d3472bce6683272b791906f 100644 (file)
@@ -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"})