History log of /openbmc/bmcweb/features/redfish/lib/metric_report_definition.hpp (Results 1 – 25 of 66)
Revision Date Author Comments
# 42f54ec8 19-Aug-2025 Ed Tanous <etanous@nvidia.com>

Remove unused methods

Converting hpp -> cpp determined that these functions were unused. Fix
them.

Tested: Code compiles.

Change-Id: Ifb712cb12085c187847666194b59caa959f37f83
Signed-off-by: Ed Ta

Remove unused methods

Converting hpp -> cpp determined that these functions were unused. Fix
them.

Tested: Code compiles.

Change-Id: Ifb712cb12085c187847666194b59caa959f37f83
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 2169e896 25-Jul-2025 Michal Orzel <michalx.orzel@intel.com>

Fix patching MetricReportDefinition's ReportAction

Due to missing code, successful PATCH requests on
`MetricReportDefinition` resource with changed `ReportActions` property
always returned internal

Fix patching MetricReportDefinition's ReportAction

Due to missing code, successful PATCH requests on
`MetricReportDefinition` resource with changed `ReportActions` property
always returned internal error. This change corrects that behavior by
adding handler exit when dbus method call doesn't return any error.

Error handling process has been reviewed and optimized, to make sure
that `verifyCommonErrors` gets called for every request.

Tested:

1. Add simple report definition via POST on
/redfish/v1/TelemetryService/MetricReportDefinitions, with some initial
value of `ReportActions` property.
2. PATCH request on created `MetricReportDefinition` resource with new
value of `ReportActions` property.
3. Verified that response code is same as expected (204).

Change-Id: Ieef1b53fa6e1f7095e878abe3a71c0a6080dccbd
Signed-off-by: Michal Orzel <michalx.orzel@intel.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 ...


# 761cdfa5 15-Apr-2024 Ed Tanous <ed@tanous.net>

Fix more moves

This commit is fixing coverity issues reported for copy in stead of
move.

Tested: redfish service validator passes

Change-Id: I97e755830f28390e7c4bfaba6f3f947898a21423
Signed-off-by

Fix more moves

This commit is fixing coverity issues reported for copy in stead of
move.

Tested: redfish service validator passes

Change-Id: I97e755830f28390e7c4bfaba6f3f947898a21423
Signed-off-by: Ed Tanous <ed@tanous.net>

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 ...


# 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 ...


# dac07cad 31-Dec-2024 Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>

Fix MRD patch request with overwriting metrics

Follow-up for [1]
Patch request with body:

{"Metrics": [{"MetricProperties": ["<path_to_sensor>"]}]}

updates metric properly, without appending to ol

Fix MRD patch request with overwriting metrics

Follow-up for [1]
Patch request with body:

{"Metrics": [{"MetricProperties": ["<path_to_sensor>"]}]}

updates metric properly, without appending to old "MetricProperties"
values

[1]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76532

Change-Id: I9e2bbea28f3b17adeb61c7f3e54eec87c103ef54
Signed-off-by: Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>

show more ...


# a64919e8 12-Dec-2024 Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>

Fix issues in MRD patch requests

After commit [1] 'null' value was being rejected with
[json_utils.hpp] Value for key Metrics was incorrect type: null
Using 'null' here seems to be one of the cases

Fix issues in MRD patch requests

After commit [1] 'null' value was being rejected with
[json_utils.hpp] Value for key Metrics was incorrect type: null
Using 'null' here seems to be one of the cases that [2] describes

Commit [3] fixed an issue where {} replaced "MetricProperties" of
a metric with an empty array but introduced a different one
- trying to replace a metric caused new values in "MetricProperties"
to get added to old ones.
if (metric.find("MetricProperties") == metric.end()) check was initially
present in [4] but got removed at some point,
re-adding it fixes the issue

Tested:
Patch request to [5] with body: {"Metrics": [null]} no longer fails
and deletes a metric
Patch request with {"Metrics": [{}]} leaves metric unchanged
Patch request with
{"Metrics": [{"MetricProperties": ["<path_to_sensor>"]}]}
updates metric properly,
without appending to old "MetricProperties" values
Patch requests containing mixed values also work correctly

[1]: b14f357f527eae05aa1bd7a115d3f6ed237a35bb
[2]: 8099c51796bf6f94ad5fbb1f6844d700f498d3bb
[3]: ba498310f761b3c0f475ecbdb293cf1386544a33
[4]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/72319
[5]: https://<bmcip>/redfish/v1/TelemetryService/MetricReportDefinitions/<existing_mrd_name>

Change-Id: Ia3d4699784f493bd63a2df4d6edf5053760221e1
Signed-off-by: Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.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 ...


# 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 ...


# ba498310 10-Oct-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Improved telemetry service error handling

By using data that is send in error massage it is possible to report
detailed information about error to user. Now instead of performing same
validation in

Improved telemetry service error handling

By using data that is send in error massage it is possible to report
detailed information about error to user. Now instead of performing same
validation in bmcweb and backend it can be performed only in backend and
send back detailed error information.

Tested:
- Tested with https://gerrit.openbmc.org/c/openbmc/telemetry/+/57177
- All telemetry features are working as before
- Error codes in bmcweb are more detailed, for example invalid argument
instead of internal error.

Change-Id: I424d91b9c8d70c8320f66b582e110c2e7b906107
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Signed-off-by: Eryk Siejk <erykx.siejk@intel.com>
Signed-off-by: Michal Orzel <michalx.orzel@intel.com>

show more ...


# b4361d63 22-Aug-2024 Ed Tanous <etanous@nvidia.com>

Refactor

Reduce the amount of code in handleReportPatch by moving to some of
the dependent callbacks.

Tested: Tested in last commit of series

Change-Id: Id4462ce6b29afcdd303db1790793cf68b23f04c3
S

Refactor

Reduce the amount of code in handleReportPatch by moving to some of
the dependent callbacks.

Tested: Tested in last commit of series

Change-Id: Id4462ce6b29afcdd303db1790793cf68b23f04c3
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# bd79bce8 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 539d8c6b 19-Jun-2024 Ed Tanous <ed@tanous.net>

Consistently use generated enumerations

This commit causes all of Redfish to use generated enum values for enum
types. Using generated code prevents problems, and makes it more clear
what types are

Consistently use generated enumerations

This commit causes all of Redfish to use generated enum values for enum
types. Using generated code prevents problems, and makes it more clear
what types are allowed.

Doing this found two places where we had structs that didn't fulfill the
schema. They have been commented, but will be fixed with a breaking
change at some point in the future.

Tested: WIP

Change-Id: I5fdd2f2dfb6ec05606a522e1f4e331f982c8e476
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 5b90429a 16-Apr-2024 Ed Tanous <ed@tanous.net>

Add missing headers

Most of these were found by breaking every redfish class handler into
its own compile unit:

When that's done, these missing headers become compile errors. We
should just fix the

Add missing headers

Most of these were found by breaking every redfish class handler into
its own compile unit:

When that's done, these missing headers become compile errors. We
should just fix them.

In addition, this allows us to enable automatic header checking in
clang-tidy using misc-header-cleaner. Because the compiler can now
"see" all the defines, it no longer tries to remove headers that it
thinks are unused.

[1] https://github.com/openbmc/bmcweb/commit/4fdee9e39e9f03122ee16a6fb251a380681f56ac

Tested: Code compiles.

Change-Id: Ifa27ac4a512362b7ded7cc3068648dc4aea6ad7b
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 891eaa7c 08-Apr-2024 Ed Tanous <ed@tanous.net>

Use rvalue reference

Change-Id: Ie1a03bac54183b206bf27e37f1fed804601c8643
Signed-off-by: Ed Tanous <ed@tanous.net>


# 47f2934c 19-Mar-2024 Ed Tanous <ed@tanous.net>

Fix redundant init issues

clang-tidy-18 must've fixed their checking for these in headers.
Resolve as the robot commands.

Tested: Noop changes made by tidy. Code compiles.

Change-Id: I1de7686c597

Fix redundant init issues

clang-tidy-18 must've fixed their checking for these in headers.
Resolve as the robot commands.

Tested: Noop changes made by tidy. Code compiles.

Change-Id: I1de7686c597deffb0df91c30dae1a29f9ba7900e
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# b14f357f 06-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up metric report definition to use readJsonObject

Change-Id: I29a9ecbdc9011b6513dc6bfccd28e7e7158fed9b
Signed-off-by: Ed Tanous <ed@tanous.net>


# 367b3dce 17-Jan-2024 Ginu George <ginugeorge@ami.com>

Pass correct Argument Types to propertyValueIncorrect Error Message

Changed the code to pass the parameters according to their types.

Tested: Code Compiles properly and tested.

Change-Id: Ie0e13d3

Pass correct Argument Types to propertyValueIncorrect Error Message

Changed the code to pass the parameters according to their types.

Tested: Code Compiles properly and tested.

Change-Id: Ie0e13d39cd892afda36dfabec871f0fe8d8498e4
Signed-off-by: Ginu George <ginugeorge@ami.com>

show more ...


# 95bdb5f0 27-Oct-2023 Ed Tanous <edtanous@google.com>

Break out retrieveUriToDbusMap

Change-Id: I7c01c9e455b077348ceb67e524158f997fb0c6cf
Signed-off-by: Ed Tanous <edtanous@google.com>


# 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 ...


# 9e6c388a 17-Dec-2021 Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>

Add PATCH for MetricReportDefinition

Support for PATCH method is added to Metric Report Definition,
now selected read/write Report properties can be modified by PATCH method

Tested:
- Added Report

Add PATCH for MetricReportDefinition

Support for PATCH method is added to Metric Report Definition,
now selected read/write Report properties can be modified by PATCH method

Tested:
- Added Report via POST, overwrite editable properties via PATCH and
fetched Report via GET checking if received data is properly modified

Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: If75110a92c55c9e4f2415f0ed4471baa802643ff

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 ...


123