summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarson Labrado <clabrado@google.com>2022-04-19 02:26:56 +0300
committerEd Tanous <ed@tanous.net>2022-05-23 22:20:39 +0300
commit7fb33566cfccc26694e95b2c3601eb477359c54a (patch)
tree746b313b0c3615ae225d5224ed8a962fae34aa18 /src
parent3a097b2cf6260b7accfb42930b73589655ee4e2b (diff)
downloadbmcweb-7fb33566cfccc26694e95b2c3601eb477359c54a.tar.xz
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 <clabrado@google.com> Change-Id: Ib5eee2c93aeb209157191055975c127759d73627
Diffstat (limited to 'src')
-rw-r--r--src/webserver_main.cpp9
1 files changed, 9 insertions, 0 deletions
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 <obmc_console.hpp>
#include <openbmc_dbus_rest.hpp>
#include <redfish.hpp>
+#include <redfish_aggregator.hpp>
#include <redfish_v1.hpp>
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/bus.hpp>
@@ -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