mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Some wording changes.
This commit is contained in:
parent
5df5a6da18
commit
25a6616cd0
@ -259,11 +259,13 @@ class Router(BaseVM):
|
|||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _termination_callback(self, returncode):
|
def _termination_callback(self, returncode):
|
||||||
"""
|
"""
|
||||||
Called when the process is killed
|
Called when the process has stopped.
|
||||||
|
|
||||||
:param returncode: Process returncode
|
:param returncode: Process returncode
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.status = "stopped"
|
self.status = "stopped"
|
||||||
|
log.info("Dynamips hypervisor process has stopped, return code: %d", returncode)
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
@ -481,11 +481,12 @@ class IOUVM(BaseVM):
|
|||||||
|
|
||||||
def _termination_callback(self, returncode):
|
def _termination_callback(self, returncode):
|
||||||
"""
|
"""
|
||||||
Called when the process is killed
|
Called when the process has stopped.
|
||||||
|
|
||||||
:param returncode: Process returncode
|
:param returncode: Process returncode
|
||||||
"""
|
"""
|
||||||
log.info("IOU process crash return code: %d", returncode)
|
|
||||||
|
log.info("IOU process has stopped, return code: %d", returncode)
|
||||||
self._terminate_process_iou()
|
self._terminate_process_iou()
|
||||||
self._terminate_process_iouyap()
|
self._terminate_process_iouyap()
|
||||||
self._ioucon_thread_stop_event.set()
|
self._ioucon_thread_stop_event.set()
|
||||||
|
@ -65,7 +65,7 @@ class Project:
|
|||||||
self._used_tcp_ports = set()
|
self._used_tcp_ports = set()
|
||||||
self._used_udp_ports = set()
|
self._used_udp_ports = set()
|
||||||
|
|
||||||
# List of clients listen for notifications
|
# clients listening for notifications
|
||||||
self._listeners = set()
|
self._listeners = set()
|
||||||
|
|
||||||
if path is None:
|
if path is None:
|
||||||
@ -437,10 +437,10 @@ class Project:
|
|||||||
|
|
||||||
def emit(self, action, event):
|
def emit(self, action, event):
|
||||||
"""
|
"""
|
||||||
Send an event to all the client listens for notifications
|
Send an event to all the client listening for notifications
|
||||||
|
|
||||||
:param action: Action happened
|
:param action: Action name
|
||||||
:param event: Event sended to the client
|
:param event: Event to send
|
||||||
"""
|
"""
|
||||||
for listener in self._listeners:
|
for listener in self._listeners:
|
||||||
listener.put_nowait((action, event, ))
|
listener.put_nowait((action, event, ))
|
||||||
|
@ -596,12 +596,13 @@ class QemuVM(BaseVM):
|
|||||||
|
|
||||||
def _termination_callback(self, returncode):
|
def _termination_callback(self, returncode):
|
||||||
"""
|
"""
|
||||||
Called when the process is killed
|
Called when the process has stopped.
|
||||||
|
|
||||||
:param returncode: Process returncode
|
:param returncode: Process returncode
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.started:
|
if self.started:
|
||||||
log.info("Process Qemu is dead. Return code: %d", returncode)
|
log.info("QEMU process has stopped, return code: %d", returncode)
|
||||||
self.status = "stopped"
|
self.status = "stopped"
|
||||||
self._process = None
|
self._process = None
|
||||||
|
|
||||||
|
@ -245,12 +245,12 @@ class VPCSVM(BaseVM):
|
|||||||
|
|
||||||
def _termination_callback(self, returncode):
|
def _termination_callback(self, returncode):
|
||||||
"""
|
"""
|
||||||
Called when the process is killed
|
Called when the process has stopped.
|
||||||
|
|
||||||
:param returncode: Process returncode
|
:param returncode: Process returncode
|
||||||
"""
|
"""
|
||||||
if self._started:
|
if self._started:
|
||||||
log.info("Process VPCS is dead. Return code: %d", returncode)
|
log.info("VPCS process has stopped, return code: %d", returncode)
|
||||||
self._started = False
|
self._started = False
|
||||||
self.status = "stopped"
|
self.status = "stopped"
|
||||||
self._process = None
|
self._process = None
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import shutil
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
@ -91,6 +90,6 @@ def _check_process(process, termination_callback):
|
|||||||
|
|
||||||
|
|
||||||
def monitor_process(process, termination_callback):
|
def monitor_process(process, termination_callback):
|
||||||
"""Call termination_callback when process die"""
|
"""Call termination_callback when a process dies"""
|
||||||
|
|
||||||
asyncio.async(_check_process(process, termination_callback))
|
asyncio.async(_check_process(process, termination_callback))
|
||||||
|
Loading…
Reference in New Issue
Block a user