From: Waldemar Kozaczuk <jwkozac...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master
Split httpserver module into httpserver-api and httpserver-html5-gui
Split httpserver into httpserver-api, httpserver-html5-gui and
httpserver modules. The new httpserver-api module is a subset of original
httpserver and implements same OSv REST API without any modularity or other
functionality changes.
Another new httpserver-html5-gui module contains static content of
swagger-ui and
osv-gui HTML5 apps and depends on httpserver-api. Remaining httpserver
module provides
backwards-compatibility and combines httpserver-api and
httpserver-html5-gui functionality.
Updated makefiles in httpserver-jolokia-plugin, httpserver-jvm-plugin and
cloud-init to
point to new locations of header files.
Fixed #822
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
Message-Id: <1503345242-22096-1-git-send-email-jwkozac...@gmail.com>
---
diff --git a/.gitmodules b/.gitmodules
--- a/.gitmodules
+++ b/.gitmodules
@@ -36,13 +36,13 @@
path = external/aarch64/openjdk.bin
url = ../../cloudius-systems/aarch64-openjdk.bin.git
[submodule "modules/httpserver/swagger-ui"]
- path = modules/httpserver/swagger-ui
+ path = modules/httpserver-html5-gui/swagger-ui
url = ../../cloudius-systems/swagger-ui.git
[submodule "musl"]
path = musl
url = ../../cloudius-systems/musl.git
[submodule "modules/httpserver/osv-gui"]
- path = modules/httpserver/osv-gui
+ path = modules/httpserver-html5-gui/osv-gui
url = ../../cloudius-systems/osv-gui.git
[submodule "external/fs/libnfs"]
path = external/fs/libnfs
diff --git a/modules/cloud-init/Makefile b/modules/cloud-init/Makefile
--- a/modules/cloud-init/Makefile
+++ b/modules/cloud-init/Makefile
@@ -8,17 +8,17 @@ arch = x64
boost-libs := -lboost_system -lboost_filesystem
-HTTPSERVER_DIR = ../../modules/httpserver
-INCLUDES += -I$(HTTPSERVER_DIR)
+HTTPSERVER_API_DIR = ../../modules/httpserver-api
+INCLUDES += -I$(HTTPSERVER_API_DIR)
# the build target executable:
TARGET = cloud-init
CPP_FILES := client.cc cloud-init.cc data-source.cc main.cc template.cc
cassandra-module.cc json.cc
OBJ_FILES := $(addprefix obj/,$(CPP_FILES:.cc=.o))
DEPS := $(OBJ_FILES:.o=.d)
-STUB_HTTPSERVER_LIBS = $(HTTPSERVER_DIR)/httpserver-stub.so
-LIBS = -lpthread $(boost-libs) $(DEPEDNDS_LIBS) -lyaml-cpp
-L$(HTTPSERVER_DIR)/ -lhttpserver
+STUB_HTTPSERVER_LIBS = $(HTTPSERVER_API_DIR)/httpserver-stub.so
+LIBS = -lpthread $(boost-libs) $(DEPEDNDS_LIBS) -lyaml-cpp
-L$(HTTPSERVER_API_DIR)/ -lhttpserver
quiet = $(if $V, $1, @echo " $2"; $1)
very-quiet = $(if $V, $1, @$1)
diff --git a/modules/httpserver-api/.gitignore
b/modules/httpserver-api/.gitignore
--- a/modules/httpserver-api/.gitignore
+++ b/modules/httpserver-api/.gitignore
null
diff --git a/modules/httpserver-api/Makefile
b/modules/httpserver-api/Makefile
--- a/modules/httpserver-api/Makefile
+++ b/modules/httpserver-api/Makefile
@@ -48,7 +48,7 @@ very-quiet = $(if $V, $1, @$1)
DEPS := $(OBJ_FILES:.o=.d)
-module: all gui swagger-ui-lib
+module: all
all: init lib$(TARGET).so
@@ -92,32 +92,18 @@ check: check-http check-ssl
check-http:
# Test plain HTTP
cd $(src) && \
- make image=httpserver,jetty && \
- PYTHONPATH=$(src)/scripts modules/httpserver/tests/testhttpserver.py
+ make image=httpserver-api,jetty && \
+ PYTHONPATH=$(src)/scripts modules/httpserver-api/tests/testhttpserver.py
check-ssl:
# Test SSL
cd $(src) && \
- make image=httpserver.fg_ssl,certs,jetty && \
- PYTHONPATH=$(src)/scripts modules/httpserver/tests/testhttpserver.py \
+ make image=httpserver-api.fg_ssl,certs,jetty && \
+ PYTHONPATH=$(src)/scripts
modules/httpserver-api/tests/testhttpserver.py \
--cert modules/certs/build/client.pem \
--key modules/certs/build/client.key \
--cacert modules/certs/build/cacert.pem
.PHONY: check check-http check-ssl
-
-swagger-ui-lib: swagger-ui/.git
-.PHONY: swagger-ui-lib
-
-swagger-ui/.git:
- cd $(src) && git submodule update --init -f
modules/httpserver/swagger-ui
-
-gui: osv-gui/.git
- $(call quiet,make -C osv-gui)
-.PHONY: gui
-
-osv-gui/.git:
- cd $(src) && git submodule update --init -f modules/httpserver/osv-gui
-
.SECONDARY:
diff --git a/modules/httpserver-api/api-doc/listings/api.json
b/modules/httpserver-api/api-doc/listings/api.json
--- a/modules/httpserver-api/api-doc/listings/api.json
+++ b/modules/httpserver-api/api-doc/listings/api.json
null
diff --git a/modules/httpserver-api/api-doc/listings/app.json
b/modules/httpserver-api/api-doc/listings/app.json
--- a/modules/httpserver-api/api-doc/listings/app.json
+++ b/modules/httpserver-api/api-doc/listings/app.json
null
diff --git a/modules/httpserver-api/api-doc/listings/env.json
b/modules/httpserver-api/api-doc/listings/env.json
--- a/modules/httpserver-api/api-doc/listings/env.json
+++ b/modules/httpserver-api/api-doc/listings/env.json
null
diff --git a/modules/httpserver-api/api-doc/listings/file.json
b/modules/httpserver-api/api-doc/listings/file.json
--- a/modules/httpserver-api/api-doc/listings/file.json
+++ b/modules/httpserver-api/api-doc/listings/file.json
null
diff --git a/modules/httpserver-api/api-doc/listings/fs.json
b/modules/httpserver-api/api-doc/listings/fs.json
--- a/modules/httpserver-api/api-doc/listings/fs.json
+++ b/modules/httpserver-api/api-doc/listings/fs.json
null
diff --git a/modules/httpserver-api/api-doc/listings/hardware.json
b/modules/httpserver-api/api-doc/listings/hardware.json
--- a/modules/httpserver-api/api-doc/listings/hardware.json
+++ b/modules/httpserver-api/api-doc/listings/hardware.json
null
diff --git a/modules/httpserver-api/api-doc/listings/network.json
b/modules/httpserver-api/api-doc/listings/network.json
--- a/modules/httpserver-api/api-doc/listings/network.json
+++ b/modules/httpserver-api/api-doc/listings/network.json
null
diff --git a/modules/httpserver-api/api-doc/listings/os.json
b/modules/httpserver-api/api-doc/listings/os.json
--- a/modules/httpserver-api/api-doc/listings/os.json
+++ b/modules/httpserver-api/api-doc/listings/os.json
null
diff --git a/modules/httpserver-api/api-doc/listings/trace.json
b/modules/httpserver-api/api-doc/listings/trace.json
--- a/modules/httpserver-api/api-doc/listings/trace.json
+++ b/modules/httpserver-api/api-doc/listings/trace.json
null
diff --git a/modules/httpserver-api/api/api.cc
b/modules/httpserver-api/api/api.cc
--- a/modules/httpserver-api/api/api.cc
+++ b/modules/httpserver-api/api/api.cc
null
diff --git a/modules/httpserver-api/api/api.hh
b/modules/httpserver-api/api/api.hh
--- a/modules/httpserver-api/api/api.hh
+++ b/modules/httpserver-api/api/api.hh
null
diff --git a/modules/httpserver-api/api/app.cc
b/modules/httpserver-api/api/app.cc
--- a/modules/httpserver-api/api/app.cc
+++ b/modules/httpserver-api/api/app.cc
null
diff --git a/modules/httpserver-api/api/app.hh
b/modules/httpserver-api/api/app.hh
--- a/modules/httpserver-api/api/app.hh
+++ b/modules/httpserver-api/api/app.hh
null
diff --git a/modules/httpserver-api/api/env.cc
b/modules/httpserver-api/api/env.cc
--- a/modules/httpserver-api/api/env.cc
+++ b/modules/httpserver-api/api/env.cc
null
diff --git a/modules/httpserver-api/api/env.hh
b/modules/httpserver-api/api/env.hh
--- a/modules/httpserver-api/api/env.hh
+++ b/modules/httpserver-api/api/env.hh
null
diff --git a/modules/httpserver-api/api/file.cc
b/modules/httpserver-api/api/file.cc
--- a/modules/httpserver-api/api/file.cc
+++ b/modules/httpserver-api/api/file.cc
null
diff --git a/modules/httpserver-api/api/file.hh
b/modules/httpserver-api/api/file.hh
--- a/modules/httpserver-api/api/file.hh
+++ b/modules/httpserver-api/api/file.hh
null
diff --git a/modules/httpserver-api/api/files_mapping.cc
b/modules/httpserver-api/api/files_mapping.cc
--- a/modules/httpserver-api/api/files_mapping.cc
+++ b/modules/httpserver-api/api/files_mapping.cc
null
diff --git a/modules/httpserver-api/api/files_mapping.hh
b/modules/httpserver-api/api/files_mapping.hh
--- a/modules/httpserver-api/api/files_mapping.hh
+++ b/modules/httpserver-api/api/files_mapping.hh
null
diff --git a/modules/httpserver-api/api/fs.cc
b/modules/httpserver-api/api/fs.cc
--- a/modules/httpserver-api/api/fs.cc
+++ b/modules/httpserver-api/api/fs.cc
null
diff --git a/modules/httpserver-api/api/fs.hh
b/modules/httpserver-api/api/fs.hh
--- a/modules/httpserver-api/api/fs.hh
+++ b/modules/httpserver-api/api/fs.hh
null
diff --git a/modules/httpserver-api/api/hardware.cc
b/modules/httpserver-api/api/hardware.cc
--- a/modules/httpserver-api/api/hardware.cc
+++ b/modules/httpserver-api/api/hardware.cc
null
diff --git a/modules/httpserver-api/api/hardware.hh
b/modules/httpserver-api/api/hardware.hh
--- a/modules/httpserver-api/api/hardware.hh
+++ b/modules/httpserver-api/api/hardware.hh
null
diff --git a/modules/httpserver-api/api/network.cc
b/modules/httpserver-api/api/network.cc
--- a/modules/httpserver-api/api/network.cc
+++ b/modules/httpserver-api/api/network.cc
null
diff --git a/modules/httpserver-api/api/network.hh
b/modules/httpserver-api/api/network.hh
--- a/modules/httpserver-api/api/network.hh
+++ b/modules/httpserver-api/api/network.hh
null
diff --git a/modules/httpserver-api/api/os.cc
b/modules/httpserver-api/api/os.cc
--- a/modules/httpserver-api/api/os.cc
+++ b/modules/httpserver-api/api/os.cc
null
diff --git a/modules/httpserver-api/api/os.hh
b/modules/httpserver-api/api/os.hh
--- a/modules/httpserver-api/api/os.hh
+++ b/modules/httpserver-api/api/os.hh
null
diff --git a/modules/httpserver-api/api/trace.cc
b/modules/httpserver-api/api/trace.cc
--- a/modules/httpserver-api/api/trace.cc
+++ b/modules/httpserver-api/api/trace.cc
null
diff --git a/modules/httpserver-api/api/trace.hh
b/modules/httpserver-api/api/trace.hh
--- a/modules/httpserver-api/api/trace.hh
+++ b/modules/httpserver-api/api/trace.hh
null
diff --git a/modules/httpserver-api/common.cc
b/modules/httpserver-api/common.cc
--- a/modules/httpserver-api/common.cc
+++ b/modules/httpserver-api/common.cc
null
diff --git a/modules/httpserver-api/common.hh
b/modules/httpserver-api/common.hh
--- a/modules/httpserver-api/common.hh
+++ b/modules/httpserver-api/common.hh
null
diff --git a/modules/httpserver-api/connection.cc
b/modules/httpserver-api/connection.cc
--- a/modules/httpserver-api/connection.cc
+++ b/modules/httpserver-api/connection.cc
null
diff --git a/modules/httpserver-api/connection.hh
b/modules/httpserver-api/connection.hh
--- a/modules/httpserver-api/connection.hh
+++ b/modules/httpserver-api/connection.hh
null
diff --git a/modules/httpserver-api/connection_manager.cc
b/modules/httpserver-api/connection_manager.cc
--- a/modules/httpserver-api/connection_manager.cc
+++ b/modules/httpserver-api/connection_manager.cc
null
diff --git a/modules/httpserver-api/connection_manager.hh
b/modules/httpserver-api/connection_manager.hh
--- a/modules/httpserver-api/connection_manager.hh
+++ b/modules/httpserver-api/connection_manager.hh
null
diff --git a/modules/httpserver-api/exception.hh
b/modules/httpserver-api/exception.hh
--- a/modules/httpserver-api/exception.hh
+++ b/modules/httpserver-api/exception.hh
null
diff --git a/modules/httpserver-api/global_server.cc
b/modules/httpserver-api/global_server.cc
--- a/modules/httpserver-api/global_server.cc
+++ b/modules/httpserver-api/global_server.cc
null
diff --git a/modules/httpserver-api/global_server.hh
b/modules/httpserver-api/global_server.hh
--- a/modules/httpserver-api/global_server.hh
+++ b/modules/httpserver-api/global_server.hh
null
diff --git a/modules/httpserver-api/handlers.cc
b/modules/httpserver-api/handlers.cc
--- a/modules/httpserver-api/handlers.cc
+++ b/modules/httpserver-api/handlers.cc
null
diff --git a/modules/httpserver-api/handlers.hh
b/modules/httpserver-api/handlers.hh
--- a/modules/httpserver-api/handlers.hh
+++ b/modules/httpserver-api/handlers.hh
null
diff --git a/modules/httpserver-api/header.hh
b/modules/httpserver-api/header.hh
--- a/modules/httpserver-api/header.hh
+++ b/modules/httpserver-api/header.hh
null
diff --git a/modules/httpserver-api/json/api_docs.cc
b/modules/httpserver-api/json/api_docs.cc
--- a/modules/httpserver-api/json/api_docs.cc
+++ b/modules/httpserver-api/json/api_docs.cc
null
diff --git a/modules/httpserver-api/json/api_docs.hh
b/modules/httpserver-api/json/api_docs.hh
--- a/modules/httpserver-api/json/api_docs.hh
+++ b/modules/httpserver-api/json/api_docs.hh
null
diff --git a/modules/httpserver-api/json/formatter.cc
b/modules/httpserver-api/json/formatter.cc
--- a/modules/httpserver-api/json/formatter.cc
+++ b/modules/httpserver-api/json/formatter.cc
null
diff --git a/modules/httpserver-api/json/formatter.hh
b/modules/httpserver-api/json/formatter.hh
--- a/modules/httpserver-api/json/formatter.hh
+++ b/modules/httpserver-api/json/formatter.hh
null
diff --git a/modules/httpserver-api/json/json_elements.cc
b/modules/httpserver-api/json/json_elements.cc
--- a/modules/httpserver-api/json/json_elements.cc
+++ b/modules/httpserver-api/json/json_elements.cc
null
diff --git a/modules/httpserver-api/json/json_elements.hh
b/modules/httpserver-api/json/json_elements.hh
--- a/modules/httpserver-api/json/json_elements.hh
+++ b/modules/httpserver-api/json/json_elements.hh
null
diff --git a/modules/httpserver-api/json/json_path.cc
b/modules/httpserver-api/json/json_path.cc
--- a/modules/httpserver-api/json/json_path.cc
+++ b/modules/httpserver-api/json/json_path.cc
null
diff --git a/modules/httpserver-api/json/json_path.hh
b/modules/httpserver-api/json/json_path.hh
--- a/modules/httpserver-api/json/json_path.hh
+++ b/modules/httpserver-api/json/json_path.hh
null
diff --git a/modules/httpserver-api/json2code.py
b/modules/httpserver-api/json2code.py
--- a/modules/httpserver-api/json2code.py
+++ b/modules/httpserver-api/json2code.py
null
diff --git a/modules/httpserver-api/main.cc b/modules/httpserver-api/main.cc
--- a/modules/httpserver-api/main.cc
+++ b/modules/httpserver-api/main.cc
null
diff --git a/modules/httpserver-api/matcher.cc
b/modules/httpserver-api/matcher.cc
--- a/modules/httpserver-api/matcher.cc
+++ b/modules/httpserver-api/matcher.cc
null
diff --git a/modules/httpserver-api/matcher.hh
b/modules/httpserver-api/matcher.hh
--- a/modules/httpserver-api/matcher.hh
+++ b/modules/httpserver-api/matcher.hh
null
diff --git a/modules/httpserver-api/matchrules.hh
b/modules/httpserver-api/matchrules.hh
--- a/modules/httpserver-api/matchrules.hh
+++ b/modules/httpserver-api/matchrules.hh
null
diff --git a/modules/httpserver-api/mime_types.cc
b/modules/httpserver-api/mime_types.cc
--- a/modules/httpserver-api/mime_types.cc
+++ b/modules/httpserver-api/mime_types.cc
null
diff --git a/modules/httpserver-api/mime_types.hh
b/modules/httpserver-api/mime_types.hh
--- a/modules/httpserver-api/mime_types.hh
+++ b/modules/httpserver-api/mime_types.hh
null
diff --git a/modules/httpserver-api/module.py
b/modules/httpserver-api/module.py
--- a/modules/httpserver-api/module.py
+++ b/modules/httpserver-api/module.py
@@ -0,0 +1,31 @@
+import os
+from osv.modules.api import *
+from osv.modules.filemap import FileMap
+from osv.modules import api
+
+_module = '${OSV_BASE}/modules/httpserver-api'
+
+_exe = '/libhttpserver.so'
+
+usr_files = FileMap()
+usr_files.add(os.path.join(_module, 'libhttpserver.so')).to(_exe)
+usr_files.add(os.path.join(_module, 'api-doc')).to('/usr/mgmt/api')
+
+api.require('openssl')
+api.require('libtools')
+api.require('libyaml')
+
+# only require next 3 modules if java (jre) is included in the list of
modules
+api.require_if_other_module_present('josvsym','java')
+api.require_if_other_module_present('httpserver-jolokia-plugin','java')
+api.require_if_other_module_present('httpserver-jvm-plugin','java')
+
+# httpserver will run regardless of an explicit command line
+# passed with "run.py -e".
+daemon = api.run_on_init(_exe + ' &!')
+
+fg = api.run(_exe)
+
+fg_ssl = api.run(_exe + ' --ssl')
+
+default = daemon
diff --git a/modules/httpserver-api/openssl-init.cc
b/modules/httpserver-api/openssl-init.cc
--- a/modules/httpserver-api/openssl-init.cc
+++ b/modules/httpserver-api/openssl-init.cc
null
diff --git a/modules/httpserver-api/openssl-init.hh
b/modules/httpserver-api/openssl-init.hh
--- a/modules/httpserver-api/openssl-init.hh
+++ b/modules/httpserver-api/openssl-init.hh
null
diff --git a/modules/httpserver-api/path_holder.cc
b/modules/httpserver-api/path_holder.cc
--- a/modules/httpserver-api/path_holder.cc
+++ b/modules/httpserver-api/path_holder.cc
null
diff --git a/modules/httpserver-api/path_holder.hh
b/modules/httpserver-api/path_holder.hh
--- a/modules/httpserver-api/path_holder.hh
+++ b/modules/httpserver-api/path_holder.hh
null
diff --git a/modules/httpserver-api/plain_server.cc
b/modules/httpserver-api/plain_server.cc
--- a/modules/httpserver-api/plain_server.cc
+++ b/modules/httpserver-api/plain_server.cc
null
diff --git a/modules/httpserver-api/plain_server.hh
b/modules/httpserver-api/plain_server.hh
--- a/modules/httpserver-api/plain_server.hh
+++ b/modules/httpserver-api/plain_server.hh
null
diff --git a/modules/httpserver-api/reply.cc
b/modules/httpserver-api/reply.cc
--- a/modules/httpserver-api/reply.cc
+++ b/modules/httpserver-api/reply.cc
null
diff --git a/modules/httpserver-api/reply.hh
b/modules/httpserver-api/reply.hh
--- a/modules/httpserver-api/reply.hh
+++ b/modules/httpserver-api/reply.hh
null
diff --git a/modules/httpserver-api/request.hh
b/modules/httpserver-api/request.hh
--- a/modules/httpserver-api/request.hh
+++ b/modules/httpserver-api/request.hh
null
diff --git a/modules/httpserver-api/request_handler.cc
b/modules/httpserver-api/request_handler.cc
--- a/modules/httpserver-api/request_handler.cc
+++ b/modules/httpserver-api/request_handler.cc
null
diff --git a/modules/httpserver-api/request_handler.hh
b/modules/httpserver-api/request_handler.hh
--- a/modules/httpserver-api/request_handler.hh
+++ b/modules/httpserver-api/request_handler.hh
null
diff --git a/modules/httpserver-api/request_parser.cc
b/modules/httpserver-api/request_parser.cc
--- a/modules/httpserver-api/request_parser.cc
+++ b/modules/httpserver-api/request_parser.cc
null
diff --git a/modules/httpserver-api/request_parser.hh
b/modules/httpserver-api/request_parser.hh
--- a/modules/httpserver-api/request_parser.hh
+++ b/modules/httpserver-api/request_parser.hh
null
diff --git a/modules/httpserver-api/routes.cc
b/modules/httpserver-api/routes.cc
--- a/modules/httpserver-api/routes.cc
+++ b/modules/httpserver-api/routes.cc
null
diff --git a/modules/httpserver-api/routes.hh
b/modules/httpserver-api/routes.hh
--- a/modules/httpserver-api/routes.hh
+++ b/modules/httpserver-api/routes.hh
null
diff --git a/modules/httpserver-api/server.cc
b/modules/httpserver-api/server.cc
--- a/modules/httpserver-api/server.cc
+++ b/modules/httpserver-api/server.cc
null
diff --git a/modules/httpserver-api/server.hh
b/modules/httpserver-api/server.hh
--- a/modules/httpserver-api/server.hh
+++ b/modules/httpserver-api/server.hh
null
diff --git a/modules/httpserver-api/ssl_server.cc
b/modules/httpserver-api/ssl_server.cc
--- a/modules/httpserver-api/ssl_server.cc
+++ b/modules/httpserver-api/ssl_server.cc
null
diff --git a/modules/httpserver-api/ssl_server.hh
b/modules/httpserver-api/ssl_server.hh
--- a/modules/httpserver-api/ssl_server.hh
+++ b/modules/httpserver-api/ssl_server.hh
null
diff --git a/modules/httpserver-api/stub/debug.cc
b/modules/httpserver-api/stub/debug.cc
--- a/modules/httpserver-api/stub/debug.cc
+++ b/modules/httpserver-api/stub/debug.cc
null
diff --git a/modules/httpserver-api/stub/java_api.cc
b/modules/httpserver-api/stub/java_api.cc
--- a/modules/httpserver-api/stub/java_api.cc
+++ b/modules/httpserver-api/stub/java_api.cc
null
diff --git a/modules/httpserver-api/stub/shutdown.cc
b/modules/httpserver-api/stub/shutdown.cc
--- a/modules/httpserver-api/stub/shutdown.cc
+++ b/modules/httpserver-api/stub/shutdown.cc
null
diff --git a/modules/httpserver-api/stub/trace_api.cc
b/modules/httpserver-api/stub/trace_api.cc
--- a/modules/httpserver-api/stub/trace_api.cc
+++ b/modules/httpserver-api/stub/trace_api.cc
null
diff --git a/modules/httpserver-api/stub/version.cc
b/modules/httpserver-api/stub/version.cc
--- a/modules/httpserver-api/stub/version.cc
+++ b/modules/httpserver-api/stub/version.cc
null
diff --git a/modules/httpserver-api/tests/api/testenv.py
b/modules/httpserver-api/tests/api/testenv.py
--- a/modules/httpserver-api/tests/api/testenv.py
+++ b/modules/httpserver-api/tests/api/testenv.py
null
diff --git a/modules/httpserver-api/tests/api/testfile.py
b/modules/httpserver-api/tests/api/testfile.py
--- a/modules/httpserver-api/tests/api/testfile.py
+++ b/modules/httpserver-api/tests/api/testfile.py
null
diff --git a/modules/httpserver-api/tests/api/testfs.py
b/modules/httpserver-api/tests/api/testfs.py
--- a/modules/httpserver-api/tests/api/testfs.py
+++ b/modules/httpserver-api/tests/api/testfs.py
null
diff --git a/modules/httpserver-api/tests/api/testjolokia.py
b/modules/httpserver-api/tests/api/testjolokia.py
--- a/modules/httpserver-api/tests/api/testjolokia.py
+++ b/modules/httpserver-api/tests/api/testjolokia.py
null
diff --git a/modules/httpserver-api/tests/api/testjvm.py
b/modules/httpserver-api/tests/api/testjvm.py
--- a/modules/httpserver-api/tests/api/testjvm.py
+++ b/modules/httpserver-api/tests/api/testjvm.py
null
diff --git a/modules/httpserver-api/tests/api/testnetwork.py
b/modules/httpserver-api/tests/api/testnetwork.py
--- a/modules/httpserver-api/tests/api/testnetwork.py
+++ b/modules/httpserver-api/tests/api/testnetwork.py
null
diff --git a/modules/httpserver-api/tests/api/testos.py
b/modules/httpserver-api/tests/api/testos.py
--- a/modules/httpserver-api/tests/api/testos.py
+++ b/modules/httpserver-api/tests/api/testos.py
null
diff --git a/modules/httpserver-api/tests/api/testtrace.py
b/modules/httpserver-api/tests/api/testtrace.py
--- a/modules/httpserver-api/tests/api/testtrace.py
+++ b/modules/httpserver-api/tests/api/testtrace.py
null
diff --git a/modules/httpserver-api/tests/basetest.py
b/modules/httpserver-api/tests/basetest.py
--- a/modules/httpserver-api/tests/basetest.py
+++ b/modules/httpserver-api/tests/basetest.py
null
diff --git a/modules/httpserver-api/tests/ssl/test_connection.py
b/modules/httpserver-api/tests/ssl/test_connection.py
--- a/modules/httpserver-api/tests/ssl/test_connection.py
+++ b/modules/httpserver-api/tests/ssl/test_connection.py
null
diff --git a/modules/httpserver-api/tests/testhttpserver.py
b/modules/httpserver-api/tests/testhttpserver.py
--- a/modules/httpserver-api/tests/testhttpserver.py
+++ b/modules/httpserver-api/tests/testhttpserver.py
null
diff --git a/modules/httpserver-api/transformers.cc
b/modules/httpserver-api/transformers.cc
--- a/modules/httpserver-api/transformers.cc
+++ b/modules/httpserver-api/transformers.cc
null
diff --git a/modules/httpserver-api/transformers.hh
b/modules/httpserver-api/transformers.hh
--- a/modules/httpserver-api/transformers.hh
+++ b/modules/httpserver-api/transformers.hh
null
diff --git a/modules/httpserver-api/transport.hh
b/modules/httpserver-api/transport.hh
--- a/modules/httpserver-api/transport.hh
+++ b/modules/httpserver-api/transport.hh
null
diff --git a/modules/httpserver-html5-gui/Makefile
b/modules/httpserver-html5-gui/Makefile
--- a/modules/httpserver-html5-gui/Makefile
+++ b/modules/httpserver-html5-gui/Makefile
@@ -0,0 +1,22 @@
+src = $(shell readlink -f ../..)
+
+quiet = $(if $V, $1, @echo " $2"; $1)
+very-quiet = $(if $V, $1, @$1)
+
+all: module
+module: gui swagger-ui-lib
+
+swagger-ui-lib: swagger-ui/.git
+.PHONY: swagger-ui-lib
+
+swagger-ui/.git:
+ cd $(src) && git submodule update --init -f
modules/httpserver-html5-gui/swagger-ui
+
+gui: osv-gui/.git
+ $(call quiet,make -C osv-gui)
+.PHONY: gui
+
+osv-gui/.git:
+ cd $(src) && git submodule update --init -f
modules/httpserver-html5-gui/osv-gui
+
+.SECONDARY:
diff --git a/modules/httpserver-html5-gui/module.py
b/modules/httpserver-html5-gui/module.py
--- a/modules/httpserver-html5-gui/module.py
+++ b/modules/httpserver-html5-gui/module.py
@@ -0,0 +1,24 @@
+import os
+from osv.modules.api import *
+from osv.modules.filemap import FileMap
+from osv.modules import api
+
+_module = '${OSV_BASE}/modules/httpserver-html5-gui'
+
+usr_files = FileMap()
+usr_files.add(os.path.join(_module, 'swagger-ui',
'dist')).to('/usr/mgmt/swagger-ui/dist')
+usr_files.add(os.path.join(_module, 'osv-gui/public')).to('/usr/mgmt/gui')
+
+api.require('httpserver-api')
+
+# httpserver will run regardless of an explicit command line
+# passed with "run.py -e".
+_exe = '/libhttpserver.so'
+daemon = api.run_on_init(_exe + ' &!')
+
+fg = api.run(_exe)
+
+fg_ssl = api.run(_exe + ' --ssl')
+fg_cors = api.run(_exe + ' --access-allow=true')
+
+default = daemon
diff --git a/modules/httpserver-html5-gui/osv-gui
b/modules/httpserver-html5-gui/osv-gui
--- a/modules/httpserver-html5-gui/osv-gui
+++ b/modules/httpserver-html5-gui/osv-gui
null
diff --git a/modules/httpserver-html5-gui/swagger-ui
b/modules/httpserver-html5-gui/swagger-ui
--- a/modules/httpserver-html5-gui/swagger-ui
+++ b/modules/httpserver-html5-gui/swagger-ui
null
diff --git a/modules/httpserver-jolokia-plugin/Makefile
b/modules/httpserver-jolokia-plugin/Makefile
--- a/modules/httpserver-jolokia-plugin/Makefile
+++ b/modules/httpserver-jolokia-plugin/Makefile
@@ -2,7 +2,7 @@
INCLUDES = -isystem $(miscbase)/usr/include
-I$(src)/build/$(mode)/gen/include
INCLUDES += -I../../include -I. -I../../java -I../../arch/$(ARCH) -I../..
INCLUDES += -I$(jdkbase)/include -I$(jdkbase)/include/linux
-INCLUDES += -I../httpserver
+INCLUDES += -I../httpserver-api
# compiler flags:
# -g adds debugging information to the executable file
@@ -11,7 +11,7 @@ autodepend = -MD -MT $@ -MP
CXXFLAGS = -g -Wall -std=c++11 -fPIC $(INCLUDES) -O2 $(autodepend)
src = $(shell readlink -f ../..)
-CODE_GEN_FROM_JSON := ../httpserver/json2code.py
+CODE_GEN_FROM_JSON := ../httpserver-api/json2code.py
RM := /bin/rm
ifndef ARCH
diff --git a/modules/httpserver-jvm-plugin/Makefile
b/modules/httpserver-jvm-plugin/Makefile
--- a/modules/httpserver-jvm-plugin/Makefile
+++ b/modules/httpserver-jvm-plugin/Makefile
@@ -2,7 +2,7 @@
INCLUDES = -isystem $(miscbase)/usr/include
-I$(src)/build/$(mode)/gen/include
INCLUDES += -I../../include -I. -I../../java -I../../arch/$(ARCH) -I../..
INCLUDES += -I$(jdkbase)/include -I$(jdkbase)/include/linux
-INCLUDES += -I../httpserver
+INCLUDES += -I../httpserver-api
# compiler flags:
# -g adds debugging information to the executable file
@@ -11,7 +11,7 @@ autodepend = -MD -MT $@ -MP
CXXFLAGS = -g -Wall -std=c++11 -fPIC $(INCLUDES) -O2 $(autodepend)
src = $(shell readlink -f ../..)
-CODE_GEN_FROM_JSON := ../httpserver/json2code.py
+CODE_GEN_FROM_JSON := ../httpserver-api/json2code.py
RM := /bin/rm
ifndef ARCH
diff --git a/modules/httpserver/module.py b/modules/httpserver/module.py
--- a/modules/httpserver/module.py
+++ b/modules/httpserver/module.py
@@ -1,33 +1,10 @@
-import os
-from osv.modules.api import *
-from osv.modules.filemap import FileMap
from osv.modules import api
-_module = '${OSV_BASE}/modules/httpserver'
+api.require('httpserver-html5-gui')
-_exe = '/libhttpserver.so'
-
-usr_files = FileMap()
-usr_files.add(os.path.join(_module, 'libhttpserver.so')).to(_exe)
-usr_files.add(os.path.join(_module, 'api-doc')).to('/usr/mgmt/api')
-usr_files.add(os.path.join(_module, 'swagger-ui',
'dist')).to('/usr/mgmt/swagger-ui/dist')
-usr_files.add(os.path.join(_module, 'osv-gui/public')).to('/usr/mgmt/gui')
-
-api.require('openssl')
-api.require('libtools')
-api.require('libyaml')
-
-# only require next 3 modules if java (jre) is included in the list of
modules
-api.require_if_other_module_present('josvsym','java')
-api.require_if_other_module_present('httpserver-jolokia-plugin','java')
-api.require_if_other_module_present('httpserver-jvm-plugin','java')
+fg = api.run('/libhttpserver.so')
# httpserver will run regardless of an explicit command line
# passed with "run.py -e".
-daemon = api.run_on_init(_exe + ' &!')
-
-fg = api.run(_exe)
-
-fg_ssl = api.run(_exe + ' --ssl')
-
+daemon = api.run_on_init('/libhttpserver.so &!')
default = daemon
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.