#
6c038f26 |
| 14-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Roll out error message utils
This code should really be in a cpp/hpp file, not in a generated python script. The python script housed this temporarily to allow us to generate the registries. It's
Roll out error message utils
This code should really be in a cpp/hpp file, not in a generated python script. The python script housed this temporarily to allow us to generate the registries. It's time to roll it out.
Tested: Message registries generate successfully on GET. Redfish service validator passes.
Change-Id: I7aca2d0a7fac6d530511421b667ff732617df61e Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
a8a5bc1b |
| 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate heartbeat registry
Generate the heartbeat registry, and adjust the #includes of the other generated registries.
Tested: Redfish service validator succeeds.
Change-Id: Iedbf1ae8dc655966669
Generate heartbeat registry
Generate the heartbeat registry, and adjust the #includes of the other generated registries.
Tested: Redfish service validator succeeds.
Change-Id: Iedbf1ae8dc6559666691f1feb71af08e856d5c80 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
352945bb |
| 18-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Update base registry keys to 1.19
This has been incorrect for a while now. Update the version string so it's generated automatically.
Tested: Redfish service validator passes Redfish protocol vali
Update base registry keys to 1.19
This has been incorrect for a while now. Update the version string so it's generated automatically.
Tested: Redfish service validator passes Redfish protocol validator passes
Change-Id: I7abaf5c523c82a61331e5d696b498a35c2cf3788 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
644cdcb8 |
| 17-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Make all ints size_t
We should be consistent when we declare index types. Nlohmann uses an underlying uint64_t as the integer type, so use that for all index types.
Size_t is directly creatable fr
Make all ints size_t
We should be consistent when we declare index types. Nlohmann uses an underlying uint64_t as the integer type, so use that for all index types.
Size_t is directly creatable from it in both 32 and 64 bit modes.
Tested: On last patch in series.
Change-Id: Id1da0e7be2e2046bdbd732247d208b6e9e8c008c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
f8cca876 |
| 17-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Order by order in DMTF registry
The DMTF registry has a defined order. Previously these were randomly ordered dependent on the hash function used when they were generated years ago.
Functionally t
Order by order in DMTF registry
The DMTF registry has a defined order. Previously these were randomly ordered dependent on the hash function used when they were generated years ago.
Functionally the only change here is to parse_registries.py, to remove the sorting, then to regenerate the files.
Tested: On last patch in series.
Change-Id: I7432c26ec4a1b18acf63ece85500df370f4758d3 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
c87294a6 |
| 17-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove InvalidUpload response code
Invalid response is something from the openbmc registry, so it's not a valid thing to return as a response code. For this patch, remove the generated error messag
Remove InvalidUpload response code
Invalid response is something from the openbmc registry, so it's not a valid thing to return as a response code. For this patch, remove the generated error message, and replace the one place it's used with internalError.
Tested: On last patch in series.
Change-Id: I8215935f00923c72fd7763645c06d0b6af73c01d Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
42079ecb |
| 16-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Generate error messages for Redfish
error_messages.hpp and error_messages.cpp were at one time generated. That script has been lost to the sands of time, and since then there's been lots of places w
Generate error messages for Redfish
error_messages.hpp and error_messages.cpp were at one time generated. That script has been lost to the sands of time, and since then there's been lots of places where we've been inconsistent, or updated our base registry without updating the generated code. This causes wording, syntax, and other errors.
This commit updates the script to simply generate this header with the intent of generating it from here on out and avoid issues. As written, goes to great lengths to generate exactly the same code, and make only changes to the doxygen comments, and add the missing types. This is done to allow for easy diffing that nothing important has changed.
Testing on last patch in series.
Change-Id: Ic1da1c02519098bdb53656d94a458b78c67d25bb Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
aaebeaaf |
| 17-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Rename parameters to keep convention
These two properties were added with argument names that while more descriptive than most, prevent us from generating this file automatically.
Rename to arg1 an
Rename parameters to keep convention
These two properties were added with argument names that while more descriptive than most, prevent us from generating this file automatically.
Rename to arg1 and arg2.
Tested: at end of series.
Change-Id: I2ddb675bd5e0770583d0a4de105c8eb3b54993d7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
7585b760 |
| 17-Oct-2024 |
Jishnu CM <jishnunambiarcm@duck.com> |
Adds redfish error for GenerateSecretKeyRequired
This commit contains the redfish error to be returned when it finds that MFA is enabled and the user has to generate secret key to proceed further.
Adds redfish error for GenerateSecretKeyRequired
This commit contains the redfish error to be returned when it finds that MFA is enabled and the user has to generate secret key to proceed further.
Used and tested in https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74938.
Change-Id: If13b96729510fc7b165aa792f1e1d23a811ca733 Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
show more ...
|
#
6be832e2 |
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that c
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that can likely be had.
[1] https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=edtanous_bmcweb&open=AY9_HYjgKXKyw1ZFwgVP
Tested: Comment change only. Code compiles.
Change-Id: Ia960317761f558a87842347ca0b5f3da63f8e730 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
478b7adf |
| 15-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove IWYU pragmas
These were added as part of d5c80ad9c07b94465d8ea62d2b6f87c30cac765e: test treewide: iwyu
Since then, Nan hasn't been very active on the project, and to my knowledge, since the
Remove IWYU pragmas
These were added as part of d5c80ad9c07b94465d8ea62d2b6f87c30cac765e: test treewide: iwyu
Since then, Nan hasn't been very active on the project, and to my knowledge, since the initial run, we've never used IWYU again.
clang-include-cleaner seems to work well without needing these pragmas, and is what we're using, even if it's less useful than IWYU.
Remove all mention of IWYU.
Tested: Code compiles.
Change-Id: I06feedeeac9a114f5bdec81d59ca83223efd8aa7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
b54eb49f |
| 23-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Add property error
PropertyError is defined in the DMTF schemas, and will be used in the next patchset.
Tested: Code compiles. No functional changes.
Change-Id: Ib5f0e2025e07c9add41e5e8df8288d7e5
Add property error
PropertyError is defined in the DMTF schemas, and will be used in the next patchset.
Tested: Code compiles. No functional changes.
Change-Id: Ib5f0e2025e07c9add41e5e8df8288d7e54104ee7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
bd79bce8 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
fa345c78 |
| 16-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Add EventBufferExceeded message
This is a method that exists in the base registry that we will use in the next commit.
Tested: Code compiles. Code is not yet used.
Change-Id: I02e81371adeb8d3e2c2
Add EventBufferExceeded message
This is a method that exists in the base registry that we will use in the next commit.
Tested: Code compiles. Code is not yet used.
Change-Id: I02e81371adeb8d3e2c2515a8af94b9a1ac0973a9 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
4a7fbefd |
| 06-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Fix large copies with url_view and segments_view
Despite these objects being called "view" they are still relatively large, as clang-tidy correctly flags, and we ignore.
Change all function uses to
Fix large copies with url_view and segments_view
Despite these objects being called "view" they are still relatively large, as clang-tidy correctly flags, and we ignore.
Change all function uses to capture by: const boost::urls::url_view_base&
Which is the base class of all boost URL types, and any class (url, url_view, etc) is convertible to that base.
Change-Id: I8ee2ea3f4cfba38331303a7e4eb520a2b6f8ba92 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
1827b4f1 |
| 03-Apr-2024 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Move to Redfish Action specific setProperty call
This commit will migrate all the setProperty calls initiated by a redfish"Action" to "setDbusProperty" method in Redfish namespace that handles all D
Move to Redfish Action specific setProperty call
This commit will migrate all the setProperty calls initiated by a redfish"Action" to "setDbusProperty" method in Redfish namespace that handles all DBuserrors in a consistent manner.
This method will determine if a setProperty is called during redfish "Action" or just setting of a dbus property and internally call appropriate methods that handles different set of errors.
All the Redfish action specific errors are defined in error_messages.hpp file. This specific change moves setProperty call in hypervisor_system.hpp and covers errors in the mentioned file only.
Tested-By: <Yet to test this usecase>
Change-Id: I3da48fbeabcdcf088c4481021232f08a44797c86 Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
367b3dce |
| 17-Jan-2024 |
Ginu George <ginugeorge@ami.com> |
Pass correct Argument Types to propertyValueIncorrect Error Message
Changed the code to pass the parameters according to their types.
Tested: Code Compiles properly and tested.
Change-Id: Ie0e13d3
Pass correct Argument Types to propertyValueIncorrect Error Message
Changed the code to pass the parameters according to their types.
Tested: Code Compiles properly and tested.
Change-Id: Ie0e13d39cd892afda36dfabec871f0fe8d8498e4 Signed-off-by: Ginu George <ginugeorge@ami.com>
show more ...
|
#
8ece0e45 |
| 02-Jan-2024 |
Ed Tanous <ed@tanous.net> |
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")
At some point in the future, we might want to get this enabled in CI.
Change-Id: Iccb57b2adfd06a2
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")
At some point in the future, we might want to get this enabled in CI.
Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
d85418e3 |
| 23-Jun-2023 |
Patrick Williams <patrick@stwcx.xyz> |
error_messages: remove source_location indirect
clang-16 now supports std::source_location so remove the indirection that uses experimental::source_location in some cases.
Tested: Compiled with `CX
error_messages: remove source_location indirect
clang-16 now supports std::source_location so remove the indirection that uses experimental::source_location in some cases.
Tested: Compiled with `CXX=clang++`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id55bdf01855206c6892684e1e56cc5ff56e2b5a2
show more ...
|
#
95b3ad73 |
| 27-Jun-2022 |
Ed Tanous <edtanous@google.com> |
Make redfish::messages rely on typesafe structures
The previous patches modified these fields one at a time, for the cases where we had code calling these in odd ways. This commit goes and effects
Make redfish::messages rely on typesafe structures
The previous patches modified these fields one at a time, for the cases where we had code calling these in odd ways. This commit goes and effects the same change on the rest of the message handlers where it makes sense.
Any input to a message function that mentions a "value" replaces the value with a nlohmann::json object, to make calling this code easier.
The one exception is StringValueTooLong, which by definition, requires the input value to be a string, so that is left as string_view intentionally.
Tested: Dead unused code. Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I00b9804b2aadf5584032be91a0ee53b9a94a7430
show more ...
|
#
14fbced6 |
| 27-Jun-2022 |
Ed Tanous <edtanous@google.com> |
Make propertyValueIncorrect typesafe
Similar to the previous patches, make propertyValueIncorrect accept a nlohmann::json object as input. This removes the need for the dump() call, which oddly eno
Make propertyValueIncorrect typesafe
Similar to the previous patches, make propertyValueIncorrect accept a nlohmann::json object as input. This removes the need for the dump() call, which oddly enough, in our one usage, was actually incorrect, and could cause bmcweb to throw an exception in parsing in theory.
Tested: Only used in one error condition. Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie35d61101c2db88b16d42d71e66bceef540e8429
show more ...
|
#
f818b04d |
| 27-Jun-2022 |
Ed Tanous <edtanous@google.com> |
Make propertyValueFormatError more typesafe
Similar to other patches, make propertyValueFormatError accept a nlohmann::json object, which removes a lot of the unsafe dump code that we have littered
Make propertyValueFormatError more typesafe
Similar to other patches, make propertyValueFormatError accept a nlohmann::json object, which removes a lot of the unsafe dump code that we have littered about.
Tested: No easy to replicate error. Code is identical to previous patchsets. Inspection and code compilation only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic9d0f196b6e198073189f744b738db7ffa2f1b74
show more ...
|
#
2e8c4bda |
| 27-Jun-2022 |
Ed Tanous <edtanous@google.com> |
Make propertyValueTypeError more typesafe
Similar to the prior patchset in this series, propertyValueTypeError can be moved to safer constructs. This ensures that we are minimizing how many places
Make propertyValueTypeError more typesafe
Similar to the prior patchset in this series, propertyValueTypeError can be moved to safer constructs. This ensures that we are minimizing how many places we are calling dump() from, and allows us to reduce the amount of code written for error handling.
Tested: PATCH /redfish/v1/SessionService {"SessionTimeout": "foo"}
Returns PropertyValueTypeError in the same behavior as prior to this patch.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iddff4b787f35c49bf923663d61bba156687f358c
show more ...
|
#
e2616cc5 |
| 27-Jun-2022 |
Ed Tanous <edtanous@google.com> |
Make propertyValueNotInList typesafe
The error codes for this function accept a string_view, which has caused a number of cases of users of this function to call dump() to_string() and all manner of
Make propertyValueNotInList typesafe
The error codes for this function accept a string_view, which has caused a number of cases of users of this function to call dump() to_string() and all manner of other conversions. Considering that dump() is something that's difficult to call correctly, and overly wordy, it would be ideal if the message code just handled that for us.
Therefore, this commit changes the prototype to include a nlohmann::json object as an argument instead of string_view, then audits the codebase for all uses, and moves them to a more normalized usage, which allows the calling code to call "dump" for them.
Tested: PATCH /redfish/v1/SessionService {"SessionTimeout": 1}
Returns the PropertyValueNotInList error as it did before.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If62909072db1f067ad1f8aa590bb716c84181219
show more ...
|
#
c1c7b94b |
| 02-Jun-2023 |
Ed Tanous <edtanous@google.com> |
Remove duplicated stringValueTooLong
This prototype got added twice, once with int as a value, and once with size_t. This builds fine in 64 bit, but in 32 bit, fails.
Tested: Code compiles
Signed
Remove duplicated stringValueTooLong
This prototype got added twice, once with int as a value, and once with size_t. This builds fine in 64 bit, but in 32 bit, fails.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie3de779330d768cdd84d5647d242d5fe447d2a85
show more ...
|