Merge branch '1.5' into 2.0

This commit is contained in:
Julien Duponchelle committed 2016-05-18 11:25:41 +02:00
commit d5895c3a47
22 files changed
+65 -53

No files matched your search

+1 -1
View File
@@ -424,7 +424,7 @@ class BaseManager:
return force_unix_path(path)
else:
# For non local server we disallow using absolute path outside image directory
# For non local server we disallow using absolute path outside image directory
if Config.instance().get_section_config("Server").get("local", False) is False:
img_directory = self.config.get_section_config("Server").get("images_path", os.path.expanduser("~/GNS3/images"))
img_directory = force_unix_path(img_directory)
+1 -1
View File
@@ -70,7 +70,7 @@ class BaseNode:
else:
self._console = self._manager.port_manager.reserve_tcp_port(self._console, self._project)
# We need to allocate aux before giving a random console port
# We need to allocate aux before giving a random console port
if self._aux is not None:
self._aux = self._manager.port_manager.reserve_tcp_port(self._aux, self._project)
+3 -3
View File
@@ -116,11 +116,11 @@ class Docker(BaseManager):
pass
log.debug("Query Docker %s %s params=%s data=%s Response: %s", method, path, params, data, body)
if response.status == 304:
raise DockerHttp304Error("Docker has returned an error: {} {}".format(response.status, body))
raise DockerHttp304Error("Docker has returned an error: {} {}".format(response.status, body))
elif response.status == 404:
raise DockerHttp404Error("Docker has returned an error: {} {}".format(response.status, body))
raise DockerHttp404Error("Docker has returned an error: {} {}".format(response.status, body))
else:
raise DockerError("Docker has returned an error: {} {}".format(response.status, body))
raise DockerError("Docker has returned an error: {} {}".format(response.status, body))
return response
@asyncio.coroutine
+1 -1
View File
@@ -368,7 +368,7 @@ class DockerVM(BaseNode):
"""
# We can not use the API because docker doesn't expose a websocket api for exec
# https://github.com/GNS3/gns3-gui/issues/1039
# https://github.com/GNS3/gns3-gui/issues/1039
process = yield from asyncio.subprocess.create_subprocess_exec(
"docker", "exec", "-i", self._cid, "/gns3/bin/busybox", "script", "-qfc", "/gns3/bin/busybox sh", "/dev/null",
stdout=asyncio.subprocess.PIPE,
+1 -1
View File
@@ -17,7 +17,7 @@
#
# This script is injected into the container and launch before
# the start command of the container
# the start command of the container
#
OLD_PATH="$PATH"
PATH=/gns3/bin:/tmp/gns3/bin
+1 -1
View File
@@ -218,7 +218,7 @@ class Dynamips(BaseManager):
continue
# Release the dynamips ids if we want to reload the same project
# later
# later
if project.id in self._dynamips_ids:
del self._dynamips_ids[project.id]
+1 -1
View File
@@ -131,7 +131,7 @@ class IOUVM(BaseNode):
self._path = self.manager.get_abs_image_path(path)
# In 1.2 users uploaded images to the images roots
# after the migration their images are inside images/IOU
# after the migration their images are inside images/IOU
# but old topologies use old path
if "IOU" not in self._path:
location, filename = os.path.split(self._path)
+1 -1
View File
@@ -484,7 +484,7 @@ class Project:
if os.path.split(root)[-1:][0] == "project-files":
dirs[:] = [d for d in dirs if d not in ("snapshots", "tmp")]
# Ignore log files and OS noise
# Ignore log files and OS noise
files = [f for f in files if not f.endswith('_log.txt') and not f.endswith('.log') and f != '.DS_Store']
for file in files:
+2 -2
View File
@@ -82,8 +82,8 @@ class QemuVM(BaseNode):
try:
self.qemu_path = qemu_path
except QemuError as e:
# If the binary is not found for topologies 1.4 and later
# search via the platform otherwise use the binary name
# If the binary is not found for topologies 1.4 and later
# search via the platform otherwise use the binary name
if platform:
self.platform = platform
else:
+2 -2
View File
@@ -83,8 +83,8 @@ class VirtualBox(BaseManager):
@asyncio.coroutine
def execute(self, subcommand, args, timeout=60):
# We use a lock prevent parallel execution due to strange errors
# reported by a user and reproduced by us.
# We use a lock prevent parallel execution due to strange errors
# reported by a user and reproduced by us.
# https://github.com/GNS3/gns3-gui/issues/261
with (yield from self._execute_lock):
vboxmanage_path = self.vboxmanage_path