summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIwona Klimaszewska <iwona.klimaszewska@intel.com>2019-07-12 19:26:38 +0300
committerIwona Klimaszewska <iwona.klimaszewska@intel.com>2019-11-21 16:35:56 +0300
commitc0a1c8a0ecc55aef54e6f44ea89a4dd232e265a2 (patch)
tree601c03c2976c4ffaab6ee62c4c8af38743d415e4 /src
parente6604b116afef4cd603956941e299e7bcda4351a (diff)
downloadbmcweb-c0a1c8a0ecc55aef54e6f44ea89a4dd232e265a2.tar.xz
Implement nbd-proxy as a part of bmcweb
Nbd-proxy is responsible for exposing websocket endpoint in bmcweb. It matches WS endpoints with unix socket paths using configuration exposed on D-Bus by Virtual-Media. Virtual-Media is then notified about unix socket availability through mount/unmount D-Bus methods. Currently, this feature is disabled by default. Tested: Integrated with initial version of Virtual-Media. Change-Id: I9c572e9841b16785727e5676fea1bb63b0311c63 Signed-off-by: Iwona Klimaszewska <iwona.klimaszewska@intel.com> Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
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 78b4a41fa0..a2da120188 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -23,6 +23,10 @@
#include <webassets.hpp>
#include <webserver_common.hpp>
+#ifdef BMCWEB_ENABLE_VM_NBDPROXY
+#include <nbd_proxy.hpp>
+#endif
+
constexpr int defaultPort = 18080;
template <typename... Middlewares>
@@ -97,6 +101,11 @@ int main(int argc, char** argv)
crow::connections::systemBus =
std::make_shared<sdbusplus::asio::connection>(*io);
+
+#ifdef BMCWEB_ENABLE_VM_NBDPROXY
+ crow::nbd_proxy::requestRoutes(app);
+#endif
+
redfish::RedfishService redfish(app);
// Keep the user role map hot in memory and