Make message registries use 2 digit versions
Redfish specification, section 9.5.11.2 says:
The MessageId property value shall be in the format:
<MessageRegistryPrefix>.<MajorVersion>.<MinorVersion>.<MessageKey>
bmcweb in certain places has incorrectly used the 3 digit version
instead of the 2 digit version. This commit fixes that by modifying the
parse_registries script to generate 3 separate struct entries to
represent the registry version, and parse them where appropriate.
MessageRegistryFileCollection uses the 3 digit version. No behavior
changes.
Message/event log entries use the 2 digit version. This will cause a
MessageId change from:
Base.1.19.0.InternalError
to
Base.1.19.InternalError
This is a breaking change, so a new option to allow the old behavior is
provided.
Tested: Redfish Service validator passes.
Heartbeat events on EventService show 2 digit versions.
Change-Id: I4165e994f73e200f13bed8ea76cb58bee2b69faa
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/meson.options b/meson.options
index d5b44bd..915f427 100644
--- a/meson.options
+++ b/meson.options
@@ -25,6 +25,17 @@
https://github.com/openbmc/jsnbd/blob/master/README.''',
)
+option(
+ 'redfish-use-3-digit-messageid',
+ type: 'feature',
+ value: 'disabled',
+ description: '''Prior to a bug fix, bmcweb exposed error messages with a
+ MessageId of Base.x.y.z.Message which was incorrect.
+ Enabling this option causes return codes to return the old
+ incorrect version for backward compatibility. Will be
+ removed Q2-2025'''
+)
+
# BMCWEB_NBDPROXY
# if you use this option and are seeing this comment, please comment here:
# https://github.com/openbmc/bmcweb/issues/188 and put forward your intentions