mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-01-04 21:41:15 +00:00
api: qemu machine capabilities: add description for pveX variants
and retroactively add descriptions for previous bumps. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com> Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com> Link: https://lore.proxmox.com/20250404125345.3244659-9-d.csapak@proxmox.com Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
71f2307eaf
commit
9c419d83dd
@ -46,6 +46,12 @@ __PACKAGE__->register_method({
|
||||
type => 'string',
|
||||
description => "The machine version.",
|
||||
},
|
||||
description => {
|
||||
type => 'string',
|
||||
optional => 1,
|
||||
description => 'Notable changes that version introduces, only used for +pveX"
|
||||
." versions.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -67,6 +73,9 @@ __PACKAGE__->register_method({
|
||||
version => $version,
|
||||
};
|
||||
|
||||
my $desc = PVE::QemuServer::Machine::get_pve_version_description($version);
|
||||
$entry->{description} = $desc if defined($desc);
|
||||
|
||||
push $to_add->@*, $entry;
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,21 @@ our $PVE_MACHINE_VERSION = {
|
||||
'9.2' => 1,
|
||||
};
|
||||
|
||||
# When bumping the pveX version, add a description why.
|
||||
my $PVE_MACHINE_VERSION_DESCRIPTIONS = {
|
||||
'4.1+pve1' => 'Introduction of pveX versioning, no changes.',
|
||||
'4.1+pve2' => 'Increases supported SCSI drive count.',
|
||||
'9.2+pve1' => 'Disables S3/S4 power states. These are often problematic in virtualized guests.',
|
||||
};
|
||||
|
||||
# returns the description of a given machine version with pve version, e.g. 9.2+pve1 or undef if
|
||||
# there is none
|
||||
sub get_pve_version_description {
|
||||
my ($version) = @_;
|
||||
|
||||
return $PVE_MACHINE_VERSION_DESCRIPTIONS->{$version};
|
||||
}
|
||||
|
||||
my $machine_fmt = {
|
||||
type => {
|
||||
default_key => 1,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user