mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
API for deleting a link
This commit is contained in:
3 files changed
+7
-3
No files matched your search
@@ -114,3 +114,7 @@ class Hypervisor:
|
||||
@asyncio.coroutine
|
||||
def post(self, path, data={}):
|
||||
return (yield from self.httpQuery("POST", path, data))
|
||||
|
||||
@asyncio.coroutine
|
||||
def delete(self, path):
|
||||
return (yield from self.httpQuery("DELETE", path))
|
||||
@@ -60,7 +60,7 @@ class LinkHandler:
|
||||
"link_id": "UUID of the link"
|
||||
},
|
||||
status_codes={
|
||||
201: "Link deleted",
|
||||
204: "Link deleted",
|
||||
400: "Invalid request"
|
||||
},
|
||||
description="Delete a link instance")
|
||||
@@ -70,5 +70,5 @@ class LinkHandler:
|
||||
project = controller.getProject(request.match_info["project_id"])
|
||||
link = project.getLink(request.match_info["link_id"])
|
||||
yield from link.delete()
|
||||
response.set_status(201)
|
||||
response.set_status(204)
|
||||
response.json(link)
|
||||
Reference in new issue
Block a user