summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2018-05-18 11:48:52 -0700
committerEd Tanous <ed.tanous@intel.com>2018-06-29 12:09:02 -0700
commit1e4398764750228a9777dda42c13dfe8122c4c59 (patch)
tree61b10d4b25f91711e2853fdee2df9c67c88f5222 /src
parent179db1d7c76af721cb9390cde1c2befff9e9c685 (diff)
downloadbmcweb-1e4398764750228a9777dda42c13dfe8122c4c59.tar.gz
bmcweb-1e4398764750228a9777dda42c13dfe8122c4c59.zip
Implement feature selection in bmcweb
This patchsets implements feature selection in BMCWEB using compile time macros. This allows certain features, security implementations, and other things to be selected at compile time. Change-Id: Ic14343d36d82830e6cf51311ca886a90749ae6a7 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/webserver_main.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 93b3aa6..6454ed3 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -1,9 +1,11 @@
#include <systemd/sd-daemon.h>
+#include <bmcweb/settings.hpp>
#include <dbus_monitor.hpp>
#include <dbus_singleton.hpp>
#include <image_upload.hpp>
#include <openbmc_dbus_rest.hpp>
#include <persistent_data_middleware.hpp>
+#include <redfish.hpp>
#include <redfish_v1.hpp>
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/bus.hpp>
@@ -13,10 +15,9 @@
#include <token_authorization_middleware.hpp>
#include <web_kvm.hpp>
#include <webassets.hpp>
+#include <webserver_common.hpp>
#include <memory>
#include <string>
-#include "redfish.hpp"
-#include "webserver_common.hpp"
#include <crow/app.h>
#include <boost/asio.hpp>
@@ -61,14 +62,26 @@ int main(int argc, char** argv) {
#endif
// Static assets need to be initialized before Authorization, because auth
// needs to build the whitelist from the static routes
+
+#ifdef BMCWEB_ENABLE_PHOSPHOR_WEBUI
crow::webassets::request_routes(app);
- crow::TokenAuthorization::request_routes(app);
+#endif
+#ifdef BMCWEB_ENABLE_KVM
crow::kvm::request_routes(app);
+#endif
+
+#ifdef BMCWEB_ENABLE_REDFISH
crow::redfish::request_routes(app);
+#endif
+
+#ifdef BMCWEB_ENABLE_DBUS_REST
crow::dbus_monitor::request_routes(app);
crow::image_upload::requestRoutes(app);
crow::openbmc_mapper::request_routes(app);
+#endif
+
+ crow::TokenAuthorization::request_routes(app);
CROW_LOG_INFO << "bmcweb (" << __DATE__ << ": " << __TIME__ << ')';
setup_socket(app);
OpenPOWER on IntegriCloud