mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
parent
08bafc2dcc
commit
6a015fffeb
@ -16,6 +16,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import socket
|
import socket
|
||||||
import asyncio
|
import asyncio
|
||||||
@ -68,15 +69,19 @@ class Controller:
|
|||||||
name = "Main server"
|
name = "Main server"
|
||||||
|
|
||||||
computes = yield from self._load_controller_settings()
|
computes = yield from self._load_controller_settings()
|
||||||
yield from self.add_compute(compute_id="local",
|
try:
|
||||||
name=name,
|
yield from self.add_compute(compute_id="local",
|
||||||
protocol=server_config.get("protocol", "http"),
|
name=name,
|
||||||
host=host,
|
protocol=server_config.get("protocol", "http"),
|
||||||
console_host=console_host,
|
host=host,
|
||||||
port=server_config.getint("port", 3080),
|
console_host=console_host,
|
||||||
user=server_config.get("user", ""),
|
port=server_config.getint("port", 3080),
|
||||||
password=server_config.get("password", ""),
|
user=server_config.get("user", ""),
|
||||||
force=True)
|
password=server_config.get("password", ""),
|
||||||
|
force=True)
|
||||||
|
except aiohttp.web_exceptions.HTTPConflict as e:
|
||||||
|
log.fatal("Can't acces to the local server, make sure anything else is not running on the same port")
|
||||||
|
sys.exit(1)
|
||||||
for c in computes:
|
for c in computes:
|
||||||
try:
|
try:
|
||||||
yield from self.add_compute(**c)
|
yield from self.add_compute(**c)
|
||||||
|
Loading…
Reference in New Issue
Block a user