1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 00:08:11 +00:00

Bugfixes with cloud server communication

This commit is contained in:
Jerry Seutter 2014-09-21 21:41:51 -06:00
parent b132c901c9
commit cf59240bef
4 changed files with 8 additions and 10 deletions

View File

@ -11,9 +11,7 @@ mkdir -p /opt/gns3
pushd /opt/gns3
git clone --branch ${git_branch} ${git_url}
cd gns3-server
pip3 install tornado
pip3 install pyzmq
pip3 install jsonschema
pip3 install -r dev-requirements.txt
python3 ./setup.py install
${rc_local}

View File

@ -219,19 +219,19 @@ def get_gns3secrets(cmd_line_option_list):
"""
gns3secret_paths = [
os.path.expanduser("~/"),
os.path.join(os.path.expanduser("~"), '.config', 'GNS3'),
SCRIPT_PATH,
]
config = configparser.ConfigParser()
for gns3secret_path in gns3secret_paths:
gns3secret_file = "%s/.gns3secrets.conf" % (gns3secret_path)
gns3secret_file = "%s/cloud.conf" % (gns3secret_path)
if os.path.isfile(gns3secret_file):
config.read(gns3secret_file)
try:
for key, value in config.items("Cloud"):
for key, value in config.items("CLOUD_SERVER"):
cmd_line_option_list[key] = value.strip()
except configparser.NoSectionError:
pass

View File

@ -83,7 +83,7 @@ class DeadMan(IModule):
cmd.append("--file")
cmd.append("%s" % (self._heartbeat_file))
cmd.append("--background")
log.debug("Deadman: Running command: %s"%(cmd))
log.info("Deadman: Running command: %s"%(cmd))
process = subprocess.Popen(cmd, stderr=subprocess.STDOUT, shell=False)
return process
@ -97,7 +97,7 @@ class DeadMan(IModule):
cmd.append("gns3dms")
cmd.append("-k")
log.debug("Deadman: Running command: %s"%(cmd))
log.info("Deadman: Running command: %s"%(cmd))
process = subprocess.Popen(cmd, shell=False)
return process

View File

@ -168,7 +168,7 @@ def _start_gns3server():
cmd = []
cmd.append("gns3server")
log.debug("Starting gns3server ...")
log.info("Starting gns3server ...")
subprocess.Popen(cmd, shell=False)
@ -203,7 +203,7 @@ def main():
except FileExistsError:
pass
(server_key, server_crt ) = _generate_certs()
(server_key, server_crt) = _generate_certs()
cloud_config = configparser.ConfigParser()
cloud_config['CLOUD_SERVER'] = {}