Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Lamprecht
f289e04cbf pve machine versions: unify information into single hash and rework use sites
It's a bit nicer to avoid multiple hashes, this keeps the information
also closer together, albeit that alone wasn't the reason for doing
this because this (hopefully) will never grow that big, rather it
should encourage adding changes entries until we test for that and it
also makes handling these entries a tiny bit more natural as no
wrapper counter for-loops doing integer string interpolation are
required.

While at it expand the comment, might be even a tad to verbose now,
and add a new helper to get these per-machine revisions.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-06 19:11:21 +02:00
Thomas Lamprecht
e0095011a7 api: machine versions: avoid pushing to array if new one is created anyway
Avoid pushing our array of downstream revisions to the array of
upstream machines if we create completely new array on return anyway,
just let sort iterate over both arrays instead.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-06 19:09:40 +02:00
Thomas Lamprecht
cc5dc71a7a api: machine versions: rename description property to changes
Should better denote what this is about, the schema description called
it that already anyway. Avoid using a pve specific property name in
case we add some changes for the upstream revisions in the future.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-06 19:08:31 +02:00
Dominik Csapak
9c419d83dd 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>
2025-04-06 19:08:31 +02:00
Dominik Csapak
71f2307eaf api: qemu machine capabilities: add custom pveX versions
Add the pveX variants (where X > 0) to the list too, so one knows they
exits. Also this allows them to be shown and chosen in the UI.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@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-8-d.csapak@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-04-06 19:08:31 +02:00
Thomas Lamprecht
36b0269724 api: machine list: parse as JSON
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-05 16:33:08 +01:00
Stefan Reiter
304e51d369 api: add Machine module to query machine types
The file is provided by pve-qemu-kvm.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-03-05 16:25:28 +01:00