mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Improve remote server console host support when binding to 0.0.0.0
Fix https://github.com/GNS3/gns3-gui/issues/1574
This commit is contained in:
8 files changed
+55
-31
No files matched your search
@@ -73,7 +73,7 @@ class Compute:
|
||||
A GNS3 compute.
|
||||
"""
|
||||
|
||||
def __init__(self, compute_id, controller=None, protocol="http", host="localhost", port=3080, user=None, password=None, name=None):
|
||||
def __init__(self, compute_id, controller=None, protocol="http", host="localhost", port=3080, user=None, password=None, name=None, console_host=None):
|
||||
self._http_session = None
|
||||
assert controller is not None
|
||||
log.info("Create compute %s", compute_id)
|
||||
@@ -87,6 +87,10 @@ class Compute:
|
||||
self.host = host
|
||||
self.port = port
|
||||
self._user = None
|
||||
if console_host is None:
|
||||
self._console_host = host
|
||||
else:
|
||||
self._console_host = console_host
|
||||
self._password = None
|
||||
self._connected = False
|
||||
self._closed = False # Close mean we are destroying the compute node
|
||||
@@ -214,6 +218,10 @@ class Compute:
|
||||
def host(self, host):
|
||||
self._host = host
|
||||
|
||||
@property
|
||||
def console_host(self):
|
||||
return self._console_host
|
||||
|
||||
@property
|
||||
def port(self):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user