Remove --controller

This add too much complexity and it can work
without it.

Fix https://github.com/GNS3/gns3-vm/issues/80, #645
This commit is contained in:
Julien Duponchelle committed 2016-09-07 10:04:28 +02:00
1 parent 9c6ee97ff2
commit f1fe7246e7
7 files changed
+2 -33

No files matched your search

-3
View File
@@ -184,9 +184,6 @@ class Route(object):
return response
# API call
if "controller" in func.__module__ and server_config.getboolean("controller", False) is False:
raise aiohttp.web.HTTPForbidden(text="The server is not a controller")
request = yield from parse_request(request, input_schema, raw)
record_file = server_config.get("record")
if record_file:
+2 -4
View File
@@ -102,8 +102,7 @@ class WebServer:
yield from self._handler.finish_connections()
self._handler = None
if Config.instance().get_section_config("Server").getboolean("controller"):
yield from Controller.instance().stop()
yield from Controller.instance().stop()
for module in MODULES:
log.debug("Unloading module {}".format(module.__name__))
@@ -306,8 +305,7 @@ class WebServer:
self._signal_handling()
self._exit_handling()
if server_config.getboolean("controller"):
controller_start = asyncio.async(Controller.instance().start())
controller_start = asyncio.async(Controller.instance().start())
if server_config.getboolean("shell"):
asyncio.async(self.start_shell())