#
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 ...
|
#
c6830d5f
|
| 10-Feb-2023 |
Gunnar Mills <gmills@us.ibm.com> |
Revert "Add the getAssociationEndPoints method"
This reverts commit 369ea3ffb0c76c33c7ccd0bbb0e8dcb0039cd285.
bmcweb bumps are failing romulus qemu CI tests. This started with https://gerrit.openbm
Revert "Add the getAssociationEndPoints method"
This reverts commit 369ea3ffb0c76c33c7ccd0bbb0e8dcb0039cd285.
bmcweb bumps are failing romulus qemu CI tests. This started with https://gerrit.openbmc.org/c/openbmc/openbmc/+/60786.
https://gerrit.openbmc.org/c/openbmc/openbmc/+/60756 passed.
Only 1 commit diff here.
The manager call is failing here:
``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Managers/bmc { "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_14_0.Manager", ... "UUID": "0623b376-dc4f-4a29-93e0-cc982bfb9aae", "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.13.0.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.13.0.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } } ```
Let's get the bumps back to passing.
Change-Id: Ia27b1a5024b480786cc776c4ab9586bd75bf1242 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
369ea3ff
|
| 23-Nov-2022 |
George Liu <liuxiwei@inspur.com> |
Add the getAssociationEndPoints method
There are currently many files that use the get endpoints methods[1]. Since they are general methods, they are defined in the dbus_utility.hpp file and will be
Add the getAssociationEndPoints method
There are currently many files that use the get endpoints methods[1]. Since they are general methods, they are defined in the dbus_utility.hpp file and will be further refactored in subsequent patches.
Also, Updated the populateSoftwareInformation method of sw_utils.hpp
[1] https://github.com/openbmc/docs/blob/master/architecture/object-mapper.md#associations When an object with, for example, an object path of pathA uses the following values:
["foo", "bar", "pathB"]
The mapper will create 2 new objects:
pathA/foo pathB/bar
Tested: Built bmcweb successuflly and Validator passes curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Managers/bmc { "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_14_0.Manager", ... "FirmwareVersion": "2.14.0-dev-95-gea3949e76-dirty", ... }
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I6567f63ab63709504b46ed49b00055a8ffc34124
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 ...
|
#
0ec8b83d
|
| 14-Mar-2022 |
Ed Tanous <edtanous@google.com> |
Generate Redfish enums from schemas
OpenBMC tends to have a significant problem in doing the appropriate lookups from the schema files, and many bugs have been injected by users picking a bad enum,
Generate Redfish enums from schemas
OpenBMC tends to have a significant problem in doing the appropriate lookups from the schema files, and many bugs have been injected by users picking a bad enum, or mistyping the casing of an enum value.
At the same time, nlohmann::json has recently added first class support for enums, https://json.nlohmann.me/features/enum_conversion/
This commit attempts to build a set of redfish includes file with all the available Redfish enums in an easy to use enum class. This makes it very clear which enums are supported by the schemas we produce, and adds very little to no extra boilerplate on the human-written code we produced previously.
Note, in the generated enum class, because of our use of the clang-tidy check for macros, the clang-tidy check needs an exception for these macros that don't technically follow the coding standard. This seems like a reasonable compromise, and in this case, given that nlohmann doesn't support a non-macro version of this.
One question that arises is what this does to the binary size.... Under the current compiler optimizations, and with the current best practices, it leads to an overall increase in binary size of ~1200 bytes for the enum machinery, then approximately 200 bytes for every call site we switch over. We should decide if this nominal increase is reasonable.
Tested: Redfish protocol validator runs with same number of failures as previously. Redfish Service Validator passes (one unrelated qemu-specific exception)
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7c7ee4db0823f7c57ecaa59620b280b53a46e2c1
show more ...
|
#
613dabea
|
| 09-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Remove nlohmann brace initialization
There's a few last places (outside of tests) where we still use nlohmann brace initialization. Per the transforms we've been doing, move these to constructing t
Remove nlohmann brace initialization
There's a few last places (outside of tests) where we still use nlohmann brace initialization. Per the transforms we've been doing, move these to constructing the objects explicitly, using operator[], nlohmann::object_t and nlohmann::array_t. Theses were found by manual inspection grepping for all uses of nlohmann::json.
This is done to reduce binary size and reduce the number of intermediate objects being constructed. This commit saves a trivial amount of size (~4KB, Half a percent of total) and in addition but makes our construction consistent.
Tested: Redfish service validator passes.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7478479a9fdc41b254eef325002d413c1fb411a0
show more ...
|
#
d1bde9e5
|
| 07-Sep-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
used sdbusplus::unpackPropertiesNoThrow part 8
used sdbusplus::unpackPropertiesNoThrow in other places, also replaced all usages of "GetAll" with sdbusplus::asio::getAllProperties
bmcweb size:
used sdbusplus::unpackPropertiesNoThrow part 8
used sdbusplus::unpackPropertiesNoThrow in other places, also replaced all usages of "GetAll" with sdbusplus::asio::getAllProperties
bmcweb size: 2697640 -> 2685336 (-12304) compressed size: 1129728 -> 1126078 (-3650)
Tested: - Executed redfish service validator, no new errors detected
Change-Id: I916e462e004fcbde67c209daef295de8f5fb68eb Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
#
83edb08f
|
| 19-Jun-2022 |
Gunnar Mills <gmills@us.ibm.com> |
Fix Validator Error for Updateable spelling
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/54577/5/redfish-core/include/utils/sw_utils.hpp#377 changed the spelling of Updateable. This caused the bmcw
Fix Validator Error for Updateable spelling
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/54577/5/redfish-core/include/utils/sw_utils.hpp#377 changed the spelling of Updateable. This caused the bmcweb bump to fail the Redfish Validator. This most likely was just an accident.
The Error is: ERROR - Updatable not defined in schema SoftwareInventory.v1_1_0 (check version, spelling and casing) ERROR - Attempting Updateable (from Updatable)?
Updatable, although more common, is not the Redfish property name. From https://redfish.dmtf.org/schemas/SoftwareInventory.v1_7_0.json: "Updateable": { "description": "An indication of whether the Update...
Tested: None.
Change-Id: I8d2ab12f26e5df7ee35c5363acf70c1977fbcfdb Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
eee0013e
|
| 14-Jun-2022 |
Willy Tu <wltu@google.com> |
sw_util: Rename all Firmware to Software wherever possible
Rename to Software so we can reuse it for software inventory. This make is more consistent to the SoftwareVersion dbus interface that is us
sw_util: Rename all Firmware to Software wherever possible
Rename to Software so we can reuse it for software inventory. This make is more consistent to the SoftwareVersion dbus interface that is used.
Change-Id: I97fb10fccf744a6d6d4cba57f970759431bf4744 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|