diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2019-01-17 21:08:38 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-05-21 20:22:09 +0300 |
commit | 1bfbe0e0372de7991bab9bb0a7ba015356f7d3b2 (patch) | |
tree | 6c086646eaacdce9af1bba600571fab0b40df9c5 /CMakeLists.txt | |
parent | 4c9afe436f9a60e8d8fe0131850f0351d746362b (diff) | |
download | bmcweb-1bfbe0e0372de7991bab9bb0a7ba015356f7d3b2.tar.xz |
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 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c801dcb30..8361e90490 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,9 @@ option (YOCTO_DEPENDENCIES "Use YOCTO dependencies system" OFF) option (BMCWEB_ENABLE_KVM "Enable the KVM host video WebSocket. Path is '/kvm/0'. Video is from the BMC's '/dev/video' device." ON) +option (BMCWEB_ENABLE_VM_WEBSOCKET "Enable the Virtual Media WebSocket. Path is + '/vm/0/0'to open the websocket. See + https://github.com/openbmc/jsnbd/blob/master/README." ON) option (BMCWEB_ENABLE_DBUS_REST "Enable Phosphor REST (D-Bus) APIs. Paths directly map Phosphor D-Bus object paths, for example, '/xyz/openbmc_project/logging/entry/enumerate'. See @@ -257,6 +260,7 @@ install (TARGETS bmcweb DESTINATION bin) target_compile_definitions ( bmcweb PRIVATE $<$<BOOL:${BMCWEB_ENABLE_KVM}>: -DBMCWEB_ENABLE_KVM> + $<$<BOOL:${BMCWEB_ENABLE_VM_WEBSOCKET}>: -DBMCWEB_ENABLE_VM_WEBSOCKET> $<$<BOOL:${BMCWEB_ENABLE_DBUS_REST}>: -DBMCWEB_ENABLE_DBUS_REST> $<$<BOOL:${BMCWEB_ENABLE_REDFISH}>: -DBMCWEB_ENABLE_REDFISH> $<$<BOOL:${BMCWEB_ENABLE_STATIC_HOSTING}>: -DBMCWEB_ENABLE_STATIC_HOSTING> |