From 438fd6220a1647cfc9fe6ff09ab65482df7ffcc6 Mon Sep 17 00:00:00 2001 From: Alexon Oliveira Date: Mon, 15 Apr 2024 13:31:08 -0300 Subject: [PATCH] Remove deprecation warning by setting schema Closes-Bug: #2061160 Change-Id: Ie5af73dd1b8af29734d1cf34b070e2a2bbc09949 Signed-off-by: Alexon Oliveira (cherry picked from commit 668dd24108f63418c7dae4df16526acbfd8daf9c) --- ironic/drivers/modules/redfish/firmware_utils.py | 2 +- releasenotes/notes/2061160-5e080a17ae31fb53.yaml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/2061160-5e080a17ae31fb53.yaml diff --git a/ironic/drivers/modules/redfish/firmware_utils.py b/ironic/drivers/modules/redfish/firmware_utils.py index f4752776fc..a09b339619 100644 --- a/ironic/drivers/modules/redfish/firmware_utils.py +++ b/ironic/drivers/modules/redfish/firmware_utils.py @@ -30,7 +30,7 @@ from ironic.drivers.modules.redfish import utils as redfish_utils LOG = log.getLogger(__name__) _UPDATE_FIRMWARE_SCHEMA = { - "$schema": "http://json-schema.org/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "update_firmware clean step schema", "type": "array", # list of firmware update images diff --git a/releasenotes/notes/2061160-5e080a17ae31fb53.yaml b/releasenotes/notes/2061160-5e080a17ae31fb53.yaml new file mode 100644 index 0000000000..5354aa543b --- /dev/null +++ b/releasenotes/notes/2061160-5e080a17ae31fb53.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixes an issue with units tests that show this DeprecationWarning: + The metaschema specified by $schema was not found. Using the latest + draft to validate, but this will raise an error in the future. + cls = validator_for(schema) + Removed the warning for deprecated schema by using a new template.