mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-21 18:03:56 +03: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}) {
|
||||
print "received command '$cmd'\n";
|
||||
eval {
|
||||
if ($cmd_desc->{$cmd}) {
|
||||
PVE::JSONSchema::validate($parsed, $cmd_desc->{$cmd});
|
||||
if (my $props = $cmd_desc->{$cmd}) {
|
||||
my $schema = {
|
||||
type => 'object',
|
||||
properties => $props,
|
||||
};
|
||||
PVE::JSONSchema::validate($parsed, $schema);
|
||||
} else {
|
||||
$parsed = {};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user