mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
32 files changed
+652
-334
No files matched your search
@@ -17,7 +17,6 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
|
||||
from gns3server.web.route import Route
|
||||
from gns3server.schemas.nio import NIO_SCHEMA
|
||||
@@ -78,7 +77,6 @@ class DynamipsVMHandler:
|
||||
aux=request.json.get("aux"),
|
||||
chassis=request.json.pop("chassis", default_chassis),
|
||||
node_type="dynamips")
|
||||
|
||||
yield from dynamips_manager.update_vm_settings(vm, request.json)
|
||||
response.set_status(201)
|
||||
response.json(vm)
|
||||
|
||||
@@ -344,10 +344,7 @@ 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)
|
||||
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)
|
||||
response.set_status(200)
|
||||
@@ -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)
|
||||
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)
|
||||
Reference in new issue
Block a user