mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-20 16:20:18 +00:00
Merge branch '2.2' into 3.0
# Conflicts: # gns3server/compute/base_node.py # gns3server/compute/docker/docker_vm.py # gns3server/compute/iou/iou_vm.py # gns3server/controller/template_manager.py # gns3server/handlers/api/compute/docker_handler.py # gns3server/handlers/api/compute/dynamips_vm_handler.py # gns3server/handlers/api/compute/iou_handler.py # gns3server/handlers/api/compute/qemu_handler.py # gns3server/handlers/api/compute/virtualbox_handler.py # gns3server/handlers/api/compute/vmware_handler.py # gns3server/handlers/api/compute/vpcs_handler.py # gns3server/handlers/api/controller/node_handler.py # gns3server/version.py # requirements.txt # tests/controller/test_controller.py # tests/controller/test_project.py # tests/handlers/api/controller/test_node.py
This commit is contained in:
@ -619,6 +619,17 @@ class Node:
|
||||
except asyncio.TimeoutError:
|
||||
raise ControllerTimeoutError(f"Timeout when reset console {self._name}")
|
||||
|
||||
async def reset_console(self):
|
||||
"""
|
||||
Reset the console
|
||||
"""
|
||||
|
||||
if self._console and self._console_type == "telnet":
|
||||
try:
|
||||
await self.post("/console/reset", timeout=240)
|
||||
except asyncio.TimeoutError:
|
||||
raise aiohttp.web.HTTPRequestTimeout(text="Timeout when reset console {}".format(self._name))
|
||||
|
||||
async def post(self, path, data=None, **kwargs):
|
||||
"""
|
||||
HTTP post on the node
|
||||
|
Reference in New Issue
Block a user