History log of /openbmc/bmcweb/features/redfish/lib/trigger.hpp (Results 26 – 40 of 40)
Revision Date Author Comments
# 7a1dbc48 07-Dec-2022 George Liu <liuxiwei@inspur.com>

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and u

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and use the method in dbus_utility
uniformly.

Requires https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/60020 to
build.

Tested: Redfish Validator Passed

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie4140d4484a7e4f4b943013f4371ffd2d44a22e9

show more ...


# ae9031f0 27-Sep-2022 Willy Tu <wltu@google.com>

Update CollectionMembers to use UrlFromPieces

Refactor getCollectionMembers to make sure all Url created with dbus
paths are generated via UrlFromPieces helper function. This allow us to
manage all

Update CollectionMembers to use UrlFromPieces

Refactor getCollectionMembers to make sure all Url created with dbus
paths are generated via UrlFromPieces helper function. This allow us to
manage all URL generated from dbus in one place and allow us to make
future changes to affect all resources.

We can make changes to all resources easier if they are all managed by
one function.

Tested:
Redfish Validator Passed. All Collections working as expected and match
previous implmentation.

Change-Id: I5d3b2b32f047ce4f20a2287a36a3e099efd6eace
Signed-off-by: Willy Tu <wltu@google.com>

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


# 89474494 06-Sep-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

used sdbusplus::unpackPropertiesNoThrow part 7

used sdbusplus::unpackPropertiesNoThrow in cable.hpp,
metric_report_definition.hpp, telemetry_service.hpp and trigger.hpp,
also replaced all usages of

used sdbusplus::unpackPropertiesNoThrow part 7

used sdbusplus::unpackPropertiesNoThrow in cable.hpp,
metric_report_definition.hpp, telemetry_service.hpp and trigger.hpp,
also replaced all usages of "GetAll" with
sdbusplus::asio::getAllProperties

bmcweb size: 2697624 -> 2693528 (-4096)
compressed size: 1129037 -> 1129322 (+285)

Tested:
Performed get on one of the:
- /redfish/v1/Cables
- /redfish/v1/TelemetryService/MetricReportDefinitions
- /redfish/v1/TelemetryService/Triggers
(trigger was added using Dbus API)

Get result before and after the change was in same format.

Change-Id: I24f001b4f52d8eb5f529b08de278a611f8fa22b2
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# 3f215c92 22-Feb-2022 Szymon Dompke <szymon.dompke@intel.com>

Fix Trigger GET functionality

Due to changes in dbus interface of TelemetryService, some modifications
were needed in bmcweb:
- Some of values in TriggerActions property were renamed.
- ReportNames

Fix Trigger GET functionality

Due to changes in dbus interface of TelemetryService, some modifications
were needed in bmcweb:
- Some of values in TriggerActions property were renamed.
- ReportNames property was renamed and its type was changed. It is now a
vector of object_path, each representing full dbus path of a Report
Telemetry resource. Some additional logic was added to verify it.

Additionally, 2 issues were found during testing:
- In case of error occurring during internal data parsing, GET could
return both "Internal Error" message and incomplete Trigger
representation. By swapping few lines of code, this issue is fixed:
now either error is returned or full Trigger representation, but never
both of them.
- NumericThresholds object was parsed as 'null' in case of missing
thresholds. It should be an empty json {} instead.

Testing done:
- TriggerActions are properly translated to redfish names.
- Links are now returning proper uris of existing MRD.
- Internal Error is returned for malformed data returned by service.
- Other Trigger GET functionality remained unchanged.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I81ebbf3889a152199bef7230de56a73bb112731b

show more ...


# 3ba00073 06-Jun-2022 Carson Labrado <clabrado@google.com>

Expose AsyncResp shared_ptr when handling response

For Redfish Aggregation, we need a common point to check the D-Bus
for satellite configs. If they are available then we perform the
aggregation op

Expose AsyncResp shared_ptr when handling response

For Redfish Aggregation, we need a common point to check the D-Bus
for satellite configs. If they are available then we perform the
aggregation operations. The functions in query.hpp are used by all
endpoints making them the logical location. The aggregation code
requires a shared_ptr to the AsyncResp so these functions need to be
able to supply that.

This patch is broken out of a future patch for routing Redfish
Aggregation requests
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/53310

The follow commands can be used to perform most of the replacements:
find . -type f | xargs sed -i 's/setUpRedfishRoute(app, req, asyncResp->res/setUpRedfishRoute(app, req, asyncResp/g'
find . -type f | xargs sed -i 's/setUpRedfishRouteWithDelegation(app, req, asyncResp->res/setUpRedfishRouteWithDelegation(app, req, asyncResp/g'

Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I4f4f9f22cdcfb14a3bd94b9a8f3d64aae34e57bc

show more ...


# 002d39b4 31-May-2022 Ed Tanous <edtanous@google.com>

Try to fix the lambda formatting issue

clang-tidy has a setting, LambdaBodyIndentation, which it says:
"For callback-heavy code, it may improve readability to have the
signature indented two levels

Try to fix the lambda formatting issue

clang-tidy has a setting, LambdaBodyIndentation, which it says:
"For callback-heavy code, it may improve readability to have the
signature indented two levels and to use OuterScope."

bmcweb is very callback heavy code. Try to enable it and see if that
improves things. There are many cases where the length of a lambda call
will change, and reindent the entire lambda function. This is really
bad for code reviews, as it's difficult to see the lines changed. This
commit should resolve it. This does have the downside of reindenting a
lot of functions, which is unfortunate, but probably worth it in the
long run.

All changes except for the .clang-format file were made by the robot.

Tested: Code compiles, whitespace changes only.

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

show more ...


# 1476687d 15-Mar-2022 Ed Tanous <edtanous@google.com>

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies.

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies. This patchset aims to remove a majority of them in
lieu of operator[]. Interestingly, this saves about 1% of the binary
size of bmcweb.

This also has an added benefit that as a design pattern, we're never
constructing a new object, then moving it into place, we're always
adding to the existing object, which in the future _could_ make things
like OEM schemas or properties easier, as there's no case where we're
completely replacing the response object.

Tested:
Ran redfish service validator. No new failures.

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

show more ...


# 45ca1b86 25-Mar-2022 Ed Tanous <edtanous@google.com>

Add setUpRedfishRoute to all nodes in redfish

For better or worse, the series ahead of this is making use of
setUpRedfishRoute to do the common "redfish specified" things that need
to be done for a

Add setUpRedfishRoute to all nodes in redfish

For better or worse, the series ahead of this is making use of
setUpRedfishRoute to do the common "redfish specified" things that need
to be done for a connection, like header checking, filtering, and other
things. In the current model, where BMCWEB_ROUTE is a common function
for all HTTP routes, this means we need to propagate this injection call
into the whole tree ahead of the requests being handled.

In a perfect world, we would invent something like a REDFISH_ROUTE
macro, but because macros are discouraged, the routes take a variadic
template of parameters, and each call to the route has a .privileges()
call in the middle, there's no good way to effect this change in a less
costly manner. This was messaged both in the prior reviews, and on
discord sourcing improvements on this pattern, to which none arose.

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

show more ...


# 456cd875 01-Mar-2022 Szymon Dompke <szymon.dompke@intel.com>

Use url_view for telemetry uris

This change refactor telemetry code to use bmcweb utility function for
uri construction, which is safe and preferred way, instead of string
operations.

Testing done:

Use url_view for telemetry uris

This change refactor telemetry code to use bmcweb utility function for
uri construction, which is safe and preferred way, instead of string
operations.

Testing done:
- Some basic GET operations done on Telemetry, no regression.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I6de5d79a078944d398357f27dc0c201c130c4302

show more ...


# e662eae8 25-Jan-2022 Ed Tanous <edtanous@google.com>

Enable readability-implicit-bool-conversion checks

These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.

Tested:
Ran series thro

Enable readability-implicit-bool-conversion checks

These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.

Tested:
Ran series through redfish service validator. No changes observed.
UUID failing in Qemu both before and after.

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

show more ...


# 248d0230 04-Jan-2022 Ed Tanous <edtanous@google.com>

Make code compile with clang

One minor shadowed variable that needed it's name changed, and a missing
inline statement.

Tested: Code now builds in clang-13

Signed-off-by: Ed Tanous <edtanous@googl

Make code compile with clang

One minor shadowed variable that needed it's name changed, and a missing
inline statement.

Tested: Code now builds in clang-13

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

show more ...


# 163994a8 12-Aug-2021 Szymon Dompke <szymon.dompke@intel.com>

Add support for DELETE on Triggers schema

Added DELETE method on /redfish/v1/TelemetryService/Triggers/<trigger>
uri. Dbus Delete interface on trigger object is used as a backend.

Tested:
- Trigger

Add support for DELETE on Triggers schema

Added DELETE method on /redfish/v1/TelemetryService/Triggers/<trigger>
uri. Dbus Delete interface on trigger object is used as a backend.

Tested:
- Trigger was removed successfully by making DELETE call on
redfish/v1/TelemetryService/Triggers/TestTrigger

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: Ia830920dac6a539da5b289428374cb96d6492183

show more ...


# 1b7e696b 02-Aug-2021 Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>

Add GET method for Triggers

Added GET method for retrieving details of individual Trigger searched
by given Trigger name, details are extracted from Telemetry service

Tested:
- Added single Trigger

Add GET method for Triggers

Added GET method for retrieving details of individual Trigger searched
by given Trigger name, details are extracted from Telemetry service

Tested:
- Added single Trigger and requested result from bmcweb via
/redfish/v1/TelemetryService/Triggers/<triggername>
- Added multiple Triggers numeric and discrete with various parameters
(empty, non-empty), and requested results from bmcweb via
/redfish/v1/TelemetryService/Triggers/<triggername>
- Verified uris /redfish/v1/TelemetryService/Triggers/<triggername> by
using Redfish-Service-Validator (all passed)

Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
Change-Id: I1c966b2f792324cc6f6a8784ad18a683e5ce7bd9

show more ...


# 07148cf2 02-Aug-2021 Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>

Add GET method for TriggerCollection

Added GET method for retrieving list of Triggers from Telemetry service

Tested:
- Added single Trigger and requested result from bmcweb via
/redfish/v1/Teleme

Add GET method for TriggerCollection

Added GET method for retrieving list of Triggers from Telemetry service

Tested:
- Added single Trigger and requested result from bmcweb via
/redfish/v1/TelemetryService/Triggers
- Added multiple Triggers numeric and discrete, and requested results
from bmcweb via /redfish/v1/TelemetryService/Triggers
- Verified uri /redfish/v1/TelemetryService/Triggers by using
Redfish-Service-Validator with no Triggers/empty Collection (passed)

Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
Change-Id: Ide00eb44901ea1b97b80fc5c5ddfd97e393d4a04

show more ...


12