Merge branch '2.2' into async-md5-calcs

This commit is contained in:
ziajka committed 2018-01-29 13:01:45 +01:00
commit 1582ac3195
18 files changed
+60 -39

No files matched your search

+2 -1
View File
@@ -35,6 +35,7 @@ log = logging.getLogger(__name__)
from uuid import UUID, uuid4
from gns3server.utils.interfaces import is_interface_up
from gns3server.utils.asyncio import asyncio_ensure_future
from ..config import Config
from ..utils.asyncio import wait_run_in_executor
from ..utils import force_unix_path
@@ -132,7 +133,7 @@ class BaseManager:
tasks = []
for node_id in self._nodes.keys():
tasks.append(asyncio.ensure_future(self.close_node(node_id)))
tasks.append(asyncio_ensure_future(self.close_node(node_id)))
if tasks:
done, _ = yield from asyncio.wait(tasks)
+2 -2
View File
@@ -28,7 +28,7 @@ import os
from gns3server.utils.asyncio.telnet_server import AsyncioTelnetServer
from gns3server.utils.asyncio.raw_command_server import AsyncioRawCommandServer
from gns3server.utils.asyncio import wait_for_file_creation
from gns3server.utils.asyncio import wait_for_file_creation, asyncio_ensure_future
from gns3server.utils.get_resource import get_resource
from gns3server.ubridge.ubridge_error import UbridgeError, UbridgeNamespaceError
@@ -511,7 +511,7 @@ class DockerVM(BaseNode):
output_stream.feed_data(self.name.encode() + b" console is now available... Press RETURN to get started.\r\n")
asyncio.ensure_future(self._read_console_output(self._console_websocket, output_stream))
asyncio_ensure_future(self._read_console_output(self._console_websocket, output_stream))
@asyncio.coroutine
def _read_console_output(self, ws, out):
+3 -3
View File
@@ -34,7 +34,7 @@ import re
log = logging.getLogger(__name__)
from gns3server.utils.interfaces import interfaces, is_interface_up
from gns3server.utils.asyncio import wait_run_in_executor
from gns3server.utils.asyncio import wait_run_in_executor, asyncio_ensure_future
from gns3server.utils import parse_version
from uuid import uuid4
from ..base_manager import BaseManager
@@ -172,7 +172,7 @@ class Dynamips(BaseManager):
tasks = []
for device in self._devices.values():
tasks.append(asyncio.ensure_future(device.hypervisor.stop()))
tasks.append(asyncio_ensure_future(device.hypervisor.stop()))
if tasks:
done, _ = yield from asyncio.wait(tasks)
@@ -196,7 +196,7 @@ class Dynamips(BaseManager):
tasks = []
for device in self._devices.values():
if device.project.id == project.id:
tasks.append(asyncio.ensure_future(device.delete()))
tasks.append(asyncio_ensure_future(device.delete()))
if tasks:
done, _ = yield from asyncio.wait(tasks)
+2 -2
View File
@@ -40,7 +40,7 @@ from ..nios.nio_udp import NIOUDP
from gns3server.utils.file_watcher import FileWatcher
from gns3server.utils.asyncio import wait_run_in_executor, monitor_process
from gns3server.utils.asyncio import wait_run_in_executor, monitor_process, asyncio_ensure_future
from gns3server.utils.images import md5sum
@@ -194,7 +194,7 @@ class Router(BaseNode):
"""
Called when the NVRAM file has changed
"""
asyncio.ensure_future(self.save_configs())
asyncio_ensure_future(self.save_configs())
@property
def dynamips_id(self):
+2 -2
View File
@@ -28,7 +28,7 @@ from uuid import UUID, uuid4
from .port_manager import PortManager
from .notification_manager import NotificationManager
from ..config import Config
from ..utils.asyncio import wait_run_in_executor
from ..utils.asyncio import wait_run_in_executor, asyncio_ensure_future
from ..utils.path import check_path_allowed, get_default_project_directory
@@ -325,7 +325,7 @@ class Project:
tasks = []
for node in self._nodes:
tasks.append(asyncio.ensure_future(node.manager.close_node(node.id)))
tasks.append(asyncio_ensure_future(node.manager.close_node(node.id)))
if tasks:
done, _ = yield from asyncio.wait(tasks)
+2 -1
View File
@@ -39,6 +39,7 @@ log = logging.getLogger(__name__)
from gns3server.compute.base_manager import BaseManager
from gns3server.compute.vmware.vmware_vm import VMwareVM
from gns3server.compute.vmware.vmware_error import VMwareError
from gns3server.utils.asyncio import asyncio_ensure_future
class VMware(BaseManager):
@@ -738,4 +739,4 @@ if __name__ == '__main__':
loop = asyncio.get_event_loop()
vmware = VMware.instance()
print("=> Check version")
loop.run_until_complete(asyncio.ensure_future(vmware.check_vmware_version()))
loop.run_until_complete(asyncio_ensure_future(vmware.check_vmware_version()))