mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-18 20:37:57 +00:00
Fixes call to export project.
This commit is contained in:
parent
16b5bb8810
commit
76cc1d2750
@ -368,7 +368,7 @@ class ProjectHandler:
|
||||
response.content_length = None
|
||||
response.start(request)
|
||||
|
||||
for data in project.export(include_images=bool(request.GET.get("images", "0"))):
|
||||
for data in project.export(include_images=bool(request.GET.get("include_images", "0"))):
|
||||
response.write(data)
|
||||
yield from response.drain()
|
||||
|
||||
|
@ -29,7 +29,6 @@ from gns3server.utils import parse_version
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
from ..base_manager import BaseManager
|
||||
from ..project_manager import ProjectManager
|
||||
from .docker_vm import DockerVM
|
||||
from .docker_error import *
|
||||
|
||||
@ -59,7 +58,7 @@ class Docker(BaseManager):
|
||||
raise DockerError("Can't connect to docker daemon")
|
||||
|
||||
if parse_version(version["ApiVersion"]) < parse_version(DOCKER_MINIMUM_API_VERSION):
|
||||
raise DockerError("Docker API version is {}. But GNS3 require a minimum API version {}".format(version["ApiVersion"], DOCKER_MINIMUM_API_VERSION))
|
||||
raise DockerError("Docker API version is {}. GNS3 requires a minimum API version of {}".format(version["ApiVersion"], DOCKER_MINIMUM_API_VERSION))
|
||||
return self._connector
|
||||
|
||||
def __del__(self):
|
||||
|
@ -594,7 +594,7 @@ class Project:
|
||||
for prop, value in node["properties"].items():
|
||||
if prop.endswith("image"):
|
||||
node["properties"][prop] = os.path.basename(value)
|
||||
if include_images:
|
||||
if include_images is True:
|
||||
self._export_images(value, node["type"], z)
|
||||
z.writestr("project.gns3", json.dumps(topology).encode())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user