#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
25b54dba |
| 17-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options usi
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options using a config file. This history has led to a lot of different ways to configure code in the codebase itself, which has led to problems, and issues in consistency.
ifdef options do no compile time checking of code not within the branch. This is good when you have optional dependencies, but not great when you're trying to ensure both options compile.
This commit moves all internal configuration options to: 1. A namespace called bmcweb 2. A naming scheme matching the meson option. hyphens are replaced with underscores, and the option is uppercased. This consistent transform allows matching up option keys with their code counterparts, without naming changes. 3. All options are bool true = enabled, and any options with _ENABLED or _DISABLED postfixes have those postfixes removed. (note, there are still some options with disable in the name, those are left as-is) 4. All options are now constexpr booleans, without an explicit compare.
To accomplish this, unfortunately an option list in config/meson.build is required, given that meson doesn't provide a way to dump all options, as is a manual entry in bmcweb_config.h.in, in addition to the meson_options. This obsoletes the map in the main meson.build, which helps some of the complexity.
Now that we've done this, we have some rules that will be documented. 1. Runtime behavior changes should be added as a constexpr bool to bmcweb_config.h 2. Options that require optionally pulling in a dependency shall use an ifdef, defined in the primary meson.build. (note, there are no options that currently meet this class, but it's included for completeness.)
Note, that this consolidation means that at configure time, all options are printed. This is a good thing and allows direct comparison of configs in log files.
Tested: Code compiles Server boots, and shows options configured in the default build. (HTTPS, log level, etc)
Change-Id: I94e79a56bcdc01755036e4e7278c7e69e25809ce Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
7ac13cc9 |
| 01-Apr-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Remove redfish-health-populate
The redfish-health-populate option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and did not find a downstr
Remove redfish-health-populate
The redfish-health-populate option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and did not find a downstream layer that did either.
This was always limited to a few resources. Overall this design was only half done. A future "HealthRollup" can be proposed.
Some discord discussion: [1]: https://discord.com/channels/775381525260664832/855566794994221117/1110728560819327069
Commit disabling this (merged 10 months ago): [2]: https://github.com/openbmc/bmcweb/commit/6f8273e49cffdd347c223b9538558edfb05e818a
Tested: Code compiles
Change-Id: I4d33c1e674ecdb0fd256df62f3795073454ae7a1 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
5a39f77a |
| 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I2f9540cf0d545a2da4d6289fc87b754f684bc9a7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
36b5f1ed |
| 26-Sep-2023 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
Refactor getCollectionMembers
This commit refactors the getCollectionMembers function into smaller functions. Additionally, the 'subtree' parameter is no longer a default parameter but is explicitl
Refactor getCollectionMembers
This commit refactors the getCollectionMembers function into smaller functions. Additionally, the 'subtree' parameter is no longer a default parameter but is explicitly required in the function. All calls to getCollectionMembers have been updated to pass the 'subtree' parameter.
Tested: Validator passed
''' curl -k https://$bmc/redfish/v1/Systems/system/Storage { "@odata.id": "/redfish/v1/Systems/system/Storage", "@odata.type": "#StorageCollection.StorageCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/1" } ], "Members@odata.count": 1, "Name": "Storage Collection" }
curl -k https://$bmc/redfish/v1/Cables { "@odata.id": "/redfish/v1/Cables", "@odata.type": "#CableCollection.CableCollection", "Description": "Collection of Cable Entries", "Members": [ { "@odata.id": "/redfish/v1/Cables/dp0_cable0" }, { "@odata.id": "/redfish/v1/Cables/dp0_cable1" }, { "@odata.id": "/redfish/v1/Cables/dp0_cable2" }, { "@odata.id": "/redfish/v1/Cables/dp0_cable3" } ], "Members@odata.count": 4, "Name": "Cable Collection" }
curl -k https://$bmc/redfish/v1/Chassis
{ "@odata.id": "/redfish/v1/Chassis", "@odata.type": "#ChassisCollection.ChassisCollection", "Members": [ { "@odata.id": "/redfish/v1/Chassis/chassis" } ], "Members@odata.count": 1, "Name": "Chassis Collection" }
curl -k https://$bmc/redfish/v1/Systems/system/Memory { "@odata.id": "/redfish/v1/Systems/system/Memory", "@odata.type": "#MemoryCollection.MemoryCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm0" }, { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm1" }, ...... { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm31" } ], "Members@odata.count": 32, "Name": "Memory Module Collection" } '''
Change-Id: If5091431b548f371bff03b2897fd0aaf8b0ef203 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
show more ...
|
#
62598e31 |
| 17-Jul-2023 |
Ed Tanous <ed@tanous.net> |
Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot more flexibility, and better compile times when doing logging.
Unfortunately, given its level
Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot more flexibility, and better compile times when doing logging.
Unfortunately, given its level of compile time checks, it needs to be a method, instead of the stream style logging we had before. This requires a pretty substantial change. Fortunately, this change can be largely automated, via the script included in this commit under scripts/replace_logs.py. This is to aid people in moving their patchsets over to the new form in the short period where old patches will be based on the old logging. The intention is that this script eventually goes away.
The old style logging (stream based) looked like.
BMCWEB_LOG_DEBUG << "Foo " << foo;
The new equivalent of the above would be: BMCWEB_LOG_DEBUG("Foo {}", foo);
In the course of doing this, this also cleans up several ignored linter errors, including macro usage, and array to pointer deconstruction.
Note, This patchset does remove the timestamp from the log message. In practice, this was duplicated between journald and bmcweb, and there's no need for both to exist.
One design decision of note is the addition of logPtr. Because the compiler can't disambiguate between const char* and const MyThing*, it's necessary to add an explicit cast to void*. This is identical to how fmt handled it.
Tested: compiled with logging meson_option enabled, and launched bmcweb
Saw the usual logging, similar to what was present before: ``` [Error include/webassets.hpp:60] Unable to find or open /usr/share/www/ static file hosting disabled [Debug include/persistent_data.hpp:133] Restored Session Timeout: 1800 [Debug redfish-core/include/event_service_manager.hpp:671] Old eventService config not exist [Info src/webserver_main.cpp:59] Starting webserver on port 18080 [Error redfish-core/include/event_service_manager.hpp:1301] inotify_add_watch failed for redfish log file. [Info src/webserver_main.cpp:137] Start Hostname Monitor Service... ``` Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I86a46aa2454be7fe80df608cb7e5573ca4029ec8
show more ...
|
#
6995c1ce |
| 14-Jun-2023 |
George Liu <liuxiwei@inspur.com> |
Change the byte of the MemoryAttributes attribute to the size type
There is a patch [1] about changing the byte type of the MemoryAttributes attribute to size_t, so we need to update the relevant co
Change the byte of the MemoryAttributes attribute to the size type
There is a patch [1] about changing the byte type of the MemoryAttributes attribute to size_t, so we need to update the relevant code in bmcweb synchronously.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/63799
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I6fca731956750cdf8f749f963bbc12137fec7796
show more ...
|
#
7f3e84a1 |
| 28-Dec-2022 |
Ed Tanous <ed@tanous.net> |
Add an option flag for multi-computersystem
A number of discussions have occurred, and it's clear that multi-computer system is not a transition that can be done in a single series of commits, and n
Add an option flag for multi-computersystem
A number of discussions have occurred, and it's clear that multi-computer system is not a transition that can be done in a single series of commits, and needs to be done incrementally over time. This commit adds the initial option for multi-computer system support, with an option flag that can be enabled when the new behavior is desired. This is to prevent needing a long-lived fork.
This option operatates such that if enabled, all ComputerSystem route options will now return 404. This is to allow the redfish service validator to pass, and to be used for incremental development. As the routes are moved over, they will be enabled, and service validator re-run.
Per the description in the meson options, this option flag, and all code beneath of it will be removed on 9/1/23. The expectation is that by this date, given the appropriate level of effort in implementation, there will be no code remaining under that option flag. After this date, code beneath this option flag will be removed.
Tested: No functional changes without option.
With option enabled, /redfish/v1/Systems produces no entries. Spot check of various routes returns 404.
Redfish service validator passes.
Change-Id: I3b58642cb76d61df668076c2e0f1e7bed110ae25 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
6fde5971 |
| 15-Jun-2023 |
Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> |
Populate Memory attributes
Change MemoryMedia, Slot and Socket memory attributes to be byte, in line with Phosphor-dbus-interfaces.
Tested: 1. Redfish validator - passed for this new change 2. Popu
Populate Memory attributes
Change MemoryMedia, Slot and Socket memory attributes to be byte, in line with Phosphor-dbus-interfaces.
Tested: 1. Redfish validator - passed for this new change 2. Populated MiemoryMedia, Slot and Socket values as expected. GET https://<BMC_IP>/redfish/v1/Systems/system/Memory/dimm0
Signed-off-by: poram srinivasa rao <poramx.srinivasa.rao@intel.com> Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib4894aca135af79d01ff0fda0ae8f3f1d03ea278
show more ...
|
#
ac106bf6 |
| 07-Jun-2023 |
Ed Tanous <edtanous@google.com> |
Consistently name AsyncResp variables
In about half of our code, AsyncResp objects take the name asyncResp, and in the other half they take the name aResp. While the difference between them is negl
Consistently name AsyncResp variables
In about half of our code, AsyncResp objects take the name asyncResp, and in the other half they take the name aResp. While the difference between them is negligeble and arbitrary, having two naming conventions makes it more difficult to do automated changes over time via grep.
This commit was generated automtatically with the command: git grep -l 'aResp' | xargs sed -i 's|aResp|asyncResp|g'
Tested: Code compiles.
Change-Id: Id363437b6a78f51e91cbf60aa0a0c2286f36a037 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
#
13451e39 |
| 24-May-2023 |
Willy Tu <wltu@google.com> |
health: Add option to disable health-populate
The Health populate calls GetManagedObjects at `/` which can take a lot of time. Add the option to disable to improve performance if it is not needed.
health: Add option to disable health-populate
The Health populate calls GetManagedObjects at `/` which can take a lot of time. Add the option to disable to improve performance if it is not needed.
Tested: ``` $ meson build -Dhealth-populate=disabled ... User defined options backend : ninja health-populate : disabled ```
Build passed.
Health Status removed. Some resource still create HealthPopulate, but does not populate. It will require further refactoring to clean it out.
Testing on `/redfish/v1/Chassis?$expand=.($levels=1)`
On 14 chassis, from about 2.5 seconds to 400 ms. :)
Before: ``` Getting times for chassis Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1) Line count: 980 17:05:56: real 0m2.908s user 0m0.000s sys 0m0.030s 17:05:59: real 0m2.414s user 0m0.010s sys 0m0.010s 17:05:03: real 0m3.410s user 0m0.000s sys 0m0.020s 17:05:09: real 0m2.372s user 0m0.000s sys 0m0.010s 17:05:13: real 0m3.407s user 0m0.010s sys 0m0.000s 17:05:19: real 0m2.420s user 0m0.010s sys 0m0.000s 17:05:23: real 0m3.463s user 0m0.010s sys 0m0.000s 17:05:29: real 0m2.414s user 0m0.000s sys 0m0.010s 17:05:33: real 0m2.843s user 0m0.010s sys 0m0.010s 17:05:38: real 0m2.512s user 0m0.000s sys 0m0.020s 17:05:42: real 0m2.474s user 0m0.000s sys 0m0.010s 17:05:47: real 0m2.557s user 0m0.010s sys 0m0.010s 17:05:52: real 0m2.439s user 0m0.020s sys 0m0.000s 17:05:56: real 0m3.127s user 0m0.010s sys 0m0.000s 17:05:01: real 0m2.563s user 0m0.020s sys 0m0.000s 17:05:06: real 0m2.392s user 0m0.020s sys 0m0.020s 17:05:10: real 0m2.405s user 0m0.020s sys 0m0.000s 17:05:15: real 0m2.514s user 0m0.010s sys 0m0.010s 17:05:19: real 0m2.809s user 0m0.020s sys 0m0.010s 17:05:24: real 0m2.944s user 0m0.010s sys 0m0.010s 17:05:29: real 0m2.537s user 0m0.010s sys 0m0.000s 17:05:34: real 0m3.290s user 0m0.000s sys 0m0.000s 17:05:39: real 0m2.601s user 0m0.040s sys 0m0.000s 17:05:43: real 0m2.398s user 0m0.010s sys 0m0.040s 17:05:48: real 0m2.664s user 0m0.000s sys 0m0.020s 17:05:53: real 0m2.323s user 0m0.010s sys 0m0.000s 17:05:57: real 0m3.033s user 0m0.000s sys 0m0.010s 17:05:02: real 0m3.243s user 0m0.000s sys 0m0.010s 17:05:07: real 0m2.604s user 0m0.010s sys 0m0.010s 17:05:12: real 0m2.813s user 0m0.010s sys 0m0.010s 17:05:17: real 0m2.325s user 0m0.020s sys 0m0.000s 17:05:21: real 0m2.577s user 0m0.010s sys 0m0.000s 17:05:26: real 0m2.882s user 0m0.030s sys 0m0.000s 17:05:31: real 0m2.572s user 0m0.000s sys 0m0.020s 17:05:35: real 0m2.678s user 0m0.010s sys 0m0.010s 17:05:40: real 0m2.656s user 0m0.010s sys 0m0.010s 17:05:45: real 0m2.921s user 0m0.020s sys 0m0.000s 17:05:49: real 0m2.723s user 0m0.000s sys 0m0.020s 17:05:54: real 0m2.910s user 0m0.010s sys 0m0.010s 17:05:59: real 0m2.601s user 0m0.020s sys 0m0.000s 17:05:04: real 0m2.615s user 0m0.000s sys 0m0.000s ```
After: ``` Getting times for chassis Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1) Line count: 980 16:04:43: real 0m0.188s user 0m0.020s sys 0m0.000s 16:04:43: real 0m0.195s user 0m0.010s sys 0m0.000s 16:04:45: real 0m0.219s user 0m0.010s sys 0m0.000s 16:04:48: real 0m0.226s user 0m0.020s sys 0m0.000s 16:04:50: real 0m0.208s user 0m0.020s sys 0m0.010s 16:04:52: real 0m0.226s user 0m0.010s sys 0m0.010s 16:04:54: real 0m0.419s user 0m0.000s sys 0m0.010s 16:04:57: real 0m0.222s user 0m0.010s sys 0m0.020s 16:04:59: real 0m0.194s user 0m0.000s sys 0m0.010s 16:04:01: real 0m0.191s user 0m0.010s sys 0m0.010s 16:04:04: real 0m0.276s user 0m0.010s sys 0m0.020s 16:04:06: real 0m0.183s user 0m0.020s sys 0m0.000s 16:04:08: real 0m0.193s user 0m0.040s sys 0m0.000s 16:04:10: real 0m0.406s user 0m0.020s sys 0m0.010s 16:04:13: real 0m0.317s user 0m0.000s sys 0m0.000s 16:04:15: real 0m0.442s user 0m0.005s sys 0m0.005s 16:04:18: real 0m0.226s user 0m0.010s sys 0m0.000s 16:04:20: real 0m0.217s user 0m0.020s sys 0m0.000s 16:04:22: real 0m0.200s user 0m0.010s sys 0m0.030s 16:04:24: real 0m0.423s user 0m0.010s sys 0m0.010s 16:04:27: real 0m0.203s user 0m0.020s sys 0m0.010s 16:04:29: real 0m0.433s user 0m0.000s sys 0m0.000s 16:04:31: real 0m0.318s user 0m0.020s sys 0m0.000s 16:04:34: real 0m1.206s user 0m0.000s sys 0m0.010s 16:04:37: real 0m0.403s user 0m0.000s sys 0m0.020s 16:04:39: real 0m0.353s user 0m0.010s sys 0m0.000s 16:04:42: real 0m0.291s user 0m0.000s sys 0m0.030s 16:04:44: real 0m0.742s user 0m0.020s sys 0m0.010s 16:04:47: real 0m0.369s user 0m0.010s sys 0m0.000s 16:04:49: real 0m0.215s user 0m0.020s sys 0m0.000s 16:04:52: real 0m0.204s user 0m0.000s sys 0m0.010s 16:04:54: real 0m0.418s user 0m0.000s sys 0m0.000s 16:04:56: real 0m0.215s user 0m0.000s sys 0m0.010s 16:04:58: real 0m0.202s user 0m0.010s sys 0m0.010s 16:04:01: real 0m0.202s user 0m0.010s sys 0m0.010s 16:04:03: real 0m0.212s user 0m0.010s sys 0m0.000s 16:04:05: real 0m0.694s user 0m0.010s sys 0m0.010s 16:04:08: real 0m0.201s user 0m0.010s sys 0m0.010s 16:04:10: real 0m0.230s user 0m0.000s sys 0m0.020s 16:04:12: real 0m0.206s user 0m0.010s sys 0m0.010s 16:04:15: real 0m0.446s user 0m0.010s sys 0m0.010s ```
Change-Id: I90b242e2cd24973420de871fedf9793dd1e310f3 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
ef4c65b7 |
| 24-Apr-2023 |
Ed Tanous <edtanous@google.com> |
Boost::urls::format
Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot like our urlFromPieces method, but better in that it makes the resulting uris more readable, and allows d
Boost::urls::format
Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot like our urlFromPieces method, but better in that it makes the resulting uris more readable, and allows doing things like fragments in a single line instead of multiple. We should prefer it in some cases.
Tested: Redfish service validator passes. Spot checks of URLs work as expected. Unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ia7b38f0a95771c862507e7d5b4aa68aa1c98403c
show more ...
|
#
89492a15 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I75f89d2959b0f1338c20d72ad669fbdc1d720835 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
5e7e2dc5 |
| 16-Feb-2023 |
Ed Tanous <edtanous@google.com> |
Take boost error_code by reference
By convention, we should be following boost here, and passing error_code by reference, not by value. This makes our code consistent, and removes the need for a co
Take boost error_code by reference
By convention, we should be following boost here, and passing error_code by reference, not by value. This makes our code consistent, and removes the need for a copy in some cases.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id42ea4a90b6685a84818b87d1506c11256b3b9ae
show more ...
|
#
eddfc437 |
| 26-Sep-2022 |
Willy Tu <wltu@google.com> |
Update most resources to use urlFromPieces
Only id in event_service and account_service have not been updated due to the risk of it breaking the username/id. It will require further testing to verif
Update most resources to use urlFromPieces
Only id in event_service and account_service have not been updated due to the risk of it breaking the username/id. It will require further testing to verify.
Use urlFromPieces wherever that is needed to insert a variable in the URI. Don't use urlFromPieces when it is hardcoded values. This allow us to control all resource URIs that is dynamically added and to sync with the current recommanded method for `@odata.id`. The goal is to have a common place to manage the url created from dbus-paths in order to manage/update it easily when needed.
Tested: RedfishValidtor Passed for all resource including the sensors with the fragments.
Change-Id: I95cdfaaee58fc7f21c95f5944e1e5c813b3215f2 Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
#
e99073f5 |
| 08-Dec-2022 |
George Liu <liuxiwei@inspur.com> |
Refactor GetSubTree method
Since the GetSubTree method has been implemented in dbus_utility and this commit is to integrate all the places where the GetSubTree method is called, and use the method i
Refactor GetSubTree method
Since the GetSubTree method has been implemented in dbus_utility and this commit is to integrate all the places where the GetSubTree method is called, and use the method in dbus_utility uniformly.
Tested: Redfish Validator Passed
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: If3852b487d74e7cd8f123e0efffbd4affe92743c
show more ...
|
#
3ccb3adb |
| 13-Jan-2023 |
Ed Tanous <edtanous@google.com> |
Fix a boatload of #includes
Most of these missing includes were found by running clang-tidy on all files, including headers. The existing scripts just run clang-tidy on source files, which doesn't
Fix a boatload of #includes
Most of these missing includes were found by running clang-tidy on all files, including headers. The existing scripts just run clang-tidy on source files, which doesn't catch most of these.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic741fbb2cc9e5e92955fd5a1b778a482830e80e8
show more ...
|
#
7a1dbc48 |
| 07-Dec-2022 |
George Liu <liuxiwei@inspur.com> |
Refactor GetSubTreePaths method
Since the GetSubTreePaths method has been implemented in dbus_utility and this commit is to integrate all the places where the GetSubTreePaths method is called, and u
Refactor GetSubTreePaths method
Since the GetSubTreePaths method has been implemented in dbus_utility and this commit is to integrate all the places where the GetSubTreePaths method is called, and use the method in dbus_utility uniformly.
Requires https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/60020 to build.
Tested: Redfish Validator Passed
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ie4140d4484a7e4f4b943013f4371ffd2d44a22e9
show more ...
|
#
ae9031f0 |
| 27-Sep-2022 |
Willy Tu <wltu@google.com> |
Update CollectionMembers to use UrlFromPieces
Refactor getCollectionMembers to make sure all Url created with dbus paths are generated via UrlFromPieces helper function. This allow us to manage all
Update CollectionMembers to use UrlFromPieces
Refactor getCollectionMembers to make sure all Url created with dbus paths are generated via UrlFromPieces helper function. This allow us to manage all URL generated from dbus in one place and allow us to make future changes to affect all resources.
We can make changes to all resources easier if they are all managed by one function.
Tested: Redfish Validator Passed. All Collections working as expected and match previous implmentation.
Change-Id: I5d3b2b32f047ce4f20a2287a36a3e099efd6eace Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
22d268cb |
| 19-May-2022 |
Ed Tanous <edtanous@google.com> |
Make routes start matching Redfish
This is preliminary patch to set up the route handling such that it's ready for the addition of multiple hosts, multiple managers in the future. Routes previously
Make routes start matching Redfish
This is preliminary patch to set up the route handling such that it's ready for the addition of multiple hosts, multiple managers in the future. Routes previously took the form of
/redfish/v1/Systems/system
which essentially hardcoded the name "system" into a number of places. As the stack evolves to support multiple systems, this needs to change.
This patchset changes all the ComputerSystem resources to the form: /redfish/v1/Systems/<str>
and adds 404 checks to each route such that they will be handled properly still. This means that as we evolve our multi-host support, each individual route can be moved one at a time to support multi-host.
In the future, moving these to redfish-spec-defined routing would likely mean that we could generate this code in the future at some point, which reduces the likelihood that people do it incorrectly.
This patch currently sets the resource id and resource type in the resourceNotFound message to empty string (""). This handling is still arguably more correct than what we had before, which just returned 404 with an empty payload, although this will be corrected in the future.
Tested: None yet. RFC to see if this is a pattern we'd like to propogate
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If9c07ad69f5287bb054645f460d7e370d433dc27
show more ...
|