mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-05 02:53:59 +00:00
remote migration: enable schema validation
by wrapping the properties from the command definition to get an actual schema definition. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
ce8a5a4b7e
commit
44da74c5ce
@ -6006,8 +6006,12 @@ __PACKAGE__->register_method({
|
|||||||
} elsif (my $handler = $cmd_handlers->{$cmd}) {
|
} elsif (my $handler = $cmd_handlers->{$cmd}) {
|
||||||
print "received command '$cmd'\n";
|
print "received command '$cmd'\n";
|
||||||
eval {
|
eval {
|
||||||
if ($cmd_desc->{$cmd}) {
|
if (my $props = $cmd_desc->{$cmd}) {
|
||||||
PVE::JSONSchema::validate($parsed, $cmd_desc->{$cmd});
|
my $schema = {
|
||||||
|
type => 'object',
|
||||||
|
properties => $props,
|
||||||
|
};
|
||||||
|
PVE::JSONSchema::validate($parsed, $schema);
|
||||||
} else {
|
} else {
|
||||||
$parsed = {};
|
$parsed = {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user