summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2019-01-17 12:08:38 -0600
committerEd Tanous <ed.tanous@intel.com>2019-05-21 17:22:09 +0000
commit1bfbe0e0372de7991bab9bb0a7ba015356f7d3b2 (patch)
tree6c086646eaacdce9af1bba600571fab0b40df9c5 /src
parent4c9afe436f9a60e8d8fe0131850f0351d746362b (diff)
downloadbmcweb-1bfbe0e0372de7991bab9bb0a7ba015356f7d3b2.tar.gz
bmcweb-1bfbe0e0372de7991bab9bb0a7ba015356f7d3b2.zip
vm_websocket: Add websocket handler
On receiving a websocket request on endpoint /vm/0/0, connect to the nbd-proxy app and send/receive stdio. Tested: Verified that the host could see the virtual media usb device, mounted it manually and checked the contents of the iso file used for the test were there. To test, used the html and js script: https://github.com/openbmc/jsnbd/tree/master/web and an Ubuntu iso image file. Verified that it worked after closing the websocket (using the stop function from the html file), to check that the processes were cleaned up and freed up for a subsequent request. Change-Id: I0b070310b070c086d67d0ae3e2c165551d6b87cc Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/webserver_main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index b357b4e..a4cf582 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -19,6 +19,7 @@
#include <ssl_key_handler.hpp>
#include <string>
#include <token_authorization_middleware.hpp>
+#include <vm_websocket.hpp>
#include <webassets.hpp>
#include <webserver_common.hpp>
@@ -94,6 +95,10 @@ int main(int argc, char** argv)
crow::obmc_console::requestRoutes(app);
#endif
+#ifdef BMCWEB_ENABLE_VM_WEBSOCKET
+ crow::obmc_vm::requestRoutes(app);
+#endif
+
crow::token_authorization::requestRoutes(app);
BMCWEB_LOG_INFO << "bmcweb (" << __DATE__ << ": " << __TIME__ << ')';
OpenPOWER on IntegriCloud