mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
063caca4a8
commit
56439f3964
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user