mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-25 06:03:52 +03:00
add set migrate_downtime default value to 0.1 && add number type
can be integer or float ex: 1 1.0 0.3 Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
865ef13278
commit
044321910c
@ -382,10 +382,10 @@ EODESCR
|
||||
},
|
||||
migrate_downtime => {
|
||||
optional => 1,
|
||||
type => 'integer',
|
||||
type => 'number',
|
||||
description => "Set maximum tolerated downtime (in seconds) for migrations.",
|
||||
minimum => 0,
|
||||
default => 1,
|
||||
default => 0.1,
|
||||
},
|
||||
cdrom => {
|
||||
optional => 1,
|
||||
@ -1441,6 +1441,9 @@ sub check_type {
|
||||
} elsif ($type eq 'integer') {
|
||||
return int($1) if $value =~ m/^(\d+)$/;
|
||||
die "type check ('integer') failed - got '$value'\n";
|
||||
} elsif ($type eq 'number') {
|
||||
return $value if $value =~ m/^(\d+)(\.\d+)?$/;
|
||||
die "type check ('number') failed - got '$value'\n";
|
||||
} elsif ($type eq 'string') {
|
||||
if (my $fmt = $confdesc->{$key}->{format}) {
|
||||
if ($fmt eq 'pve-qm-drive') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user