|
|
|
@ -90,6 +90,7 @@ def parse_arguments(argv):
|
|
|
|
|
parser.add_argument("--port", help="run on the given port", type=int)
|
|
|
|
|
parser.add_argument("--ssl", action="store_true", help="run in SSL mode")
|
|
|
|
|
parser.add_argument("--controller", action="store_true", help="start as a GNS3 controller")
|
|
|
|
|
parser.add_argument("--no-ubridge", action="store_false", help="do not use ubridge to handle node connections")
|
|
|
|
|
parser.add_argument("--config", help="Configuration file")
|
|
|
|
|
parser.add_argument("--certfile", help="SSL cert file")
|
|
|
|
|
parser.add_argument("--certkey", help="SSL key file")
|
|
|
|
@ -117,6 +118,7 @@ def parse_arguments(argv):
|
|
|
|
|
"record": config.get("record", ""),
|
|
|
|
|
"local": config.getboolean("local", False),
|
|
|
|
|
"controller": config.getboolean("controller", False),
|
|
|
|
|
"use_ubridge": config.getboolean("use_ubridge", True), # this enables uBridge globally
|
|
|
|
|
"allow": config.getboolean("allow_remote_console", False),
|
|
|
|
|
"quiet": config.getboolean("quiet", False),
|
|
|
|
|
"debug": config.getboolean("debug", False),
|
|
|
|
@ -134,6 +136,7 @@ def set_config(args):
|
|
|
|
|
server_config = config.get_section_config("Server")
|
|
|
|
|
server_config["local"] = str(args.local)
|
|
|
|
|
server_config["controller"] = str(args.controller)
|
|
|
|
|
server_config["use_ubridge"] = str(args.no_ubridge)
|
|
|
|
|
server_config["allow_remote_console"] = str(args.allow)
|
|
|
|
|
server_config["host"] = args.host
|
|
|
|
|
server_config["port"] = str(args.port)
|
|
|
|
@ -207,6 +210,11 @@ def run():
|
|
|
|
|
if server_config.getboolean("local"):
|
|
|
|
|
log.warning("Local mode is enabled. Beware, clients will have full control on your filesystem")
|
|
|
|
|
|
|
|
|
|
if server_config.getboolean("use_ubridge"):
|
|
|
|
|
log.info("uBridge will be used to handle node connections")
|
|
|
|
|
else:
|
|
|
|
|
log.warn("uBridge will NOT be used to handle node connections")
|
|
|
|
|
|
|
|
|
|
# we only support Python 3 version >= 3.4
|
|
|
|
|
if sys.version_info < (3, 4):
|
|
|
|
|
raise SystemExit("Python 3.4 or higher is required")
|
|
|
|
|