mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 09:18:08 +00:00
parent
5345fe8490
commit
c563dbba8a
@ -112,7 +112,7 @@ def parse_arguments(argv):
|
||||
config = Config.instance().get_section_config("Server")
|
||||
defaults = {
|
||||
"host": config.get("host", "0.0.0.0"),
|
||||
"port": config.get("port", 8000),
|
||||
"port": config.get("port", 3080),
|
||||
"ssl": config.getboolean("ssl", False),
|
||||
"certfile": config.get("certfile", ""),
|
||||
"certkey": config.get("certkey", ""),
|
||||
|
@ -144,7 +144,7 @@ log "Setup GNS3 server"
|
||||
cat <<EOF > /opt/gns3/gns3_server.conf
|
||||
[Server]
|
||||
host = 0.0.0.0
|
||||
port = 8000
|
||||
port = 3080
|
||||
images_path = /opt/gns3/images
|
||||
projects_path = /opt/gns3/projects
|
||||
report_errors = True
|
||||
@ -196,7 +196,7 @@ log "Setup VPN"
|
||||
cat <<EOF > /opt/gns3/gns3_server.conf
|
||||
[Server]
|
||||
host = 172.16.253.1
|
||||
port = 8000
|
||||
port = 3080
|
||||
images_path = /opt/gns3/images
|
||||
projects_path = /opt/gns3/projects
|
||||
report_errors = True
|
||||
|
@ -104,7 +104,7 @@ class Query:
|
||||
if path is None:
|
||||
return
|
||||
with open(self._example_file_path(method, route), 'w+') as f:
|
||||
f.write("curl -i -X {} 'http://localhost:8000/v{}{}'".format(method, api_version, path))
|
||||
f.write("curl -i -X {} 'http://localhost:3080/v{}{}'".format(method, api_version, path))
|
||||
if body:
|
||||
f.write(" -d '{}'".format(re.sub(r"\n", "", json.dumps(json.loads(body), sort_keys=True))))
|
||||
f.write("\n\n")
|
||||
|
@ -77,7 +77,7 @@ def test_parse_arguments(capsys, tmpdir):
|
||||
assert run.parse_arguments([]).host == "192.168.1.2"
|
||||
|
||||
assert run.parse_arguments(["--port", "8002"]).port == 8002
|
||||
assert run.parse_arguments([]).port == 8000
|
||||
assert run.parse_arguments([]).port == 3080
|
||||
server_config["port"] = "8003"
|
||||
assert run.parse_arguments([]).port == 8003
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user