#
3577e446
|
| 19-Aug-2025 |
Ed Tanous <ed@tanous.net> |
Fix includes
Our includes haven't been enforced by tidy in a while. Run the script, check in the result, minus the false positives.
Change-Id: I6a6da26f5ba5082d9b4aa17cdc9f55ebd8cd41a6 Signed-off-
Fix includes
Our includes haven't been enforced by tidy in a while. Run the script, check in the result, minus the false positives.
Change-Id: I6a6da26f5ba5082d9b4aa17cdc9f55ebd8cd41a6 Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
#
d9cca622
|
| 13-Jun-2025 |
James Athappilly <jamesatha@meta.com> |
Fix addMetadata iterator comparisons
Recently, we noticed our a number of our redfish requests were giving unexpected Bad Request errors and we pinpointed it to a change in 82b286fb77833c70bd670f3b4
Fix addMetadata iterator comparisons
Recently, we noticed our a number of our redfish requests were giving unexpected Bad Request errors and we pinpointed it to a change in 82b286fb77833c70bd670f3b428e49f6d9416d06 [1]. This fixes the logic so we properly add metadata when it's there instead of skipping over it
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/80063
Change-Id: I9a50afd4da1acaa4fa2388e5e22bdac327776509 Signed-off-by: James Athappilly <jamesatha@gmail.com>
show more ...
|
#
82b286fb
|
| 06-May-2025 |
Ed Tanous <ed@tanous.net> |
Remove implicit conversions
Since 2020, nlohmann has recognized that implicit conversions to and from json are an issue. Many bugs have been caused at both development time and runtime due to unexp
Remove implicit conversions
Since 2020, nlohmann has recognized that implicit conversions to and from json are an issue. Many bugs have been caused at both development time and runtime due to unexpected implicit conversions from json to std::string/int/bool. This commit disables implicit conversions using JSON_USE_IMPLICIT_CONVERSIONS [1]. This option will become the default in the future. That comment was written 3 years ago at this point, so we should prepare.
Tested: Redfish service validator passes.
[1] https://json.nlohmann.me/api/macros/json_use_implicit_conversions/ Change-Id: Id6cc47b9bbf8889e4777fd6d77ec992f3139962c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
3d158643
|
| 12-May-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix the build
I don't feel like breaking these out at the moment or writing a commit message. This fixes the build for clang-tidy. If anyone wants to break these out with appropriate commit messag
Fix the build
I don't feel like breaking these out at the moment or writing a commit message. This fixes the build for clang-tidy. If anyone wants to break these out with appropriate commit messages, feel free.
Change-Id: Id0b65d238dfb9b8036c0ffddf2f32d221e5988c2 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 ...
|
#
44914192
|
| 11-Mar-2025 |
Zev Weiss <zev@bewilderbeest.net> |
Add handling for liquidflow & pressure sensors
When pressure [1] and liquidflow [2] were added to phosphor-dbus-interfaces, bmcweb's unit-handling code and list of dbus sensor paths weren't updated
Add handling for liquidflow & pressure sensors
When pressure [1] and liquidflow [2] were added to phosphor-dbus-interfaces, bmcweb's unit-handling code and list of dbus sensor paths weren't updated accordingly; let's add them now.
Tested: pressure and liquidflow sensors on dbus now appear (including appropriate units) in the redfish hierarchy and on the webui-vue sensors page.
[1] https://github.com/openbmc/phosphor-dbus-interfaces/commit/69d821b0368b8c6943a91c7f96528e2c0047f432 [2] https://github.com/openbmc/phosphor-dbus-interfaces/commit/6a8507d06e172d8d29c0459f0a0d078553d2ecc7
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I1dbe869d6c642eaeebad8605adad50315c52ad3d
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 ...
|
#
daadfb2e
|
| 20-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix clang-tidy
Change-Id: Iefe1b695b86a640d8dfaafd1f77f374fa34246de Signed-off-by: Ed Tanous <etanous@nvidia.com>
|
#
deae6a78
|
| 11-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and re
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and responses to help with debugging.
Tested: Redfish service validator passes.
Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
afc474ae
|
| 09-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Format readjson
clang-format may potentially reformat the readJson calls if they may have more keys or key names are longer. This makes formatting in a way that's readable by forcing to break a line
Format readjson
clang-format may potentially reformat the readJson calls if they may have more keys or key names are longer. This makes formatting in a way that's readable by forcing to break a line for each key using an empty-comment (`//`) each line.
It also allows trivially alphabetizing the list such that new additions are less likely to have merge conflicts.
Tested: - Check whitespace only. - Code compiles. - Redfish Service Validator with the same results before this
Change-Id: I3824a8c4faa9fa7c820d5d2fab6b565404926e2c Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
4e196b9a
|
| 27-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
json utility: Update sort algorithms
Modified sort utility to be able to sort on a specified key. New utility function sortJsonArrayByKey() added.
Note: - Function odataObjectCmp() renamed to obje
json utility: Update sort algorithms
Modified sort utility to be able to sort on a specified key. New utility function sortJsonArrayByKey() added.
Note: - Function odataObjectCmp() renamed to objectKeyCmp() - New function odataObjectCmp() created which calls objectKeyCmp() with @odata.id key specified. - Comments for odataObjectCmp() didn't match behavior for object without key. These objects are sorted as less than objects with the key. - sortJSONResponse() modified to use the new sortJsonArrayByKey().
Tested: - Added new unit tests. These tests are in addition to the existing tests. So they focus on testing comparing by different keys. The existing tests already cover the different permutations of the basic comparisons. - Redfish Service validator passes
Change-Id: I949b7cb868c59a8eeda3798e6a82a1572bbc5792 Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
#
6be832e2
|
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that c
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that can likely be had.
[1] https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=edtanous_bmcweb&open=AY9_HYjgKXKyw1ZFwgVP
Tested: Comment change only. Code compiles.
Change-Id: Ia960317761f558a87842347ca0b5f3da63f8e730 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
4ff0f1f4
|
| 04-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
static -> inline
Declaring a function static in a header makes no sense, because a header isn't a compile unit. Find all the issues and replace them with inline.
Change-Id: Icfc2b72d94b41a3a880da1
static -> inline
Declaring a function static in a header makes no sense, because a header isn't a compile unit. Find all the issues and replace them with inline.
Change-Id: Icfc2b72d94b41a3a880da1ae6975beaa30a6792b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
f836c1d8
|
| 06-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix static analysis
Making these const means that we can no longer use std::move on this struct, which static analysis flags.
[1] https://sonarcloud.io/project/issues?impactSeverities=HIGH&issueSta
Fix static analysis
Making these const means that we can no longer use std::move on this struct, which static analysis flags.
[1] https://sonarcloud.io/project/issues?impactSeverities=HIGH&issueStatuses=OPEN%2CCONFIRMED&tags=since-c%2B%2B11&types=CODE_SMELL&id=edtanous_bmcweb&open=AZHJOZJsIkxRoiGIkzZz
Change-Id: I10c33f37ce14650962a7840729d75639ee8edb2e Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
4e0d8789
|
| 06-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix std::forwards
Static analyzer flags that these are wrong. Should only std::forward on the same thing that's passed
[1] https://sonarcloud.io/project/issues?severities=BLOCKER%2CCRITICAL%2CMAJO
Fix std::forwards
Static analyzer flags that these are wrong. Should only std::forward on the same thing that's passed
[1] https://sonarcloud.io/project/issues?severities=BLOCKER%2CCRITICAL%2CMAJOR%2CMINOR&sinceLeakPeriod=true&issueStatuses=OPEN%2CCONFIRMED&types=BUG&id=edtanous_bmcweb&open=AZHJOZJsIkxRoiGIkzaq
Change-Id: Ib2b77a0c56e5dbf9e0d038f0eb1361ccce7ac1d9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
0c728b42
|
| 29-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Add enum for chassis sub nodes
Added ChassisSubNode enum for defining the different chassis subNode paths to retrieving sensor data.
Modified path building sensor data to use the enum. Oth
Sensors: Add enum for chassis sub nodes
Added ChassisSubNode enum for defining the different chassis subNode paths to retrieving sensor data.
Modified path building sensor data to use the enum. Other paths were left still using the string. Specifically the paths using SensorsAsyncResp as these primarily use the strings for human readable output.
Added utility functions to convert to/from enum to string value. Added unit tests for new utility functions.
Tested: - Verified sensor paths before and after change had no change: - /redfish/v1/Chassis/chassis/Sensors - /redfish/v1/Chassis/chassis/Thermal - /redfish/v1/Chassis/chassis/Power - Selection of: /redfish/v1/Chassis/chassis/Sensors/<sensor> - /redfish/v1/Chassis/chassis/Sensors?\$expand=* - Redfish Validator passes
Change-Id: I02bb5f3c0c49d85dbd1dff911d9f1a8467d6b1db Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
#
c9563608
|
| 28-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Move objectPropertiesToJson() to sensor_utils
This commit move objectPropertiesToJson() to the sensor_utils class. This is in preparation for building sensor excerpts using the same code wh
Sensors: Move objectPropertiesToJson() to sensor_utils
This commit move objectPropertiesToJson() to the sensor_utils class. This is in preparation for building sensor excerpts using the same code which builds a sensor. By moving the function into the sensor utility class it should help with compile time by not needing to include all of sensor code by the files implementing the excerpts.
Additional functions and definitions were moved into the sensor_utils class as well due to dependencies from objectPropertiesToJson().
Tested: - Confirmed output unchanged for following URI: - /redfish/v1/Chassis/chassis/Sensors - Selection of: /redfish/v1/Chassis/chassis/Sensors/<sensorId> - /redfish/v1/Chassis/chassis/Sensors?\$expand=* - Redfish Validator passes
Change-Id: I563a560b5b2760e0421c1402d51216101af40be2 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
#
1516c21b
|
| 14-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Create utility class for sensors
Create a separate utility class for sensors. The goal is to make these functions easily available for use outside of sensors for paths which need reference
Sensors: Create utility class for sensors
Create a separate utility class for sensors. The goal is to make these functions easily available for use outside of sensors for paths which need reference sensors.
Moved splitSensorNameAndType() into new utility class.
Created new utility function getSensorId(). The Id for a sensor is built from its name and type in a few different locations. These are modified to call the new function. The function has also been simplified to use std::format() to build the Id.
Tested: - Checked before and after results for queries using this function: (Note: I was not able to confirm the setSensorsOverride() caller as it is only being used for redfish-allow-deprecated-power-thermal URI.) ''' - https://${bmc}/redfish/v1/Chassis/chassis/Sensors - https://${bmc}/redfish/v1/Chassis/chassis/Sensors/<str> where <str> was sensors of different types - https://${bmc}/redfish/v1/Chassis/chassis/Sensors?\$expand=* - https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans - https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies ''' - Redfish Validator passed
Change-Id: Ifa200b6e63f8e52d47f70c33d350999f5c527bbd Signed-off-by: Janet Adkins <janeta@us.ibm.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 ...
|
#
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 ...
|
#
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 ...
|