#
f7e62c14
|
| 07-Sep-2025 |
Myung Bae <myungbae@us.ibm.com> |
Use getAssetInfo util function
This commit is to use getAssetInfo utility function for GET AssetInfo in various places like
- Chassis - FabricAdapter This will also include `Manufacturer` propert
Use getAssetInfo util function
This commit is to use getAssetInfo utility function for GET AssetInfo in various places like
- Chassis - FabricAdapter This will also include `Manufacturer` property if available on dbus. - Fan - PCIeDevice - PowerSupply - Storage - System
Tested: - GET the above schemas - Redfish Service Validator passes
Change-Id: I9d01d583212fe4916d5fdd144d2b8e52ad865d16 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
f664fd8a
|
| 23-Jul-2025 |
Janet Adkins <janeta@us.ibm.com> |
IndicatorLED: Add compile option for deprecated property
The IndicatorLED property has been deprecated by Redfish since September 2020. The Redfish Service Validator reports a WARNING for this prope
IndicatorLED: Add compile option for deprecated property
The IndicatorLED property has been deprecated by Redfish since September 2020. The Redfish Service Validator reports a WARNING for this property:
``` WARNING - IndicatorLED: The given property is deprecated: This property has been deprecated in favor of the `LocationIndicatorActive` property. ```
The LocationIndicatorActive property is now implemented in bmcweb in all places where IndicatorLED was implemented. So a new meson option (redfish-allow-deprecated-indicatorled) is being added to control whether this property is part of get or patch requests. The option is disabled by default with plans to remove the option by March 2026.
Tested: - Built with option enabled and confirmed IndicatorLED still part of Redfish responses and can be patched. - Built with option disabled and confirmed Redfish Service Validator no longer reports the warning. - Built with option disabled and confirmed IndicatorLED no longer part of Redfish responses and patch fails appropriately. ``` curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"IndicatorLED":"Blinking"}' https://${bmc}/redfish/v1/Systems/system { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property IndicatorLED is not in the list of valid properties for the resource.", "MessageArgs": [ "IndicatorLED" ], "MessageId": "Base.1.19.PropertyUnknown", "MessageSeverity": "Warning", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed." } ], "code": "Base.1.19.PropertyUnknown", "message": "The property IndicatorLED is not in the list of valid properties for the resource." } }
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"IndicatorLED":"Off"}' https://${bmc}/redfish/v1/Chassis/chassis { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property IndicatorLED is not in the list of valid properties for the resource.", "MessageArgs": [ "IndicatorLED" ], "MessageId": "Base.1.19.PropertyUnknown", "MessageSeverity": "Warning", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed." } ], "code": "Base.1.19.PropertyUnknown", "message": "The property IndicatorLED is not in the list of valid properties for the resource." } } ```
Change-Id: I2c0d415a7a54aa3122b18d2a1aa69bd9259d567e Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
#
de8e5144
|
| 17-Apr-2025 |
Janet Adkins <janeta@us.ibm.com> |
Chassis: Update LocationIndicatorActive property
Modify get/set of LocationIndicatorActive property for Chassis to use identifying association instead of hard-coding D-Bus path to led group.[1]
His
Chassis: Update LocationIndicatorActive property
Modify get/set of LocationIndicatorActive property for Chassis to use identifying association instead of hard-coding D-Bus path to led group.[1]
History: Almost 5 years ago IBM added support for this property to the Chassis.[2] That original implementation assumed 1 chassis and just looked at the enclosure_identify_blink and enclosure_identify like the existing IndicatorLED property did.
IBM renamed these functions getSystemLocationIndicatorActive and setSystemLocationIndicatorActive.[3] These functions are also used by the system resource.
The interest from other companies has mostly been around IndicatorLED (old deprecated LED property).[4]
Today, LEDs have the association documented above and used elsewhere like PowerSupplies, Fans, etc. Switching to this association: 1) follows the design 2) allows multiple chassis support 3) doesn't assume your system led is your chassis led.
In the future: 1) system should also move to this association design 2) IndicatorLED should be deprecated - it has been 5 years
This could be put behind a compile flag but this function is broken with the assumption the system/chassis are the same led. Let's just move to the new design. IBM drove all these changes in and although other companies have shown interest around LEDs in Redfish, there hasn't been much in OpenBMC, so let's just fix.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58299 [2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/36886 [3] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57765 [4] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40969
Tested: - Redfish Service Validator passes - Confirm able to set and get LED
1. Get for Chassis ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", ... "LocationIndicatorActive": false, ... } ```
2. Set for Chassis ``` curl -k -H "X-Auth-Token: $token" H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Chassis/chassis curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", ... "LocationIndicatorActive": true, ... } ```
Change-Id: I78d07f82a8bbf91adb84e53178d3344ba95c9a14 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
#
177612aa
|
| 14-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Add async_method_call to utility
Adding async_method_call in dbus utility gives us a place where we can intercept method call requests from dbus to potentially add logging/caching.
An example of lo
Add async_method_call to utility
Adding async_method_call in dbus utility gives us a place where we can intercept method call requests from dbus to potentially add logging/caching.
An example of logging is in the later commit: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/78265/
We already do this for setProperty, this moves the method calls to follow a similar pattern.
Tested: Redfish service validator passes.
Change-Id: I6d2c96e2b6b6a023ed2138106a55faebca161592 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
3f95a277
|
| 13-Mar-2024 |
Myung Bae <112663928+baemyung@users.noreply.github.com> |
Refactor chassisInterfaces into chassis_utils
Some (e.g. IBM) do not use the `xyz.openbmc_project.Inventory.Item.Board` interface for chassis objects. To handle the use pattern easier, this refactor
Refactor chassisInterfaces into chassis_utils
Some (e.g. IBM) do not use the `xyz.openbmc_project.Inventory.Item.Board` interface for chassis objects. To handle the use pattern easier, this refactors the Chassis interface into one location and it is referenced from the needed places (e.g. `getValidChassisPath()`).
Moreover, this part is repeated many times, which goes against best practices.
Tested: - GET Chassis related API and check they are the same as before - Redfish Service Validator passes
Change-Id: Id4a51986262892c5dc81b1a3bc46fa5be7c0e9da Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
46f780f7
|
| 09-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Move chassis and trigger to dbus utility
Using the utility classes reduces compile times and reduces the number of template specializations that get generated. These are the last two left in the co
Move chassis and trigger to dbus utility
Using the utility classes reduces compile times and reduces the number of template specializations that get generated. These are the last two left in the codebase for getProperty, so fix them.
Tested: On Last commit.
Change-Id: I0ca8411b74b58dbeb42587b88cfd66c0e674b8c8 Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
#
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 ...
|
#
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 ...
|
#
19ea2864
|
| 10-Dec-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Always fall back to ChassisType RackMount
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/75914 added support for dynamic ChassisType. Before 75914, ChassisType was hardcoded to RackMount. If you impl
Always fall back to ChassisType RackMount
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/75914 added support for dynamic ChassisType. Before 75914, ChassisType was hardcoded to RackMount. If you implement Inventory.Item.Chassis the default Chassis Type is Unknown. Unknown in 75914 maps to Invalid and ChassisType is left off the Redfish Chassis resource. The Redfish Validator flags this as an error since ChassisType is a required property in the Chassis schema.
The implementations should be setting the ChassisType but let's get bmcweb bumps back on the rails and just set ChassisType = RackMount if there is an error or if the Chassis Type is something we can't map (like Unknown). This "your default ChassisType is RackMount" matches what we had before.
Tested: Inspection and unit tests only.
Change-Id: Id577be522be7c2d3463da9c497d9063a284a4d54 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
2952f648
|
| 19-Nov-2024 |
Joseph-Jonathan Salzano <joseph-jonathan.salzano@hp.com> |
Dynamically determine ChassisType for Redfish
The function handleChassisGetSubTree will now handle properties that are part of the xyz.openbmc_project.Inventory.Item.Chassis interface. At time of de
Dynamically determine ChassisType for Redfish
The function handleChassisGetSubTree will now handle properties that are part of the xyz.openbmc_project.Inventory.Item.Chassis interface. At time of development this is only ChassisType. The new function "handleChassisProperties" will attempt to get the Type property from the interface, translate it to a Redfish standard string and set it as the ChassisType value. If the property cannot be found the default "RackMount" will be used.
Tested: Added and ran 4 new unit tests. Ran manual tests with ChassisType being exposed via dbus in QEMU emulated environments. Tested on ASPEED 2600 eval board.
Change-Id: Ibbd048db5007f5154e88495ec6e651a3a2137b06 Signed-off-by: Joseph-Jonathan Salzano <joseph-jonathan.salzano@hp.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 ...
|
#
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 ...
|
#
11cc7333
|
| 07-Aug-2024 |
Andrew Geissler <geissonator@yahoo.com> |
chassis: fix power state regression
Commit 539d8c6 introduced a regression on the reported chassis power state (caught by romulus qemu CI).
Tested: - None, simple fix
Change-Id: Iac5b27ae7103fc071
chassis: fix power state regression
Commit 539d8c6 introduced a regression on the reported chassis power state (caught by romulus qemu CI).
Tested: - None, simple fix
Change-Id: Iac5b27ae7103fc0717547cb3e6f124a1c75d65a8 Signed-off-by: Andrew Geissler <geissonator@yahoo.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 ...
|
#
28ee563e
|
| 24-May-2024 |
Myung Bae <myungbae@us.ibm.com> |
Fix Chassis Topology Links Handling
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/60914 implements topology links for chassis using `getAssociationEndPoints()` for `containing/contained_by` associat
Fix Chassis Topology Links Handling
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/60914 implements topology links for chassis using `getAssociationEndPoints()` for `containing/contained_by` associations.
If the association is used only between chassis, the desired result is obtained.
``` busctl get-property xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis \ xyz.openbmc_project.Association.Definitions Associations
a(sss) ... containing" "contained_by" "/xyz/openbmc_project/inventory/system/chassis/motherboard/rdx0" ```
``` $ curl -k -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis",
"Links": { "Contains": [ ... { "@odata.id": "/redfish/v1/Chassis/rdx0" }, ```
However, the same associations can also be used for the other cases which may also be used for the other types[1].
For example, https://gerrit.openbmc.org/c/openbmc/openbmc/+/70372 also adds the associations between chassis and the non-chassis/board resources.
``` busctl get-property xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis \ xyz.openbmc_project.Association.Definitions Associations …
"containing" "contained_by" "/xyz/openbmc_project/inventory/system/chassis/motherboard/connector0" … "containing" "contained_by" "/xyz/openbmc_project/inventory/system/chassis/motherboard/rdx0"
```
In that case, Chassis Links gives the undesired result including the non-chassis resources in `Contains` collection.
``` $ curl -k -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis",
"Links": { "Contains": [ ... { "@odata.id": "/redfish/v1/Chassis/connector0" }, ... ```
This commit is to limit to get the chassis/board resources for Chassis `Contains` collection.
Tested: - Check Chassis/Links collection to see whether there are non-chassis `curl -k -X GET https://${bmc}/redfish/v1/Chassis/chassis`
- Redfish Service Validator passes
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/e2c9bc74f2b8c0e78c305894289f8938d75ee108/yaml/xyz/openbmc_project/Inventory/Item/README.md?plain=1#L21
Change-Id: I472fc12379694acc35055965400141dbb1b33bfc Signed-off-by: Myung Bae <myungbae@us.ibm.com>
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 ...
|
#
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 ...
|
#
89144a3a
|
| 08-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Remove a copy
Capturing by auto here causes a copy. Found using static analysis.
Change-Id: Ifbb08f9af0cd6eeec1e611c610e7adf53e17665c Signed-off-by: Ed Tanous <ed@tanous.net>
|
#
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 ...
|
#
d02aad39
|
| 13-Feb-2024 |
Ed Tanous <ed@tanous.net> |
Create Redfish specific setProperty call
There are currently 78 sdbusplus::asio::setProperty calls in redfish-core. The error handler for nearly all of them looks something like:
``` if (ec) {
Create Redfish specific setProperty call
There are currently 78 sdbusplus::asio::setProperty calls in redfish-core. The error handler for nearly all of them looks something like:
``` if (ec) { const sd_bus_error* dbusError = msg.get_error(); if ((dbusError != nullptr) && (dbusError->name == std::string_view( "xyz.openbmc_project.Common.Error.InvalidArgument"))) { BMCWEB_LOG_WARNING("DBUS response error: {}", ec); messages::propertyValueIncorrect(asyncResp->res, "<PropertyName>", <PropertyValue>); return; } messages::internalError(asyncResp->res); return; } messages::success(asyncResp->res);
```
In some cases there are more errors handled that translate to more error messages, but the vast majority only handle InvalidArgument. Many of these, like the ones in account_service.hpp, do the error handling in a lambda, which causes readability problems. This commit starts to make things more consistent, and easier for trivial property sets.
This commit invents a setDbusProperty method in the redfish namespace that tries to handle all DBus errors in a consistent manner. Looking for input on whether this will work before changing over the other 73 calls. Overall this is less code, fewer inline lambdas, and defaults that should work for MOST use cases of calling an OpenBMC daemon, and fall back to more generic errors when calling a "normal" dbus daemon.
As part of this, I've ported over several examples. Some things that might be up in the air: 1. Do we always return 204 no_content on property sets? Today there's a mix of 200, with a Base::Success message, and 204, with an empty body. 2. Do all DBus response codes map to the same error? A majority are covered by xyz.openbmc_project.Common.Error.InvalidArgument, but there are likely differences. If we allow any daemon to return any return code, does that cause compatibility problems later?
Tested: ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X PATCH -d '{"HostName":"openbmc@#"}' https://192.168.7.2/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 ```
Returns the appropriate error in the response Base.1.16.0.PropertyValueIncorrect
Change-Id: If033a1112ba516792c9386c997d090c8f9094f3a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
e5ae9c1c
|
| 15-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
Update indicator LED verification
Extend the hasIndicatorLed array and add xyz.openbmc_project.Inventory.Item.Chassis interface.
Tested: ``` curl -k https://$bmc/redfish/v1/Chassis/chassis { "@od
Update indicator LED verification
Extend the hasIndicatorLed array and add xyz.openbmc_project.Inventory.Item.Chassis interface.
Tested: ``` curl -k https://$bmc/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", "Actions": { "#Chassis.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Chassis/chassis/ResetActionInfo", "target": "/redfish/v1/Chassis/chassis/Actions/Chassis.Reset" } }, "ChassisType": "RackMount", "Id": "chassis", "Links": { "ComputerSystems": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.WZS004K" } }, "IndicatorLED": "Off", "LocationIndicatorActive": false, "Manufacturer": "", "Model": "23", "Name": "chassis", "PCIeDevices": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices" }, "PartNumber": "", "Power": { "@odata.id": "/redfish/v1/Chassis/chassis/Power" }, "PowerState": "Off", "Sensors": { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors" }, "SerialNumber": "", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "StandbyOffline" }, "Thermal": { "@odata.id": "/redfish/v1/Chassis/chassis/Thermal" } } ```
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I02e77d56e555f9aee3f76015baeebbf1f4a292ab
show more ...
|