Load local server before anything else

This commit is contained in:
Julien Duponchelle committed 2017-02-28 12:08:47 +01:00
1 parent da8811515d
commit 41d7570b24
2 files changed
+9 -7

No files matched your search

+4 -2
View File
@@ -53,9 +53,10 @@ class Controller:
@asyncio.coroutine
def start(self):
log.info("Start controller")
yield from self.load()
server_config = Config.instance().get_section_config("Server")
host = server_config.get("host", "localhost")
# If console_host is 0.0.0.0 client will use the ip they use
# to connect to the controller
console_host = host
@@ -70,6 +71,7 @@ class Controller:
user=server_config.get("user", ""),
password=server_config.get("password", ""),
force=True)
yield from self._load_controller_settings()
yield from self.load_projects()
yield from self.gns3vm.auto_start_vm()
yield from self._project_auto_open()
@@ -116,7 +118,7 @@ class Controller:
json.dump(data, f, indent=4)
@asyncio.coroutine
def load(self):
def _load_controller_settings(self):
"""
Reload the controller configuration from disk
"""