mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-12 20:38:23 +00:00
Support forwarding POST request to compute nodes
This commit is contained in:
@ -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