mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Support forwarding POST request to compute nodes
This commit is contained in:
4 files changed
+51
-8
No files matched your search
@@ -324,9 +324,9 @@ class Compute:
|
||||
return (yield from self.http_query("DELETE", path, **kwargs))
|
||||
|
||||
@asyncio.coroutine
|
||||
def forward(self, type, path):
|
||||
def forward(self, method, type, path, data=None):
|
||||
"""
|
||||
Forward a call to the emulator on compute
|
||||
"""
|
||||
res = yield from self.get("/{}/{}".format(type, path))
|
||||
res = yield from self.http_query(method, "/{}/{}".format(type, path), data=data)
|
||||
return res.json
|
||||
Reference in new issue
Block a user