mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix wrong defaults for images_path, configs_path, appliances_path. Fixes #1829
This commit is contained in:
parent
b6a021dabd
commit
e182f53d69
@ -82,7 +82,7 @@ class Controller:
|
|||||||
|
|
||||||
computes = self._load_controller_settings()
|
computes = self._load_controller_settings()
|
||||||
from gns3server.web.web_server import WebServer
|
from gns3server.web.web_server import WebServer
|
||||||
ssl_context = WebServer.instance().ssl_context()
|
ssl_context = WebServer.instance(host=host, port=port).ssl_context()
|
||||||
protocol = server_config.get("protocol", "http")
|
protocol = server_config.get("protocol", "http")
|
||||||
if ssl_context and protocol != "https":
|
if ssl_context and protocol != "https":
|
||||||
log.warning("Protocol changed to 'https' for local compute because SSL is enabled".format(port))
|
log.warning("Protocol changed to 'https' for local compute because SSL is enabled".format(port))
|
||||||
@ -273,7 +273,7 @@ class Controller:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
server_config = Config.instance().get_section_config("Server")
|
server_config = Config.instance().get_section_config("Server")
|
||||||
images_path = os.path.expanduser(server_config.get("images_path", "~/GNS3/projects"))
|
images_path = os.path.expanduser(server_config.get("images_path", "~/GNS3/images"))
|
||||||
os.makedirs(images_path, exist_ok=True)
|
os.makedirs(images_path, exist_ok=True)
|
||||||
return images_path
|
return images_path
|
||||||
|
|
||||||
@ -283,9 +283,9 @@ class Controller:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
server_config = Config.instance().get_section_config("Server")
|
server_config = Config.instance().get_section_config("Server")
|
||||||
images_path = os.path.expanduser(server_config.get("configs_path", "~/GNS3/projects"))
|
configs_path = os.path.expanduser(server_config.get("configs_path", "~/GNS3/configs"))
|
||||||
os.makedirs(images_path, exist_ok=True)
|
os.makedirs(configs_path, exist_ok=True)
|
||||||
return images_path
|
return configs_path
|
||||||
|
|
||||||
async def add_compute(self, compute_id=None, name=None, force=False, connect=True, **kwargs):
|
async def add_compute(self, compute_id=None, name=None, force=False, connect=True, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
@ -70,7 +70,7 @@ class ApplianceManager:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
server_config = Config.instance().get_section_config("Server")
|
server_config = Config.instance().get_section_config("Server")
|
||||||
appliances_path = os.path.expanduser(server_config.get("appliances_path", "~/GNS3/projects"))
|
appliances_path = os.path.expanduser(server_config.get("appliances_path", "~/GNS3/appliances"))
|
||||||
os.makedirs(appliances_path, exist_ok=True)
|
os.makedirs(appliances_path, exist_ok=True)
|
||||||
return appliances_path
|
return appliances_path
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user