cleanup validate_cpu_conf

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-11-15 08:49:04 +01:00
parent 74fe3d9a7b
commit 05eae0f21f

View File

@ -192,11 +192,8 @@ sub parse_phys_bits {
PVE::JSONSchema::register_format('pve-cpu-conf', $cpu_fmt, \&validate_cpu_conf); PVE::JSONSchema::register_format('pve-cpu-conf', $cpu_fmt, \&validate_cpu_conf);
sub validate_cpu_conf { sub validate_cpu_conf {
my ($cpu) = @_; my ($cpu) = @_;
# required, but can't be forced in schema since it's encoded in section header for custom models
# required, but can't be forced in schema since it's encoded in section
# header for custom models
die "CPU is missing cputype\n" if !$cpu->{cputype}; die "CPU is missing cputype\n" if !$cpu->{cputype};
return $cpu; return $cpu;
} }
PVE::JSONSchema::register_format('pve-vm-cpu-conf', $cpu_fmt, \&validate_vm_cpu_conf); PVE::JSONSchema::register_format('pve-vm-cpu-conf', $cpu_fmt, \&validate_vm_cpu_conf);