vmm: deprecate legacy SMBIOS keys in API and CLI

Mark serial_number/uuid as deprecated in the OpenAPI schema and emit
warnings when those legacy --platform keys are used, while continuing to
accept them for compatibility.

On-behalf-of: SAP leander.kohler@sap.com
Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
This commit is contained in:
Leander Kohler
2026-02-09 11:53:00 +01:00
committed by Rob Bradford
parent 063caca4a8
commit 56439f3964
2 changed files with 8 additions and 0 deletions

View File

@@ -790,10 +790,12 @@ components:
type: string
serial_number:
type: string
deprecated: true
system_uuid:
type: string
uuid:
type: string
deprecated: true
oem_strings:
type: array
items:

View File

@@ -1002,6 +1002,9 @@ impl PlatformConfig {
let legacy_serial_number = parser
.convert::<String>("serial_number")
.map_err(Error::ParsePlatform)?;
if legacy_serial_number.is_some() {
warn!("'serial_number' in --platform is deprecated; use 'system_serial_number'.");
}
platform_config.system_serial_number = platform_config
.system_serial_number
.or(legacy_serial_number);
@@ -1009,6 +1012,9 @@ impl PlatformConfig {
let legacy_uuid = parser
.convert::<String>("uuid")
.map_err(Error::ParsePlatform)?;
if legacy_uuid.is_some() {
warn!("'uuid' in --platform is deprecated; use 'system_uuid'.");
}
platform_config.system_uuid = platform_config.system_uuid.or(legacy_uuid);
Ok(platform_config)