mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-15 22:08:17 +00:00
Merge branch '2.1' into 2.2
# Conflicts: # gns3server/compute/docker/docker_vm.py # gns3server/version.py
This commit is contained in:
@ -501,18 +501,21 @@ class Project:
|
||||
if compute not in self._project_created_on_compute:
|
||||
# For a local server we send the project path
|
||||
if compute.id == "local":
|
||||
yield from compute.post("/projects", data={
|
||||
data = {
|
||||
"name": self._name,
|
||||
"project_id": self._id,
|
||||
"path": self._path,
|
||||
"variables": self._variables
|
||||
})
|
||||
"path": self._path
|
||||
}
|
||||
else:
|
||||
yield from compute.post("/projects", data={
|
||||
data = {
|
||||
"name": self._name,
|
||||
"project_id": self._id,
|
||||
"variables": self._variables
|
||||
})
|
||||
"project_id": self._id
|
||||
}
|
||||
|
||||
if self._variables:
|
||||
data["variables"] = self._variables
|
||||
|
||||
yield from compute.post("/projects", data=data)
|
||||
|
||||
self._project_created_on_compute.add(compute)
|
||||
yield from node.create()
|
||||
@ -963,7 +966,7 @@ class Project:
|
||||
yield from wait_run_in_executor(self._create_duplicate_project_file, project_path, zipstream)
|
||||
with open(project_path, "rb") as f:
|
||||
project = yield from import_project(self._controller, str(uuid.uuid4()), f, location=location, name=name, keep_compute_id=True)
|
||||
except (OSError, UnicodeEncodeError) as e:
|
||||
except (ValueError, OSError, UnicodeEncodeError) as e:
|
||||
raise aiohttp.web.HTTPConflict(text="Can not duplicate project: {}".format(str(e)))
|
||||
|
||||
if previous_status == "closed":
|
||||
|
Reference in New Issue
Block a user