#
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 ...
|
#
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 ...
|
#
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 ...
|
#
deae6a78 |
| 11-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and re
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and responses to help with debugging.
Tested: Redfish service validator passes.
Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
afc474ae |
| 09-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Format readjson
clang-format may potentially reformat the readJson calls if they may have more keys or key names are longer. This makes formatting in a way that's readable by forcing to break a line
Format readjson
clang-format may potentially reformat the readJson calls if they may have more keys or key names are longer. This makes formatting in a way that's readable by forcing to break a line for each key using an empty-comment (`//`) each line.
It also allows trivially alphabetizing the list such that new additions are less likely to have merge conflicts.
Tested: - Check whitespace only. - Code compiles. - Redfish Service Validator with the same results before this
Change-Id: I3824a8c4faa9fa7c820d5d2fab6b565404926e2c Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
262dcc1c |
| 19-Sep-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
event logs: introduce struct DbusEventLogEntry
This creates a partial representation of dbus interface xyz.openbmc_project.Logging.Entry as a struct.
There is also a function to extract it from dbu
event logs: introduce struct DbusEventLogEntry
This creates a partial representation of dbus interface xyz.openbmc_project.Logging.Entry as a struct.
There is also a function to extract it from dbus.
Which helps to refactor function fillEventLogLogEntryFromPropertyMap to be smaller.
Tested: not tested, simple refactoring. All the data types remain the same as before.
Change-Id: Ib32cac967bde487b137ceaf845dfb682e605a175 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
#
d51c61b4 |
| 13-Sep-2024 |
Myung Bae <myungbae@us.ibm.com> |
Fix status for non-existent JsonSchema FileGet
This will fix the incorrect status 500 to status 404 for the non-eixstent JsonSchema FileGet.
``` % redfishtool raw GET -r ${bmc} -u root -p 0penBmc
Fix status for non-existent JsonSchema FileGet
This will fix the incorrect status 500 to status 404 for the non-eixstent JsonSchema FileGet.
``` % redfishtool raw GET -r ${bmc} -u root -p 0penBmc -S Always /redfish/v1/JsonSchemas/ComputerSystem/ComputerSystem.v1_99_1.json redfishtool: Transport: Response Error: status_code: 500 -- Internal Server Error redfishtool: raw: Error getting response ```
This commit also refactor `Response::openFile()` to return `ec` so that the caller can check the reason of the failure.
Tested: - Verify redfishtool result for the non-existent JsonSchema file like ``` % redfishtool raw GET -r ${bmc} -u root -p 0penBmc -S Always /redfish/v1/JsonSchemas/<schema>/<non-existent-schema>.json redfishtool: Transport: Response Error: status_code: 404 -- Not Found redfishtool: raw: Error getting response ``` - Redfish Service validator passes
Change-Id: I98927c076bb6e7dfb3742183b4b3545e328d2657 Signed-off-by: Myung Bae <myungbae@us.ibm.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 ...
|
#
4ff0f1f4 |
| 04-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
static -> inline
Declaring a function static in a header makes no sense, because a header isn't a compile unit. Find all the issues and replace them with inline.
Change-Id: Icfc2b72d94b41a3a880da1
static -> inline
Declaring a function static in a header makes no sense, because a header isn't a compile unit. Find all the issues and replace them with inline.
Change-Id: Icfc2b72d94b41a3a880da1ae6975beaa30a6792b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
e21126ec |
| 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out hostlogger
Similar to what we've done elsewhere, break out hostlogger into its own file.
Tested: Code compiles.
Change-Id: Ib9a48577878f57eb7ed4e3cf6b84a58a3ec203f6 Signed-off-by: Ed Tan
Break out hostlogger
Similar to what we've done elsewhere, break out hostlogger into its own file.
Tested: Code compiles.
Change-Id: Ib9a48577878f57eb7ed4e3cf6b84a58a3ec203f6 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
8d2f868c |
| 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out post codes
Similar to other patches, break out the post codes log services into their own file. log_services.hpp is far too large.
Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8 Si
Break out post codes
Similar to other patches, break out the post codes log services into their own file. log_services.hpp is far too large.
Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8 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 ...
|
#
898f2aa2 |
| 07-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Consolidate LogEntry builders
We have copies of essentially the same code in two places for building a log entry from a given set of dbus interfaces. Consolidate them.
Tested: GET /redfish/v1/Syst
Consolidate LogEntry builders
We have copies of essentially the same code in two places for building a log entry from a given set of dbus interfaces. Consolidate them.
Tested: GET /redfish/v1/Systems/system/LogServices/EventLog/Entries Returns Entries
Get /redfish/v1/Systems/system/LogServices/EventLog/Entries/2 Returns the individual entry, matching the expected result.
Redfish service validator passes for log services. (Other failures present).
Change-Id: I58fb7a4b0af2229416d5efe903ca04771b289962 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
b729096d |
| 07-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Refactor large lambda into function
Per Common error #14, large lambdas cause problems. Refactor.
Tested: Inspection Only.
Change-Id: If1e939c55745cfb8c6efb5ec5ba005772e327c63 Signed-off-by: Ed T
Refactor large lambda into function
Per Common error #14, large lambdas cause problems. Refactor.
Tested: Inspection Only.
Change-Id: If1e939c55745cfb8c6efb5ec5ba005772e327c63 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
599b9af3 |
| 06-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
refactor log_services.hpp, separate handlers
Handlers are separated from bmcweb route declarations.
The decoupling separates the http side of things and the logic for handling the request.
As an a
refactor log_services.hpp, separate handlers
Handlers are separated from bmcweb route declarations.
The decoupling separates the http side of things and the logic for handling the request.
As an additional bonus this reduces the indentation needed and improves readability.
Tested: moving code with no logic change does not require testing
Change-Id: Ice5f62dca26fb46b35c3b26843fa25d3c6666258 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
b0b6152c |
| 06-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Add missing nullptr check
Static analysis flags two missing nullptr checks. Add them.
Tested: dbus-rest is a deprecated option, so unit testing is the only difference there. Log services notify wa
Add missing nullptr check
Static analysis flags two missing nullptr checks. Add them.
Tested: dbus-rest is a deprecated option, so unit testing is the only difference there. Log services notify was added recently. Need help testing, otherwise inspection only.
Change-Id: If92153ffa9c9fdf8903ce386f025ceebcf7510eb Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
539d8c6b |
| 19-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Consistently use generated enumerations
This commit causes all of Redfish to use generated enum values for enum types. Using generated code prevents problems, and makes it more clear what types are
Consistently use generated enumerations
This commit causes all of Redfish to use generated enum values for enum types. Using generated code prevents problems, and makes it more clear what types are allowed.
Doing this found two places where we had structs that didn't fulfill the schema. They have been commented, but will be fixed with a breaking change at some point in the future.
Tested: WIP
Change-Id: I5fdd2f2dfb6ec05606a522e1f4e331f982c8e476 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
055713e4 |
| 17-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Make journal log efficient
Journal logging currently loops over all entries to find even a single entry. This was reasonable at the time when bmc couldn't really store a lot, but now that BMCs are
Make journal log efficient
Journal logging currently loops over all entries to find even a single entry. This was reasonable at the time when bmc couldn't really store a lot, but now that BMCs are getting significantly more flash storage, this simplification is insufficient. In an example system with an AST2600, this API takes 32 seconds to respond. This is mediocre for obvious reasons.
This commit updates to use the sd_journal APIs to let journald do the skipping, which can use internal details and can be a lot more efficient. To get the total size, bmcweb still needs to pull the sequenceids of HEAD and TAIL to determine the complete size, but this is still reasonable.
Tested: Redfish service validator passes.
Various versions of top and skip return the correct result, pulling various top sizes from 0, omitted to the limit.
https://gerrit.openbmc.org/c/openbmc/openbmc-tools/+/72975
To test all corner cases.
Change-Id: I0456bca4e037529f70eaee0bdd9191e9d5839226 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
b0983db2 |
| 17-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out Journal log into its own file
log_services.hpp probably shouldn't have been allowed to get as large as it has. This commit starts by breaking out functions from log_services.hpp, and move
Break out Journal log into its own file
log_services.hpp probably shouldn't have been allowed to get as large as it has. This commit starts by breaking out functions from log_services.hpp, and moves them to manager_logservices_journal.hpp. Code is moved as-is with no functional changes.
Tested: Journal GET works as before. Redfish service validator passes.
Change-Id: I93c372ae3e39967e1b0eaf0cf496f84ac4114b5c Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
9f565090 |
| 13-Jul-2024 |
Ed Tanous <ed@tanous.net> |
Fix typo regression
This is an obvious typo introduced in 253f11b84347de6bff7c6b624bef270fefae5f5a
It's under a less used option, which is why it doesn't show up in tests, but is obviously wrong.
Fix typo regression
This is an obvious typo introduced in 253f11b84347de6bff7c6b624bef270fefae5f5a
It's under a less used option, which is why it doesn't show up in tests, but is obviously wrong. Fix it.
Tested: Inspection only.
Change-Id: Ic90f680890c32c0a2b698de61cc5caa99799e40b Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
e93abac6 |
| 14-Jun-2024 |
Ginu George <ginugeorge@ami.com> |
Pass redfishPropertyName earlier argument
It was pointed out that the setDbusProperty method should have an end that approximately matches dbus-send and busctl set-property in its arguments, to aid
Pass redfishPropertyName earlier argument
It was pointed out that the setDbusProperty method should have an end that approximately matches dbus-send and busctl set-property in its arguments, to aid with debug. This seems reasonable.
Tested: Redfish service validator passes.
Change-Id: Ic20295d93c71c957e3e76704e1eda9da187861b1 Signed-off-by: Ginu George <ginugeorge@ami.com> Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
20fa6a2c |
| 20-May-2024 |
Ed Tanous <ed@tanous.net> |
Remove the last instances of json pattern
In the past, we've tried to erradicate the use of nlohmann::json(initiatlizer_list<...>) because it bloats binary sizes, as every type is given a new nlohma
Remove the last instances of json pattern
In the past, we've tried to erradicate the use of nlohmann::json(initiatlizer_list<...>) because it bloats binary sizes, as every type is given a new nlohmann constructor.
This commit hunts down the last few places where we call this. There is still 2 remaining in openbmc_dbus_rest after this, but those are variant accesses that are difficult to triage, and considering it's a less used api, they're left as is.
Tested: WIP
Change-Id: Iaac24584bb78bb238da69010b511c1d598bd38bc Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
253f11b8 |
| 16-May-2024 |
Ed Tanous <ed@tanous.net> |
Allow configuring "bmc" and "system"
In the early days of bmcweb, we made two pretty critical assumptions; First, is that a given platform would only have a single BMC instance (represented as "bmc"
Allow configuring "bmc" and "system"
In the early days of bmcweb, we made two pretty critical assumptions; First, is that a given platform would only have a single BMC instance (represented as "bmc") and a single host instance (represented as "system"). Second we assumed that, given that Redfish suggests against hardcoding URIs in client implementation and leaves them freeform, clients would code to the standard.
Our own webui-vue hardcodes Redfish URIs [1], and the documentation is littered with examples of hardcoded curl examples of hardcoding these URIs. That bug was filed in 2020, and the issue has only gotten worse over time.
This patchset is an attempt to give a target that we can start solving these issues, without trying to boil the ocean and fix all clients in parallel.
This commit adds the meson options redfish-manager-uri-name and redfish-system-uri-name
These are used to control the "name" that bmcweb places in the fixed locations in the ManagerCollection and ComputerSystemCollection schemas.
Note, managers is added, but is not currently testable. It will be iterated on over time.
Tested: Changed the URL options to "edsbmc" and "edssystem" in meson options.
Redfish service validator passes. URLs appear changed when walking the tree.
[1] https://github.com/openbmc/webui-vue/issues/43
Change-Id: I4b44685067051512bd065da8c2e3db68ae5ce23a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
5ffd11f2 |
| 02-May-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Fix regression in CrashDump
25b54db introduced a bug where CrashDump was not looking at the correct option. Was using BMCWEB_REDFISH_DUMP_LOG instead of the correct BMCWEB_REDFISH_CPU_LOG.
This was
Fix regression in CrashDump
25b54db introduced a bug where CrashDump was not looking at the correct option. Was using BMCWEB_REDFISH_DUMP_LOG instead of the correct BMCWEB_REDFISH_CPU_LOG.
This was caught in CI by a system that doesn't have CrashDump enabled but was hitting: 1 failGet errors in /redfish/v1/Systems/system/LogServices/Crashdump
Tested: None. Visually inspected and this matches redfish-core/src/redfish.cpp.
Change-Id: Ia6e72e5bbeaaa246fbbc5bcb2a525062e63d7d29 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|