| #
4a102cd4
|
| 27-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
registries: make registration dynamic
Rather than having to manually hook code for registries, add a small registration function to the registry header and use this registration results throughout t
registries: make registration dynamic
Rather than having to manually hook code for registries, add a small registration function to the registry header and use this registration results throughout the registry interactions.
Tested:
Confirmed registries have same behavior.
``` $ curl -s -k https://localhost:18080/redfish/v1/Registries/ | jq '.Members | map(."@odata.id")' [ "/redfish/v1/Registries/Base", "/redfish/v1/Registries/HeartbeatEvent", "/redfish/v1/Registries/OpenBMC", "/redfish/v1/Registries/ResourceEvent", "/redfish/v1/Registries/TaskEvent", "/redfish/v1/Registries/Telemetry" ] ```
``` $ curl -s -k https://localhost:18080/redfish/v1/Registries/TaskEvent/TaskEvent | jq ".Messages | keys" [ "TaskAborted", "TaskCancelled", "TaskCompletedOK", "TaskCompletedWarning", "TaskPaused", "TaskProgressChanged", "TaskRemoved", "TaskResumed", "TaskStarted" ] ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iaa355420736a2587d9da4e995208d579443ca9b8
show more ...
|
| #
40e9b92e
|
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This pa
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This patchset does not intend to modify any intent on any existing copyrights or licenses, only to standardize their inclusion.
[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| #
56b81992
|
| 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
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>
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>
show more ...
|
| #
01c78a06
|
| 20-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
registries: iwyu
Made the auto-generated headers and the openbmc registry include what they use. Also alligned the include style.
Tested: code compiles.
Signed-off-by: Nan Zhou <nanzhoumails@gmail
registries: iwyu
Made the auto-generated headers and the openbmc registry include what they use. Also alligned the include style.
Tested: code compiles.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I6577d5e12bc02da3bd7bf5780f89a4860b314e19
show more ...
|
| #
043bec09
|
| 20-Sep-2022 |
Nan Zhou <nanzhoumails@gmail.com> |
privilege registry: simplify writing headers
This patch reused similar patterns in |REGISTRY_HEADER| so that the python code is more readable. It also moved the clang-format off macro and warning a
privilege registry: simplify writing headers
This patch reused similar patterns in |REGISTRY_HEADER| so that the python code is more readable. It also moved the clang-format off macro and warning a bit in so they are all consistent with each other.
Tested: code compiles.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: If18de0d9f89088f9b5732613ecf59520650bb11a
show more ...
|
| #
0e2d0691
|
| 01-Apr-2022 |
Jason M. Bills <jason.m.bills@intel.com> |
registries: remove hardcoded size of MessageEntry arrays
The latest C++ no longer requires the size of the array to be hardcoded.
This removes the hardcoded size to simplify changes to the message
registries: remove hardcoded size of MessageEntry arrays
The latest C++ no longer requires the size of the array to be hardcoded.
This removes the hardcoded size to simplify changes to the message arrays.
Tested: Confirmed that event Messages are still correctly generated.
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com> Change-Id: I29e6a4a02c247865c275cf4ff71587bc188d5957
show more ...
|
| #
5f2b84ee
|
| 08-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Drop message severity
In the way we store the message registry, we store both Severity and MessageSeverity. Severity as a field is deprecated, and in every case in every registry both fields have t
Drop message severity
In the way we store the message registry, we store both Severity and MessageSeverity. Severity as a field is deprecated, and in every case in every registry both fields have the same value. We shouldn't duplicate data in that way. This commit changes the parse_registries.py script to stop producing the Severity field into the struct. The few uses we have left are moved over to use MessageRegistry.
Tested:
Redfish service validator shows no errors on the /redfish/v1/Registries tree. Other errors present that were there previously and are unchanged.
This saves a trivial amount: about 1kB on our compressed binary size.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ibbaf533dc59eb08365d6ed309aba16b54bc40ca1
show more ...
|
| #
fffb8c1f
|
| 08-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Change message_registries namespace to registries
The message_registries namespace is overly wordy, and results in very long defines. Doing this one minor change reduces the code by 50 lines. This
Change message_registries namespace to registries
The message_registries namespace is overly wordy, and results in very long defines. Doing this one minor change reduces the code by 50 lines. This seems worthwhile.
Tested: Unit tests pass. Namespace change only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib1401580b3fa47596eb56cdc86e60eeeb1c2f952
show more ...
|
| #
1cf53df0
|
| 17-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Make generated warning more prominent and helpful
A number of reviews have been submitted that ignore this warning. While we now have 01caf624211197a993dbbd186149293f7053f9d8 which will catch these
Make generated warning more prominent and helpful
A number of reviews have been submitted that ignore this warning. While we now have 01caf624211197a993dbbd186149293f7053f9d8 which will catch these violations at CI time, that is arguably already too late, and developers will have wasted their time.
This commit changes the warning to be multiple lines, with a caps header, such that it's less likely to be ignored. It also adds suggestions on how to proceed.
As a note, this also standardizes privilege registry to use the same warning as the other files, which it didn't previously.
Tested: Comment changes only, no functional changes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3224130dbf581dc962187b2fde4dc98ae26de082
show more ...
|
| #
4d99bbb0
|
| 17-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Make parse_registries do whitespace properly
Previously, parse_registries was not very careful about generating readable files, and relied on clang-format to "fix" them after the fact. Given they're
Make parse_registries do whitespace properly
Previously, parse_registries was not very careful about generating readable files, and relied on clang-format to "fix" them after the fact. Given they're generated, this is unforunate, and leads to some inconsistencies in reading the generated code.
This commit changes the script to no longer rely on clang-format, and wrap the whole file in a clang-format off bracket. This means that our message registry generation will be consistent.
As an added bonus, different versions of clang-format like to format these structures differently, so this removes one possible barrier to people updating these.
This was initiated by the next patch in the series, which made a seemingly minor change to a comment, which caused a significant change in this file because of clang-format versioning.
Tested: ran parse_registries.py and saw build passing. Whitespace changes only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id48bb43dd9d8ecc83de1840f2f1045a87e2ff796
show more ...
|
| #
30a3c431
|
| 07-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Generate indexes for message registries
Being able to index into the message registry constexpr arrays will be useful in the future, so update the parse_registries script to generate an Index enum c
Generate indexes for message registries
Being able to index into the message registry constexpr arrays will be useful in the future, so update the parse_registries script to generate an Index enum class, that allows directly indexing into the constexpr table when necessary.
These indexes are used in the patchset here: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50950 to avoid a binary search lookup for each entry.
Tested: No-op change, code inspection only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I345cc26a2b17b5bcd8cfb0055642f4ae443caad4
show more ...
|
| #
ba27e59e
|
| 07-Feb-2022 |
Ed Tanous <edtanous@google.com> |
Rerun parse_registries.py
After the last string wrapping rule change, we never re-ran the script to regenerate, which puts all of these strings on their own line. While this is non-ideal for readin
Rerun parse_registries.py
After the last string wrapping rule change, we never re-ran the script to regenerate, which puts all of these strings on their own line. While this is non-ideal for reading comprehension, it's the rule we have at the moment, so we should be consistent.
12778e61c281b8f8c0f976dec225fb0c30edcb47 appears to have incorrectly checked in a bad version of the privilege registry, which this commit diffs out again. I have inspected https://redfish.dmtf.org/registries/Redfish_1.2.0_PrivilegeRegistry.json by hand, and verified that those overrides are not present.
Tested: Whitespace changes only
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I517a7cf13eba2dfd3211491c08ecce69ee68257f
show more ...
|
| #
fe4b3093
|
| 14-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Generated files should not be copyright
Because these files are generated, there is no copyright that makes sense, as these are "derivative works". sdbusplus does not include these in its generated
Generated files should not be copyright
Because these files are generated, there is no copyright that makes sense, as these are "derivative works". sdbusplus does not include these in its generated files, bmcweb should do the same.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3c729f8c03176770b31b4f54ebdbdab92daae163
show more ...
|
| #
fc8a2b87
|
| 09-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Update registries
We've had some fields get updated in the base registry that didn't seem to run the script. This commit updates us to the latest base and TaskEvent Registries. This should have no
Update registries
We've had some fields get updated in the base registry that didn't seem to run the script. This commit updates us to the latest base and TaskEvent Registries. This should have no impact.
Tested: Code compiles. No functional impact.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iea4ee79fc798b57efa0e915195f72711858c61b9
show more ...
|
| #
e7808c93
|
| 08-Jul-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Move registries to v1_4_0.MessageRegistry
This implements the MessageSeverity property which tools and users should use instead of the deprecated Severity property.
Since the registries use common
Move registries to v1_4_0.MessageRegistry
This implements the MessageSeverity property which tools and users should use instead of the deprecated Severity property.
Since the registries use common infrastructure, easiest if just bumped together and now allows grabbing the latest when implementing a new registry, e.g. ResourceEvent.
Implement this new required property, MessageSeverity, in the openbmc registry. Follow Redfish registries in having both MessageSeverity and Severity.
Modified parse_registries.py to look at latest Base and TaskEvent registries and ran parse_registries.py.
Tested: Built and validator passes. See new registries: curl -k https://$bmc/redfish/v1/Registries/Base { "@odata.id": "/redfish/v1/Registries/Base", "@odata.type": "#MessageRegistryFile.v1_1_0.MessageRegistryFile", "Description": "DMTF Base Message Registry File Location", "Id": "Base", "Languages": [ "en" ], "Languages@odata.count": 1, "Location": [ { "Language": "en", "PublicationUri": "https://redfish.dmtf.org/registries/Base.1.8.1.json", "Uri": "/redfish/v1/Registries/Base/Base" } ], ...
curl -k https://$bmc/redfish/v1/Registries/Base/Base { "@Redfish.Copyright": "Copyright 2014-2020 DMTF. All rights reserved.", "@odata.type": "#MessageRegistry.v1_4_0.MessageRegistry", "Description": "This registry defines the base messages for Redfish", "Id": "Base.1.8.1", "Language": "en", "Messages": { "AccessDenied": { "Description": "Indicates that while attempting to access, connect to or transfer to/from another resource, the service denied access.", "Message": "While attempting to establish a connection to %1, the service denied access.", "MessageSeverity": "Critical", "NumberOfArgs": 1, "ParamTypes": [ "string" ], "Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.", " ...
Change-Id: I6495af0e02036ea527036d942d6b6b5f55178bb2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
| #
e51c710e
|
| 17-Mar-2020 |
James Feist <james.feist@linux.intel.com> |
Add TaskEvent registry
This updates the parse registries script and adds the task registry to be used by task service. This templates the original Base Registry so it can be reused for all registrie
Add TaskEvent registry
This updates the parse registries script and adds the task registry to be used by task service. This templates the original Base Registry so it can be reused for all registries.
Tested: script works, validator passes
Change-Id: Id1cf3a41fb76ccaadace114725480f410bfba3e8 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|