From aecf852b661692af1b266d2342c28b018ab95bd1 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 18 Aug 2025 16:13:46 +0100 Subject: [PATCH] api: Fix validators for hw:cpu_max_* extra specs We also fix a typo. Change-Id: I38d03a860ccef6d1efb19b3c465411a352bb7971 Signed-off-by: Stephen Finucane Closes-bug: #2120862 (cherry picked from commit 4119634bf1f35f2c6ac3c388b5f53d509bd4ed48) --- nova/api/validation/extra_specs/hw.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nova/api/validation/extra_specs/hw.py b/nova/api/validation/extra_specs/hw.py index ab558d432c68..0ab45bd24d2b 100644 --- a/nova/api/validation/extra_specs/hw.py +++ b/nova/api/validation/extra_specs/hw.py @@ -278,7 +278,7 @@ cpu_topology_validators = [ base.ExtraSpecValidator( name='hw:cpu_sockets', description=( - 'The number of virtual CPU threads to emulate in the guest ' + 'The number of virtual CPU sockets to emulate in the guest ' 'CPU topology. ' 'Defaults to the number of vCPUs requested. ' 'Only supported by the libvirt virt driver.' @@ -318,9 +318,9 @@ cpu_topology_validators = [ }, ), base.ExtraSpecValidator( - name='hw:max_cpu_sockets', + name='hw:cpu_max_sockets', description=( - 'The max number of virtual CPU threads to emulate in the ' + 'The max number of virtual CPU sockets to emulate in the ' 'guest CPU topology. ' 'This is used to limit the topologies that can be requested by ' 'an image and will be used to validate the ``hw_cpu_sockets`` ' @@ -334,7 +334,7 @@ cpu_topology_validators = [ }, ), base.ExtraSpecValidator( - name='hw:max_cpu_cores', + name='hw:cpu_max_cores', description=( 'The max number of virtual CPU cores to emulate per socket in the ' 'guest CPU topology. ' @@ -350,7 +350,7 @@ cpu_topology_validators = [ }, ), base.ExtraSpecValidator( - name='hw:max_cpu_threads', + name='hw:cpu_max_threads', description=( 'The max number of virtual CPU threads to emulate per core in the ' 'guest CPU topology. '