]> git.proxmox.com Git - qemu-server.git/commitdiff
CPUConfig: add add_cpu_json_properties()
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 18 Jun 2020 09:05:07 +0000 (11:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 Jun 2020 15:11:47 +0000 (17:11 +0200)
Useful for APIs and docs.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/QemuServer/CPUConfig.pm

index b884498c76b9521b5e349885068cadafd8ef0401..62505914d39af2764046ed48072729f21c493bbe 100644 (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) = @_;