mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
If listen on all interface do not return localhost as console
Fix https://github.com/GNS3/gns3-gui/issues/1574
This commit is contained in:
3 files changed
+19
-3
No files matched your search
@@ -411,8 +411,16 @@ class Compute:
|
||||
def _getUrl(self, path):
|
||||
host = self._host
|
||||
# IPV6
|
||||
if host and ":" in host:
|
||||
host = "[{}]".format(host)
|
||||
if host:
|
||||
# IPV6
|
||||
if ":" in host:
|
||||
# Reduce IPV6 to his simple form
|
||||
host = str(ipaddress.IPv6Address(host))
|
||||
if host == "::":
|
||||
host = "::1"
|
||||
host = "[{}]".format(host)
|
||||
elif host == "0.0.0.0":
|
||||
host = "127.0.0.1"
|
||||
return "{}://{}:{}/v2/compute{}".format(self._protocol, host, self._port, path)
|
||||
|
||||
@asyncio.coroutine
|
||||
|
||||
@@ -127,7 +127,7 @@ NODE_OBJECT_SCHEMA = {
|
||||
"type": ["integer", "null"]
|
||||
},
|
||||
"console_host": {
|
||||
"description": "Console host",
|
||||
"description": "Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller.",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user