mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-24 15:58:08 +00:00
Fix import/export of dynamips configuration
This commit is contained in:
parent
63b888a57e
commit
96194cef67
@ -344,9 +344,6 @@ class NodeHandler:
|
||||
raise aiohttp.web.HTTPForbidden
|
||||
|
||||
node_type = node.node_type
|
||||
if node_type == "dynamips":
|
||||
path = "/project-files/{}/{}".format(node_type, path)
|
||||
else:
|
||||
path = "/project-files/{}/{}/{}".format(node_type, node.id, path)
|
||||
|
||||
res = yield from node.compute.http_query("GET", "/projects/{project_id}/files{path}".format(project_id=project.id, path=path), timeout=None, raw=True)
|
||||
@ -384,12 +381,9 @@ class NodeHandler:
|
||||
raise aiohttp.web.HTTPForbidden
|
||||
|
||||
node_type = node.node_type
|
||||
if node_type == "dynamips":
|
||||
path = "/project-files/{}/{}".format(node_type, path)
|
||||
else:
|
||||
path = "/project-files/{}/{}/{}".format(node_type, node.id, path)
|
||||
|
||||
data = yield from request.content.read()
|
||||
|
||||
res = yield from node.compute.http_query("POST", "/projects/{project_id}/files{path}".format(project_id=project.id, path=path), data=data, timeout=None, raw=True)
|
||||
yield from node.compute.http_query("POST", "/projects/{project_id}/files{path}".format(project_id=project.id, path=path), data=data, timeout=None, raw=True)
|
||||
response.set_status(201)
|
||||
|
Loading…
Reference in New Issue
Block a user