From 7fb33566cfccc26694e95b2c3601eb477359c54a Mon Sep 17 00:00:00 2001 From: Carson Labrado Date: Mon, 18 Apr 2022 23:26:56 +0000 Subject: bmcweb: Fetch Satellite Config from D-Bus Adds a RedfishAggregator class which is able to pull configuration information from D-Bus for Satellite BMCs. These BMCs will be aggregated by Redfish Aggregation. Also added is a new compiler option which will be used to enable Redfish Aggregation. This patch only allows configurations with unencrypted and unauthenticated satellite BMC communication. Support for encryption and authentication willneed to be added in future patches. Note that this patch does not actually use the config information after it has been fetched. That functionality will be added in future patches. Tested: I made this example config information available on D-Bus busctl introspect xyz.openbmc_project.EntityManager \ /xyz/openbmc_project/inventory/system/board/SatelliteBMC/aggregated0 \ xyz.openbmc_project.Configuration.SatelliteController NAME TYPE SIGNATURE RESULT/VALUE FLAGS .AuthType property s "None" emits-change .Hostname property s "127.0.0.1" emits-change .Name property s "aggregated0" emits-change .Port property t 443 emits-change .Type property s "SatelliteController" emits-change That information was picked up by the changes in this CL: [DEBUG "redfish_aggregator.hpp":80] Found Satellite Controller at /xyz/openbmc_project/inventory/system/board/SatelliteBMC/aggregated0 [DEBUG "redfish_aggregator.hpp":209] Added satellite config aggregated0 at http://127.0.0.1:443 [DEBUG "redfish_aggregator.hpp":52] Redfish Aggregation enabled with 1 satellite BMCs [DEBUG "redfish_aggregator.hpp":21] There were 1 satellite configs found at startup Signed-off-by: Carson Labrado Change-Id: Ib5eee2c93aeb209157191055975c127759d73627 --- src/webserver_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp index 6bdce98163..9d2aa8a13d 100644 --- a/src/webserver_main.cpp +++ b/src/webserver_main.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -86,8 +87,16 @@ static int run() redfish::requestRoutes(app); redfish::RedfishService redfish(app); + // Create HttpClient instance and initialize Config + crow::HttpClient::getInstance(); + // Create EventServiceManager instance and initialize Config redfish::EventServiceManager::getInstance(); + +#ifdef BMCWEB_ENABLE_REDFISH_AGGREGATION + // Create RedfishAggregator instance and initialize Config + redfish::RedfishAggregator::getInstance(); +#endif #endif #ifdef BMCWEB_ENABLE_DBUS_REST -- cgit v1.2.3