History log of /openbmc/bmcweb/features/redfish/include/redfish_aggregator.hpp (Results 1 – 25 of 66)
Revision Date Author Comments
# 71526116 28-Aug-2025 Kamran Hasan <khasan@nvidia.com>

Enable satellite aggregation over POST

This patch enables Redfish satellite aggregation through REST API
POST requests to /redfish/v1/AggregationService/AggregationSources.
Tested successfully on ub

Enable satellite aggregation over POST

This patch enables Redfish satellite aggregation through REST API
POST requests to /redfish/v1/AggregationService/AggregationSources.
Tested successfully on ubuntu22 using multiple python redfish mockup
servers as satellite bmcs.

The previous urlHasPrefix function incorrectly assumed it would receive
a full URL path, but it actually receives individual URL segments.
Replaced with segmentHasPrefix that vastly simplifies prefix matching
in the currentAggregationSources map.

Also removed the correct duplicated route in
redfish-core/lib/aggregation_service.hpp that was causing routing
conflicts.

The hardcoded 5B247A_ fallback remains temporarily and will be
addressed in change 83181 which adds D-Bus satellite support.

Change-Id: I41920ad270abe4b228b43280ea425b80d3f14b50
Signed-off-by: Kamran Hasan <khasan@nvidia.com>

show more ...


# 66620686 05-Jun-2024 Ed Tanous <ed@tanous.net>

Allow POST on aggregation sources

It would be useful for both testing and production if one could create
aggregation sources dynamically, rather than using detected hardware.
Redfish sources might e

Allow POST on aggregation sources

It would be useful for both testing and production if one could create
aggregation sources dynamically, rather than using detected hardware.
Redfish sources might exist outside of the physical chassis in a way
that's detectable, so giving DC software a way to set up a non-trivial
aggregation topology make this more extensible.

Note, that as documented in AGGREGATION.md, only a single satellite
is supported by this feature. This patch does not change that
behavior, and implementing an entity-manager satellite will override
a POST created AggregationSource.

Tested:

Example commands succeed, and return the expected results.
```
curl -vvvv -k --http1.1 --user "root:0penBmc" --request DELETE https://192.168.7.2/redfish/v1/AggregationService/AggregationSources/
curl -vvvv -k --http1.1 --user "root:0penBmc" https://192.168.7.2/redfish/v1/AggregationService/AggregationSources -H "Content-Type: application/json" --request POST --data '{"HostName":"https://localhost:8000"}'
```

Redfish service validator passes.

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

show more ...


# 5a3d934a 26-Apr-2025 Rohit PAI <ropai@nvidia.com>

RFA - Use EM name property of Satellite config as prefix

The name property of EM satellite config will be used as prefix for
aggregation. This can help when we have multi satmc configuration and
RFA

RFA - Use EM name property of Satellite config as prefix

The name property of EM satellite config will be used as prefix for
aggregation. This can help when we have multi satmc configuration and
RFA has to handle multiple prefixes

Tested
EM Configs
```
{
"Hostname": "10.0.2.2",
"Port": "8000",
"Name": "sat0",
"Type": "SatelliteController",
"AuthType": "None"
}
```

Aggregation Responses
```
curl -k -u root:0penBmc https://localhost:2443/redfish/v1/AggregationService/AggregationSources/
{
"@odata.id": "/redfish/v1/AggregationService/AggregationSources",
"@odata.type": "#AggregationSourceCollection.AggregationSourceCollection",
"Members": [
{
"@odata.id": "/redfish/v1/AggregationService/AggregationSources/sat0"
}
],
"Members@odata.count": 1,
"Name": "Aggregation Source Collection"
}
```

Resource Aggregation
```
curl -k -u root:0penBmc https://localhost:2443/redfish/v1/Systems
{
"@odata.id": "/redfish/v1/Systems",
"@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system"
},
{
"@odata.id": "/redfish/v1/Systems/sat0_system1"
}
],
"Members@odata.count": 2,
"Name": "Computer System Collection"
}
```

Change-Id: I2e64436c9e1858825dc71fad66293144fa55f83e
Signed-off-by: Rohit PAI <ropai@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 ...


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


# 9838eb20 29-Jan-2025 Ed Tanous <etanous@nvidia.com>

Move io context to singleton

The way we pass around io contexts is somewhat odd. Boost maintainers
in slack recommended that we just have a method that returns an io
context, and from there we can

Move io context to singleton

The way we pass around io contexts is somewhat odd. Boost maintainers
in slack recommended that we just have a method that returns an io
context, and from there we can control this (context link lost years
ago).

The new version of clang claims the singleton pattern of passing in an
io_context pattern is a potential nullptr dereference. It's technically
correct, as calling the singleton without immediately initializing the
io context will lead to a crash.

This commit implements what the boost maintainers suggested, having a
single method that returns "the context" that should be used. This also
helps to maintain isolation, as some pieces are no longer tied directly
to dbus to get their reactor.

Tested: WIP

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

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


# 6282bc71 19-Aug-2024 Ed Tanous <etanous@nvidia.com>

Don't forward skip or only to aggregator

These two parameters are not idempotent, and are currently being run
first on the satellite, then again on the aggregator. This results in
errors and unexpe

Don't forward skip or only to aggregator

These two parameters are not idempotent, and are currently being run
first on the satellite, then again on the aggregator. This results in
errors and unexpected results.

This commit detects when we're parsing a top collection, and filters out
those two parameters from being applied to the satellite request.

To accomplish rewriting the URI, a new Request API needs added for
non-const access to the URI object.

Tested: Aggregator shows results as expected. Query params are not
forwarded to satellite

Change-Id: I99cbbb08da9fcd06c9ee10d371b253e32d01f59b
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>


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


# 1a095906 19-Aug-2024 Joonwon Kang <joonwonkang@google.com>

Filter out query params in searchCollectionsArray

Previously searchCollectionsArray() had an implicit assumption that it
would not receive query parameters in the input URI. This patch adds the
assu

Filter out query params in searchCollectionsArray

Previously searchCollectionsArray() had an implicit assumption that it
would not receive query parameters in the input URI. This patch adds the
assumption that it will.

Tested:
Unit tests pass
Confirmed that the query to the URI
`/redfish/v1/UpdateService?$expand=.($levels=1)` worked as expected now.

Change-Id: Ia33ece024c58e9d32f5815b2c69e8ab62c0c2127
Signed-off-by: Joonwon Kang <joonwonkang@google.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Carson Labrado <clabrado@google.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 ...


# 6bd30813 26-Jul-2024 Ed Tanous <ed@tanous.net>

Change retry policy for redfish aggregator

Redfish aggregator should be a forwarding proxy, and return errors to
the user on failure. That max retry parameter was set to one,
presumably to fulfill

Change retry policy for redfish aggregator

Redfish aggregator should be a forwarding proxy, and return errors to
the user on failure. That max retry parameter was set to one,
presumably to fulfill that purpose. A max "retry" of one means that the
aggregator will attempt twice to get a response, which can interact
poorly with long timeouts, and end up not returning an error to the
calling user. Change the code to implement a single attempt.

Tested:
Basic aggregation paths work over HTTP between two qemu instances; Top
level collections show aggregated resources.

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

show more ...


# 19bb362b 05-Jul-2024 Ed Tanous <etanous@nvidia.com>

EventDestination: Implement VerifyCertificate

VerifyCertificate is a property on the Redfish EventDestination schema.
It specifies that this property is:
``` An indication of whether the service wil

EventDestination: Implement VerifyCertificate

VerifyCertificate is a property on the Redfish EventDestination schema.
It specifies that this property is:
``` An indication of whether the service will verify the certificate of
the server referenced by the `Destination` property prior to sending the
event ```

To keep prior behavior, and to ensure behavior that's secure by default,
if the user omits the property, it is assumed to be true. This property
is also persisted and restored.

Tested:
Redfish-Event-Listener succeeds with the following procedure
Start Redfish-Event-Listener
PATCH /redfish/v1/Subscriptions/<subid> VerifyCertificate: false
POST /redfish/v1/EventService/Actions/EventService.SubmitTestEvent

Redfish-Event-Listener then hits an internal error, due to an encoding
compatibility unrelated to this patch, but is documented in the receiver
[1]

POST of a subscription with VerifyCertificate: false set, succeeds.

[1] https://github.com/DMTF/Redfish-Event-Listener/blob/6f3f98beafc89fa9bbf86aa4f8cac6c1987390fb/RedfishEventListener_v1.py#L61

Change-Id: I27e0a3fe87b4dbd0432bfaa22ebf593c3955db11
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 4a7fbefd 06-Apr-2024 Ed Tanous <ed@tanous.net>

Fix large copies with url_view and segments_view

Despite these objects being called "view" they are still relatively
large, as clang-tidy correctly flags, and we ignore.

Change all function uses to

Fix large copies with url_view and segments_view

Despite these objects being called "view" they are still relatively
large, as clang-tidy correctly flags, and we ignore.

Change all function uses to capture by:
const boost::urls::url_view_base&

Which is the base class of all boost URL types, and any class (url,
url_view, etc) is convertible to that base.

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

show more ...


# 18f8f608 18-Jul-2023 Ed Tanous <edtanous@google.com>

Remove some boost includes

The less we rely on boost, and more on std algorithms, the less people
have to look up, and the more likely that our code will deduplicate.

Replace all uses of boost::alg

Remove some boost includes

The less we rely on boost, and more on std algorithms, the less people
have to look up, and the more likely that our code will deduplicate.

Replace all uses of boost::algorithms with std alternatives.

Tested: Redfish Service Validator passes.

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

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


# 27b0cf90 07-Aug-2023 Ed Tanous <ed@tanous.net>

Move to file_body in boost

As is, it reads the whole file into memory before sending it. While
fairly fast for the user, this wastes ram, and makes bmcweb less useful
on less capable systems.

This

Move to file_body in boost

As is, it reads the whole file into memory before sending it. While
fairly fast for the user, this wastes ram, and makes bmcweb less useful
on less capable systems.

This patch enables using the boost::beast::http::file_body type, which
has more efficient serialization semantics than using a std::string. To
do this, it adds a openFile() handler to http::Response, which can be
used to properly open a file. Once the file is opened, the existing
string body is ignored, and the file payload is sent instead.
openFile() also returns success or failure, to allow users to properly
handle 404s and other errors.

To prove that it works, I moved over every instance of direct use of the
body() method over to using this, including the webasset handler. The
webasset handler specifically should help with system load when doing an
initial page load of the webui.

Tested:
Redfish service validator passes.

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

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


# 6fd29553 04-Oct-2023 Ed Tanous <edtanous@google.com>

Update to boost 1.83.0

In boost 1.83.0, the boost::url maintainers deprecated the header only
usage of the library without warning. A discussion with the
maintainers[1] made it clear that they remo

Update to boost 1.83.0

In boost 1.83.0, the boost::url maintainers deprecated the header only
usage of the library without warning. A discussion with the
maintainers[1] made it clear that they removed the abiliy on purpose,
and they're not going to add it back or add a deprecation strategy (they
did say they would update the documentation to actually match the
intent), and that from here on in we should be using the cmake boost
project to pull in the non-header-only boost libraries we use (which at
this point is ONLY boost url).

This commit updates to remove the usage of boost::urls::result typedef,
which was deprecated in this release (which causes a compile error) and
moves it to boost::system::result.

In addition, it updates our meson files to pull in the boost project as
a cmake dependency.

[1] https://cpplang.slack.com/archives/C01JR6C9C4U/p1696441238739129

Tested: Not yet.

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

show more ...


# a716aa74 01-Aug-2023 Ed Tanous <edtanous@google.com>

Move http client to URL

Type safety is a good thing. In:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65606

It was found that splitting out the URI into encoded pieces in the early
phase removed

Move http client to URL

Type safety is a good thing. In:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65606

It was found that splitting out the URI into encoded pieces in the early
phase removed some information we needed, namely whether or not a URI
was ipv6. This commit changes http client such that it passes all the
information through, with the correct type, rather than passing in
hostname, port, path, and ssl separately.

Opportunistically, because a number of log lines are changing, this uses
the opportunity to remove a number of calls to std::to_string, and rely
on std::format instead.

Now that we no longer use custom URI splitting code, the
ValidateAndSplitUrl() method can be removed, given that our validation
now happens in the URI class.

Tested: Aggregation works properly when satellite URIs are queried.

Change-Id: I9f605863179af54c5af2719bc5ce9d29cbfffab7
Signed-off-by: Ed Tanous <edtanous@google.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 ...


# bf2ddede 09-Aug-2023 Carson Labrado <clabrado@google.com>

Reduce some Error log severities

There are instances of ERROR logs that would work better as WARNING or
DEBUG since they do not actually result in bailing early and returning
an error response.

Sig

Reduce some Error log severities

There are instances of ERROR logs that would work better as WARNING or
DEBUG since they do not actually result in bailing early and returning
an error response.

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

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