CPUConfig: add add_cpu_json_properties()

Useful for APIs and docs.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2020-06-18 11:05:07 +02:00 committed by Thomas Lamprecht
parent b63f34b8a1
commit 1b7824d349

View File

@ -293,6 +293,16 @@ sub write_config {
$class->SUPER::write_config($filename, $cfg);
}
sub add_cpu_json_properties {
my ($prop) = @_;
foreach my $opt (keys %$cpu_fmt) {
$prop->{$opt} = $cpu_fmt->{$opt};
}
return $prop;
}
sub get_cpu_models {
my ($include_custom) = @_;