#
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 ...
|
#
ad622676 |
| 07-Sep-2022 |
Sunny Srivastava <sunnsr25@in.ibm.com> |
Remove link from Chassis to PCIeDevice
The commit removes current support that assumes 1:1 system:Chassis for Chassis/PCIeDevices. Current implementation populates the same collection of PCIeDevices
Remove link from Chassis to PCIeDevice
The commit removes current support that assumes 1:1 system:Chassis for Chassis/PCIeDevices. Current implementation populates the same collection of PCIeDevices with chassis and with system. Since the path is /redfish/v1/Systems/system/PCIeDevices and we already have a link from /redfish/v1/Systems/system/, removing the link here in Chassis. The link from Chassis to /redfish/v1/Systems/system/PCIeDevices is unexpected. For systems with multiple chassis the current assumption does not hold true. It breaks there, as it assumes all PCIeDevices are in all Chassis.
This is just a link and since another link from system resource already exists. The case of walking the whole tree isn't broke. And so, this should not break clients.
Validator has been executed with no new errors.
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com> Change-Id: Id3af01ec99708c36b5fff2a63f04ffd722f6c3a2 Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
show more ...
|
#
b4d593f1 |
| 16-Feb-2024 |
Carson Labrado <clabrado@google.com> |
Chassis: Add support for Version property
Add support for the Version property of Chassis resources. That property was added in Chassis schema v1.21.0.
This makes use of the "xyz.openbmc_project.I
Chassis: Add support for Version property
Add support for the Version property of Chassis resources. That property was added in Chassis schema v1.21.0.
This makes use of the "xyz.openbmc_project.Inventory.Decorator.Revision" interface that is already defined by phosphor-dbus-interfaces.
Tested: Validator passed and Version property was correctly populated. No issues on other Chassis resources which do not have a Version property.
I added this to an entity-manager json config:
"xyz.openbmc_project.Inventory.Decorator.Revision": { "Version": "$PRODUCT_VERSION" }
The PRODUCT_VERSION field from a given FRU eeprom was picked up by FruDevice and it was exposed under the associated Chassis resource:
busctl get-property xyz.openbmc_project.FruDevice \ /xyz/openbmc_project/FruDevice/Test \ xyz.openbmc_project.FruDevice PRODUCT_VERSION s "V1.0"
curl -s 'localhost/redfish/v1/Chassis/TestChassis' { "@odata.id": "/redfish/v1/Chassis/TestChassis", ... "Version": "V1.0" }
Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: Ie1391d46e81fd8c503fe4b1e6d683dd4553a5419
show more ...
|
#
8ece0e45 |
| 02-Jan-2024 |
Ed Tanous <ed@tanous.net> |
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")
At some point in the future, we might want to get this enabled in CI.
Change-Id: Iccb57b2adfd06a2
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")
At some point in the future, we might want to get this enabled in CI.
Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
7164bc62 |
| 15-Oct-2023 |
Chau Ly <chaul@amperecomputing.com> |
chassis: Tidy up lambda funcs in get chassis
This commit tries to avoid the cumbersomeness of lambda functions used directly or indirectly by handleChassisGet method. Lengthy lambda functions are re
chassis: Tidy up lambda funcs in get chassis
This commit tries to avoid the cumbersomeness of lambda functions used directly or indirectly by handleChassisGet method. Lengthy lambda functions are replaced by or involve normal functions. There's no functional change in this commit.
Change-Id: I67e028cdab3ea4407dafde0a510b37a160497f48 Signed-off-by: Chau Ly <chaul@amperecomputing.com>
show more ...
|
#
59a17e4f |
| 07-Oct-2022 |
George Liu <liuxiwei@inspur.com> |
Rename getLocationIndicatorActive/setLocationIndicatorActive
This commit renames getLocationIndicatorActive/setLocationIndicatorActive No functional changes.
Tested: built bmcweb successfully and V
Rename getLocationIndicatorActive/setLocationIndicatorActive
This commit renames getLocationIndicatorActive/setLocationIndicatorActive No functional changes.
Tested: built bmcweb successfully and Validator passes
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0c5d538c1dd9f0d8dd1e6ae4d8ba4f606b804373 Signed-off-by: Lakshmi Yadlapati <lakshmiy@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 ...
|
#
3544d2a7 |
| 06-Aug-2023 |
Ed Tanous <edtanous@google.com> |
Use ranges
C++20 brought us std::ranges for a lot of algorithms. Most of these conversions were done using comby, similar to:
``` comby -verbose 'std::lower_bound(:[a].begin(),:[b].end(),:[c])' 's
Use ranges
C++20 brought us std::ranges for a lot of algorithms. Most of these conversions were done using comby, similar to:
``` comby -verbose 'std::lower_bound(:[a].begin(),:[b].end(),:[c])' 'std::ranges::lower_bound(:[a], :[c])' $(git ls-files | grep "\.[hc]\(pp\)\?$") -in-place ```
Change-Id: I0c99c04e9368312555c08147d474ca93a5959e8d Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
#
630adcdc |
| 20-Feb-2023 |
Chau Ly <chaul@amperecomputing.com> |
chassis: Change intrusion sensor look up method
This commit changes to using the interface "xyz.openbmc_project.Chassis.Intrusion" to look up for the chassis intrusion sensor's DBus object path unde
chassis: Change intrusion sensor look up method
This commit changes to using the interface "xyz.openbmc_project.Chassis.Intrusion" to look up for the chassis intrusion sensor's DBus object path under "/xyz/openbmc_project" path, instead of specifying the complete object path. This helps remove the dependence on the object path and relies on the interface name instead.
Change-Id: I046d1d2825f65f49b225c29239647c423b67242e Signed-off-by: Chau Ly <chaul@amperecomputing.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 ...
|
#
a5617496 |
| 29-Jun-2021 |
Jie Yang <jjy@google.com> |
Add topology links for Chassis
Implement the physical topology design[0] for Chassis resources to report which Chassis contain or are contained by other Chassis.
Query this information from the obj
Add topology links for Chassis
Implement the physical topology design[0] for Chassis resources to report which Chassis contain or are contained by other Chassis.
Query this information from the object mapper using associations defined in phosphor-dbus-interfaces[1] and make it available in the Links section of the Redfish result.
[0] https://gerrit.openbmc.org/c/openbmc/docs/+/54205 [1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58441
Tested: Built for evb-ast2600 with example JSON configs and ran in QEMU
Ran Redfish Service Validator with no new warnings
Sample output: ''' curl -k -u root:0penBmc -X GET https://127.0.0.1:60443/redfish/v1/Chassis/Subchassis { "@odata.id": "/redfish/v1/Chassis/Subchassis", "@odata.type": "#Chassis.v1_16_0.Chassis", ... "Id": "Subchassis", "Links": { "ComputerSystems": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "ContainedBy": { "@odata.id": "/redfish/v1/Chassis/Superchassis" }, "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, ... }
curl -k -u root:0penBmc -X GET https://127.0.0.1:60443/redfish/v1/Chassis/Superchassis { "@odata.id": "/redfish/v1/Chassis/Superchassis", "@odata.type": "#Chassis.v1_16_0.Chassis", ... "Id": "Superchassis", "Links": { "ComputerSystems": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "Contains": [ { "@odata.id": "/redfish/v1/Chassis/Subchassis" } ], "Contains@odata.count": 1, "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, ... } '''
Signed-off-by: Jie Yang <jjy@google.com> Signed-off-by: Zhenwei Chen <zhenweichen0207@gmail.com> Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: Idc4c3e99b8269bcc5f94112e977a89970abd0bf3
show more ...
|
#
9ae226fa |
| 21-Jun-2023 |
George Liu <liuxiwei@inspur.com> |
Refactor setProperty method
SetProperty is a method we should use more, and use consistently in the codebase, this commit makes it consistently used from the utility namespace.
Tested: Refactor. C
Refactor setProperty method
SetProperty is a method we should use more, and use consistently in the codebase, this commit makes it consistently used from the utility namespace.
Tested: Refactor. Code compiles.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I5939317d23483e16bd98a8298f53e75604ef374d
show more ...
|
#
d4b054c1 |
| 12-Jun-2023 |
Willy Tu <wltu@google.com> |
chassis: Pass ec by reference
Remove passing ec by value for getProperty.
Change-Id: I9070ca7035fead14faa236eb1b17937ffe13045b Signed-off-by: Willy Tu <wltu@google.com>
|
#
5e577bc1 |
| 25-Jul-2022 |
Willy Tu <wltu@google.com> |
storage: add support for multiple storages
Updated Storage resource to `#Storage.v1_9_1.Storage` to support the change.
Follow the Swordfish spec to setup the Storage relationship[1].
There will n
storage: add support for multiple storages
Updated Storage resource to `#Storage.v1_9_1.Storage` to support the change.
Follow the Swordfish spec to setup the Storage relationship[1].
There will now be two Storage Collection `/redfish/v1/Stroage` and `/redfish/v1/Systems/system/Storage`. The storage in `/Storage` will be treated as a subsystem and only link to the `/Systems/system/Storage` under `Links/StorageServices` resource.
The `/Storage` won't contain Drives or StorageControllers.
Tested: Passed Redfish Validator for related resources. ``` *** /redfish/v1/Storage/storage_1 INFO - Type (Storage.v1_7_1.Storage), GET SUCCESS (time: 0) WARNING - StorageControllers: The given property is deprecated: This property has been deprecated in favor of Controllers to allow for storage controllers to be represented as their own resources. INFO - Attempt 1 of /redfish/v1/Chassis/chassis0/Drives/drive0 INFO - Response Time for GET to /redfish/v1/Chassis/chassis_0/Drives/drive_0: 0.07591272401623428 seconds. INFO - PASS INFO - ```
Chassis ``` wget -qO- http://localhost:80/redfish/v1/Chassis/chassis0 { "@odata.id": "/redfish/v1/Chassis/chassis0", "@odata.type": "#Chassis.v1_14_0.Chassis", "Id": "chassis0", "Links": { "Storage": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0" } ], "Storage@odata.count": 1 }, "Name": "chassis0", }} ```
Storage Collection ``` wget -qO- http://localhost:80/redfish/v1/Storage { "@odata.id": "/redfish/v1/Storage", "@odata.type": "#StorageCollection.StorageCollection", "Members": [ { "@odata.id": "/redfish/v1/Storage/storage0" } ], "Members@odata.count": 1, "Name": "Storage Collection" }
wget -qO- http://localhost:80/redfish/v1/Systems/system/Storage { "@odata.id": "/redfish/v1/Systems/system/Storage", "@odata.type": "#StorageCollection.StorageCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0" } ], "Members@odata.count": 1, "Name": "Storage Collection" } ```
Storage ``` wget -qO- http://localhost:80/redfish/v1/Storage/storage0 { "@odata.id": "/redfish/v1/Storage/storage0", "@odata.type": "#Storage.v1_9_1.Storage", "Id": "storage0", "Links": { "StorageServices": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0" } ], "StorageServices@odata.count": 1 }, "Name": "Storage", "Status": { "State": "Enabled" } }
wget -qO- http://localhost:80/redfish/v1/Systems/system/Storage/storage0 { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0", "@odata.type": "#Storage.v1_9_1.Storage", "Drives": [ { "@odata.id": "/redfish/v1/Chassis/chassis0/Drives/drive0" } ], "Drives@odata.count": 1, "Id": "storage0", "Name": "Storage",[1] "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "StorageControllers": [ { "@odata.id": "/redfish/v1/Systems/system/Storage/storage0#/StorageControllers/0", "@odata.type": "#Storage.v1_7_0.StorageController", "MemberId": "controller", "Name": "controller", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } ] } ```
[1] https://www.snia.org/sites/default/files/technical-work/swordfish/draft/v1.2.2/pdf/Swordfish_v1.2.2_NVMeMappingGuide.pdf#page=17
Change-Id: Ib81b68e7f61b817d4dfa4ed2f27afd6e74e8ce58 Signed-off-by: Tom Tung <shes050117@gmail.com> Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: Ed Tanous <edtanous@google.com>
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 ...
|
#
fc903b3d |
| 31-May-2023 |
Andrew Geissler <geissonator@yahoo.com> |
bmc-ready: provide special error return on BMCNotReady
A new feature has been proposed[1] and implemented[2] which can be optionally enabled on a system to not allow a chassis or host power on opera
bmc-ready: provide special error return on BMCNotReady
A new feature has been proposed[1] and implemented[2] which can be optionally enabled on a system to not allow a chassis or host power on operation when the BMC is not in a "Ready" state.
In those situations, if a power on operation is requested, the D-Bus error response will be a specific BMCNotReady error. In those situations, respond to the user with a more targeted error asking them to retry in 10 seconds. The 10s retry is based on my experience with OpenBMC based systems, the longest time between bmcweb being up and running and BMC Ready is around 30s.
Tested: - Enabled BMC Ready feature, manually put BMC in NotReady state, and requested a: ``` /redfish/v1/Chassis/chassis/Actions/Chassis.Reset -d '{"ResetType": "PowerCycle"}' ``` - Confirmed new response message: ``` "Message": "The service is temporarily unavailable. Retry in 10 seconds." ``` - Stopped Chassis state service and verified expected "internal service error" on same request - Ran similar test with Systems/system/Actions/ComputerSystem.Reset API - Confirmed good paths still worked as expected
[1]: https://lists.ozlabs.org/pipermail/openbmc/2023-May/033383.html [2]: https://gerrit.openbmc.org/q/topic:bmc-ready-check
Change-Id: I6a6e5774c96b4f37c794ba49a5e06d3e51156d09 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
51dab2a7 |
| 30-May-2023 |
Andrew Geissler <geissonator@yahoo.com> |
chassis: consistently log error on internal fails
Debugging internalError responses from bmcweb has been a consistent pain point for us. It does help to at least have the boost error code logged to
chassis: consistently log error on internal fails
Debugging internalError responses from bmcweb has been a consistent pain point for us. It does help to at least have the boost error code logged to the journal. Ensure the error code is logged to the journal consistently within the chassis file.
If this commit makes sense to the maintainers then I will work on making this consistent in other files at a later date.
Tested: - Verified it compiled and one of the error paths traced the appropriate boost error code.
Change-Id: I76b7644bc18e76fff69595fb5f1bc23d257563e9 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|