mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-14 13:28:12 +00:00
Support to reset all console connections. Ref https://github.com/GNS3/gns3-server/issues/1619
This commit is contained in:
@ -422,3 +422,23 @@ class VMwareHandler:
|
||||
vmware_manager = VMware.instance()
|
||||
vm = vmware_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
||||
return await vm.start_websocket_console(request)
|
||||
|
||||
@Route.post(
|
||||
r"/projects/{project_id}/vmware/nodes/{node_id}/console/reset",
|
||||
description="Reset console",
|
||||
parameters={
|
||||
"project_id": "Project UUID",
|
||||
"node_id": "Node UUID",
|
||||
},
|
||||
status_codes={
|
||||
204: "Console has been reset",
|
||||
400: "Invalid request",
|
||||
404: "Instance doesn't exist",
|
||||
409: "Container not started"
|
||||
})
|
||||
async def reset_console(request, response):
|
||||
|
||||
vmware_manager = VMware.instance()
|
||||
vm = vmware_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
||||
await vm.reset_console()
|
||||
response.set_status(204)
|
||||
|
Reference in New Issue
Block a user