b5edf03c | 09-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Sort compiler args
For all of our -Wno-* compiler args, sort them alphabetically.
Tested: Code compiles.
Change-Id: I119a8107aa5629fdc4b8c0d535a04a4c58be96ce Signed-off-by: Ed Tanous <etanous@nvid
Sort compiler args
For all of our -Wno-* compiler args, sort them alphabetically.
Tested: Code compiles.
Change-Id: I119a8107aa5629fdc4b8c0d535a04a4c58be96ce Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
3d21c59f | 08-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Update boost to 1.87
Subproject seems to build. No need to hold this back.
Change-Id: I415c736af512d951278a252329028870c051bbbf Signed-off-by: Ed Tanous <etanous@nvidia.com> |
f2cd7665 | 08-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Add missing pragma once
This was found when running gcc -ftime-report, which at the end flags this as possibly missing include header.
This appears to have been missed in f51d863523b7bfec5c45b0a847
Add missing pragma once
This was found when running gcc -ftime-report, which at the end flags this as possibly missing include header.
This appears to have been missed in f51d863523b7bfec5c45b0a847178b5d853404d9 where this was initially added. Add it.
Tested: code compiles
Change-Id: I31e0ea55c080c239edcd366627ce0829ef9ac41b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
80d2ef31 | 04-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Implement urlsafe base64 decode
base64 decoding comes in two flavors, "normal" which we already implement, and "url safe" which modifies the alphabet to create base64 encodings that are safe to use
Implement urlsafe base64 decode
base64 decoding comes in two flavors, "normal" which we already implement, and "url safe" which modifies the alphabet to create base64 encodings that are safe to use in filenames and urls. Functionally this just involves swapping two characters with underscore and minus in the encode/decode table. To avoid duplicating a lot of code, this commit refactors the base64 tables to be generated at compile time.
Tested: Included unit tests pass. No usage until next commit.
Change-Id: I71724fd2e04000f115c22a40d382d411986d7b39 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
4a19a7b5 | 27-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Deduplicate event ids
Redfish specification states: ``` The value of the id field shall be the same as the Id property in the event payload. The value of the Id property in the event payload should
Deduplicate event ids
Redfish specification states: ``` The value of the id field shall be the same as the Id property in the event payload. The value of the Id property in the event payload should be the same as the EventId property of the last event record in the Events array. The value of the EventId property for an event record should be a positive integer value and should be generated in a sequential manner. ```
The event service code did not implement that correctly. So: 1. Add ID fields for all events. 2. Remove the per-sse connection id field and rely solely on EventServiceManager. 3. Make sure all paths, (including metric report) are generating an event id that's based on the eventservice event id
Tested: Redfish event listener now sees events populated. LastEventId when sent to the SSE socket now sees a contiguous id.
``` uri=$(curl -s --user "root:0penBmc" -k "https://192.168.7.2/redfish/v1/EventService" | jq -r .ServerSentEventUri) curl -u root:0penBmc -vvv -k -N -H "Accept: text/event-stream" -H "Last-Event-Id: 0" "https://192.168.7.2$uri" ```
Change-Id: Ic32e036f40a53a9b2715639ae384d7891c768260 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
8b078385 | 31-Jan-2025 |
rohitpai <rohitpai77@gmail.com> |
Fix Message arg error in JSON Patch
When array/vector object is expected in JSON patch the error info does not contain the actual wrong property instead shows "null". Fix is to correct the value in
Fix Message arg error in JSON Patch
When array/vector object is expected in JSON patch the error info does not contain the actual wrong property instead shows "null". Fix is to correct the value in the error info.
Tested - add new test case to verify this - unit tests are passing.
Change-Id: Ica26ac9e501b5a34a5b118769cc1917eeab30524 Signed-off-by: rohitpai <rohitpai77@gmail.com>
show more ...
|
504af5a0 | 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
92e11bf8 | 31-Jan-2025 |
Myung Bae <myungbae@us.ibm.com> |
Use specific misc-include-cleaner statement
There are a few places that which clang-tidy seems reporting false-positives and which can be suppressed either via using `modernize-deprecated-headers`
Use specific misc-include-cleaner statement
There are a few places that which clang-tidy seems reporting false-positives and which can be suppressed either via using `modernize-deprecated-headers` or more targeted inline `misc-include-cleaner` statement.
Tested: Compiles
Change-Id: Ib609adbe8619f4b9a84e08388eea1e7cee58aa54 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
1e4bc6ff | 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I76fbfada6f32c42209409e46aaa02b03b106416b Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
2405091d | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I8791a2ead41116fb1fe087de7f3825a9482ec863 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
5d92fffc | 28-Jan-2025 |
rohitpai <rohitpai77@gmail.com> |
Move error code utils into new file
Error code utils can be used for aggregating error responses from multiples responses including use case for managing separate route handlers for OEM namespace
T
Move error code utils into new file
Error code utils can be used for aggregating error responses from multiples responses including use case for managing separate route handlers for OEM namespace
Tests Units tests are passing.
Change-Id: I2223d41fb318c0276de1ca64dd3e841bb988d902 Signed-off-by: rohitpai <rohitpai77@gmail.com>
show more ...
|
4aad6ed2 | 30-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Ignore header failures on registries
The generated registries have an imperfect handling of #include dependencies. Update the script to ignore the misc-include-cleaner recommendations for now. Fut
Ignore header failures on registries
The generated registries have an imperfect handling of #include dependencies. Update the script to ignore the misc-include-cleaner recommendations for now. Future fixes could be done to make these generated headers actually correctly include their dependencies, but that is non trivial to do, and the build is broken.
Change-Id: I32c70e9f865ca7ef693c736a45b3ea59513a751d Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
9838eb20 | 29-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Move io context to singleton
The way we pass around io contexts is somewhat odd. Boost maintainers in slack recommended that we just have a method that returns an io context, and from there we can
Move io context to singleton
The way we pass around io contexts is somewhat odd. Boost maintainers in slack recommended that we just have a method that returns an io context, and from there we can control this (context link lost years ago).
The new version of clang claims the singleton pattern of passing in an io_context pattern is a potential nullptr dereference. It's technically correct, as calling the singleton without immediately initializing the io context will lead to a crash.
This commit implements what the boost maintainers suggested, having a single method that returns "the context" that should be used. This also helps to maintain isolation, as some pieces are no longer tied directly to dbus to get their reactor.
Tested: WIP
Change-Id: Ifaa11335ae00a3d092ecfdfb26a38380227e8576 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
d7857201 | 28-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing significantly more headers than previously. That is overall a good thing, but forces us to fix some issues. This commit is
Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing significantly more headers than previously. That is overall a good thing, but forces us to fix some issues. This commit is largely just taking the clang-recommended fixes and checking them in. Subsequent patches will fix the more unique issues.
Note, that a number of new ignores are added into the .clang-tidy file. These can be cleaned up over time as they're understood. The majority are places where boost includes a impl/x.hpp and x.hpp, but expects you to use the later. include-cleaner opts for the impl, but it isn't clear why.
Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
3d66430a | 29-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Move hostlogger utilities
clang-tidy misc-include-fixer tries to remove the log_services.hpp include from systems_logsevices_hostlogger.hpp file. This causes these two helper functions to go missin
Move hostlogger utilities
clang-tidy misc-include-fixer tries to remove the log_services.hpp include from systems_logsevices_hostlogger.hpp file. This causes these two helper functions to go missing.
These arguably should've been moved in 7945eeed0fe8f9c7bf07669294499ae0108da1d3 where we created this file, but the second best time to plant a tree is now, so move them.
Tested: Code compiles. No test harnesses for hostlogger.
Change-Id: Ic0693472deb6c3bd355f042a0105661fa0873dfe Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
cf91c8c4 | 24-Jan-2025 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Fix crash when modifying static v6 default gateway
When modifying a static default gateway, the existing entry is deleted, and a new D-Bus object is created with the updated gateway.
Currently, thi
Fix crash when modifying static v6 default gateway
When modifying a static default gateway, the existing entry is deleted, and a new D-Bus object is created with the updated gateway.
Currently, this operation fails with an Internal Server Error and causes a bmcweb crash because the gateway value is passed as a std::string_view. Debugging revealed that the data's lifetime ends before it is accessed.
This commit resolves the issue by replacing std::string_view with const std::string&.
Tested By: Assuming there are currently three IPv6StaticDefaultGateways configured, the following command modifies the second entry:
''' PATCH -D patch.txt -d '{"IPv6StaticDefaultGateways": [{},{"Address": "<new modified gateway>"},{}]}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth1 '''
Change-Id: I1bd18005fb71a1567b1844b04c4cc4cd322cdf6e Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
show more ...
|
d2ec1bd7 | 27-Jan-2025 |
Gunnar Mills <gmills@us.ibm.com> |
Update symlinks for 2024.4
Wrote a quick bash script to update these symlinks.
These are versioned out in json schema directory[1].
The symlinks don't work without this update.
[1]: https://githu
Update symlinks for 2024.4
Wrote a quick bash script to update these symlinks.
These are versioned out in json schema directory[1].
The symlinks don't work without this update.
[1]: https://github.com/openbmc/bmcweb/tree/master/redfish-core/schema/dmtf/json-schema
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/77412 pulled in 2024.2
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74676 did this for 2024.3
Tested: Cat a few of these links. They appear to work. Before: ``` head -n 4 redfish-core/schema/dmtf/json-schema-installed/ComputerSystem.v1_*.json head: cannot open 'redfish-core/schema/dmtf/json-schema-installed/ComputerSystem.v1_23_0.json' for reading: No such file or directory ```
After: ``` head -n 4 redfish-core/schema/dmtf/json-schema-installed/ComputerSystem.v1_*.json { "$id": "http://redfish.dmtf.org/schemas/v1/ComputerSystem.v1_23_1.json", "$ref": "#/definitions/ComputerSystem", "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", ```
Change-Id: I7b867d8633e98f5497364d1ba4a0753d11308451 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
fda37f9b | 21-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix inotify
We don't need the global variable here. Cleanup is handled by the stream_descriptor. Also check error codes per the documentation, not just on == -1
Tested: Created log file manually
Fix inotify
We don't need the global variable here. Cleanup is handled by the stream_descriptor. Also check error codes per the documentation, not just on == -1
Tested: Created log file manually with redfish-event-listener enabled Saw log was sent to consumer.
Change-Id: I27f13c7aedfdfe642128b7129f622047dd933380 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
3c9e6b1c | 11-Jan-2025 |
Chandramohan Harkude <chandramohan.harkude@gmail.com> |
$filter Query parameter support for nested keys added
Implemented the code to identify the '/' character in the key and perform the level by level search
Testing :
Tested query parameter with path
$filter Query parameter support for nested keys added
Implemented the code to identify the '/' character in the key and perform the level by level search
Testing :
Tested query parameter with path separated by / example
curl -k -u root:0penBmc https://<IP>/redfish/v1/Systems/ Baseboard/LogServices/FaultLog/Entries?$filter=CPER/Oem/ OEM/IpSignature eq 'DRAM-CHANNELS'
Results having 'DRAM-CHANNELS' in nested path "CPER/Oem/ OEM/IpSignature" are listed.
Change-Id: Ie6cf796026a29ec7a3e8a0366bbfd0c658d0ac7e Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
show more ...
|
a93e9c77 | 18-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move time_utils to compile unit
There's no reason for these functions to be in a header, and pulling them into a compile unit can reduce compile times overall.
Tested: Unit tests pass (Good coverag
Move time_utils to compile unit
There's no reason for these functions to be in a header, and pulling them into a compile unit can reduce compile times overall.
Tested: Unit tests pass (Good coverage)
Change-Id: Ia6dc50d16bf2967e647a3c7437ba13bd7ab7ca3c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
c069fca7 | 18-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move to std::chrono
gcc-14 finally has calendar support. Move the existing helper functions over to using it, and deprecate the old methods (which involved a lot of magic numbers). The old methods
Move to std::chrono
gcc-14 finally has calendar support. Move the existing helper functions over to using it, and deprecate the old methods (which involved a lot of magic numbers). The old methods are kept behind ifdefs for those still compiling against gcc-13 for the moment, but will be removed when we bump the requirements to gcc-14.
Unrelated to the cleanup, this also saves 2Kb on the compressed binary size, presumably due to relying on implementations in libc++ instead of in bmcweb.
Tested: Unit tests pass, good coverage.
Change-Id: I739a3e876e84150dc654b9dff5eb05261b1daaf5 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
9b46bc0b | 21-Jan-2025 |
Myung Bae <myungbae@us.ibm.com> |
Update to 2024.4
Update schema to the latest release 2024.4.
See below for more info on this release: https://www.dmtf.org/standards/redfish
Tested: - Redfish Service Validator passes
Change-Id:
Update to 2024.4
Update schema to the latest release 2024.4.
See below for more info on this release: https://www.dmtf.org/standards/redfish
Tested: - Redfish Service Validator passes
Change-Id: I1845d6afa04ee418ba3ab0bd0bc8ce59886e4376 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
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 ...
|
6e78b680 | 13-Dec-2024 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
network: fix dhcp values in redfish response
Whenever IPv6 SLAAC is enabled and DHCPv4 is enabled, the "DHCPEnabled" value in the backend will be "v4v6stateless". Currently in bmcweb, the check to t
network: fix dhcp values in redfish response
Whenever IPv6 SLAAC is enabled and DHCPv4 is enabled, the "DHCPEnabled" value in the backend will be "v4v6stateless". Currently in bmcweb, the check to translate this value to bool for ipv4 is not present and will return false. That means, "DHCPEnabled" is wrongly displayed 'false' while the correct value is 'true'.
Change-Id: I8713d73727c6a382f06b7bf0d598ab61a757e1e3 Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
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 ...
|