mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-19 06:48:10 +00:00
Support 0.0.0.0 as host when creating local compute
This commit is contained in:
parent
7df645f742
commit
3a8ca1071e
@ -65,10 +65,13 @@ class Controller:
|
|||||||
log.info("Start controller")
|
log.info("Start controller")
|
||||||
yield from self.load()
|
yield from self.load()
|
||||||
server_config = Config.instance().get_section_config("Server")
|
server_config = Config.instance().get_section_config("Server")
|
||||||
|
host = server_config.get("host", "localhost")
|
||||||
|
if host == "0.0.0.0":
|
||||||
|
host = "127.0.0.1"
|
||||||
yield from self.add_compute(compute_id="local",
|
yield from self.add_compute(compute_id="local",
|
||||||
name=socket.gethostname(),
|
name=socket.gethostname(),
|
||||||
protocol=server_config.get("protocol", "http"),
|
protocol=server_config.get("protocol", "http"),
|
||||||
host=server_config.get("host", "localhost"),
|
host=host,
|
||||||
port=server_config.getint("port", 3080),
|
port=server_config.getint("port", 3080),
|
||||||
user=server_config.get("user", ""),
|
user=server_config.get("user", ""),
|
||||||
password=server_config.get("password", ""),
|
password=server_config.get("password", ""),
|
||||||
|
Loading…
Reference in New Issue
Block a user