From 3b08d60dc4d68a07513cd49198e79449b6b32e51 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 11 Jun 2025 10:14:59 +0100 Subject: [PATCH] api: Address issues with server diagnostics APIs Add some missing additionalProperties=False entries. Change-Id: I4477dcb590392c189a2bd586ecd9ba4ccd35d89e --- .../compute/schemas/server_diagnostics.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/nova/api/openstack/compute/schemas/server_diagnostics.py b/nova/api/openstack/compute/schemas/server_diagnostics.py index d7209ef993..69f55c59ce 100644 --- a/nova/api/openstack/compute/schemas/server_diagnostics.py +++ b/nova/api/openstack/compute/schemas/server_diagnostics.py @@ -37,17 +37,12 @@ index_response_v248 = { 'items': { 'type': 'object', 'properties': { - 'id': { - 'type': ['integer', 'null'], - }, - 'time': { - 'type': ['integer', 'null'], - }, - 'utilisation': { - 'type': ['integer', 'null'], - }, + 'id': {'type': ['integer', 'null']}, + 'time': {'type': ['integer', 'null']}, + 'utilisation': {'type': ['integer', 'null']}, }, 'required': ['id', 'time', 'utilisation'], + 'additionalProperties': False, }, }, 'disk_details': { @@ -68,6 +63,7 @@ index_response_v248 = { 'write_bytes', 'write_requests', ], + 'additionalProperties': False, }, }, 'driver': { @@ -88,6 +84,7 @@ index_response_v248 = { 'used': {'type': ['integer', 'null']}, }, 'required': ['maximum', 'used'], + 'additionalProperties': False, }, 'nic_details': { 'type': 'array', @@ -119,6 +116,7 @@ index_response_v248 = { 'tx_packets', 'tx_rate', ], + 'additionalProperties': False, }, }, 'num_cpus': {'type': ['integer', 'null']}, @@ -152,4 +150,5 @@ index_response_v248 = { 'state', 'uptime', ], + 'additionalProperties': False, }