mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Drop Python 3.4 and switch to async / await syntax for asyncio. Fixes #1425
This commit is contained in:
1 parent
8baa480b79
commit
76af98404a
119 files changed
+2432
-3084
No files matched your search
@@ -32,8 +32,7 @@ class RemoteGNS3VM(BaseGNS3VM):
|
||||
self._engine = "remote"
|
||||
super().__init__(controller)
|
||||
|
||||
@asyncio.coroutine
|
||||
def list(self):
|
||||
async def list(self):
|
||||
"""
|
||||
List all VMs
|
||||
"""
|
||||
@@ -45,8 +44,7 @@ class RemoteGNS3VM(BaseGNS3VM):
|
||||
res.append({"vmname": compute.name})
|
||||
return res
|
||||
|
||||
@asyncio.coroutine
|
||||
def start(self):
|
||||
async def start(self):
|
||||
"""
|
||||
Starts the GNS3 VM.
|
||||
"""
|
||||
@@ -65,15 +63,13 @@ class RemoteGNS3VM(BaseGNS3VM):
|
||||
return
|
||||
raise GNS3VMError("Can't start the GNS3 VM remote VM {} not found".format(self.vmname))
|
||||
|
||||
@asyncio.coroutine
|
||||
def suspend(self):
|
||||
async def suspend(self):
|
||||
"""
|
||||
Suspend do nothing for remote server
|
||||
"""
|
||||
self.running = False
|
||||
|
||||
@asyncio.coroutine
|
||||
def stop(self):
|
||||
async def stop(self):
|
||||
"""
|
||||
Stops the GNS3 VM.
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user