From ff6ffe20c9e499f8bbf999ce17901b0ece864dbc Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 30 Mar 2016 12:20:07 +0200 Subject: [PATCH] cleanup: naming consistency --- PVE/QemuServer.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 4d16036b..1cdc4dc1 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -92,7 +92,7 @@ mkdir $lock_dir; my $pcisysfs = "/sys/bus/pci"; -my $cpudesc = { +my $cpu_fmt = { cputype => { description => "Emulated CPU type.", type => 'string', @@ -386,7 +386,7 @@ EODESCR optional => 1, description => "Emulated CPU type.", type => 'string', - format => $cpudesc, + format => $cpu_fmt, }, parent => get_standard_option('pve-snapshot-name', { optional => 1, @@ -749,7 +749,7 @@ my $alldrive_fmt = { %queues_fmt, }; -my $usbformat = { +my $usb_fmt = { host => { default_key => 1, type => 'string', format => 'pve-qm-usb-device', @@ -766,7 +766,7 @@ my $usbformat = { my $usbdesc = { optional => 1, - type => 'string', format => $usbformat, + type => 'string', format => $usb_fmt, description => < { type => 'string', pattern => '[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}', @@ -1721,17 +1721,17 @@ my $smbios1_desc = { sub parse_smbios1 { my ($data) = @_; - my $res = eval { PVE::JSONSchema::parse_property_string($smbios1_desc, $data) }; + my $res = eval { PVE::JSONSchema::parse_property_string($smbios1_fmt, $data) }; warn $@ if $@; return $res; } sub print_smbios1 { my ($smbios1) = @_; - return PVE::JSONSchema::print_property_string($smbios1, $smbios1_desc); + return PVE::JSONSchema::print_property_string($smbios1, $smbios1_fmt); } -PVE::JSONSchema::register_format('pve-qm-smbios1', $smbios1_desc); +PVE::JSONSchema::register_format('pve-qm-smbios1', $smbios1_fmt); PVE::JSONSchema::register_format('pve-qm-bootdisk', \&verify_bootdisk); sub verify_bootdisk { @@ -3001,7 +3001,7 @@ sub config_to_command { my $cpu = $nokvm ? "qemu64" : "kvm64"; if (my $cputype = $conf->{cpu}) { - my $cpuconf = PVE::JSONSchema::parse_property_string($cpudesc, $cputype) + my $cpuconf = PVE::JSONSchema::parse_property_string($cpu_fmt, $cputype) or die "Cannot parse cpu description: $cputype\n"; $cpu = $cpuconf->{cputype}; $kvm_off = 1 if $cpuconf->{hidden}; -- 2.39.5