From 35ec8bed6eaa9c514875ad8825ff784737d55816 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 21 Jun 2022 10:48:02 +0200 Subject: [PATCH 01/21] Back to development on v2.2.34dev2 --- gns3server/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/version.py b/gns3server/version.py index f3866e46..2e76e2e4 100644 --- a/gns3server/version.py +++ b/gns3server/version.py @@ -23,8 +23,8 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.33.1" -__version_info__ = (2, 2, 33, 0) +__version__ = "2.2.34dev1" +__version_info__ = (2, 2, 34, 99) if "dev" in __version__: try: From 9e5ca50302014a61229ffdd87089d4b242854ce1 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 23 Jun 2022 10:55:19 +0200 Subject: [PATCH 02/21] Bump version to v2.2.34dev2 --- gns3server/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/version.py b/gns3server/version.py index 2e76e2e4..8324414e 100644 --- a/gns3server/version.py +++ b/gns3server/version.py @@ -23,7 +23,7 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.34dev1" +__version__ = "2.2.34dev2" __version_info__ = (2, 2, 34, 99) if "dev" in __version__: From 7277d526e3afe6519a653635811ba183a46a8b49 Mon Sep 17 00:00:00 2001 From: John Fleming <31658656+spikefishjohn@users.noreply.github.com> Date: Mon, 18 Jul 2022 18:43:57 -0400 Subject: [PATCH 03/21] Update compute.py Remove check for open project. Without this check a remote can be rebooted and will be usable once the main server polls it again. Without this the main server would need to open a project that already uses the remote server or restart the main server's gns3 process. --- gns3server/controller/compute.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index 2ea049a5..bf69b863 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -367,9 +367,6 @@ class Compute: log.warning("Cannot connect to compute '{}': {}".format(self._id, e)) # Try to reconnect after 5 seconds if server unavailable only if not during tests (otherwise we create a ressource usage bomb) if not hasattr(sys, "_called_from_test") or not sys._called_from_test: - if self.id != "local" and self.id != "vm" and not self._controller.compute_has_open_project(self): - log.warning("Not reconnecting to compute '{}' because there is no project opened on it".format(self._id)) - return self._connection_failure += 1 # After 5 failure we close the project using the compute to avoid sync issues if self._connection_failure == 10: From d1c8f33fc59a31b31ec906ea229be2ccbc4cf3a5 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 19:16:02 +0200 Subject: [PATCH 04/21] Upgrade dev dependencies and fix issues after upgrading to pytest-aiohttp v1.0.4 --- dev-requirements.txt | 8 ++++---- gns3server/web/route.py | 2 +- tests/compute/builtin/nodes/test_cloud.py | 11 ++++++----- tests/compute/docker/test_docker.py | 5 +++-- tests/compute/docker/test_docker_vm.py | 4 ++-- tests/compute/dynamips/test_dynamips_manager.py | 5 +++-- tests/compute/dynamips/test_dynamips_router.py | 6 +++--- tests/compute/iou/test_iou_vm.py | 7 ++++--- tests/compute/qemu/test_qcow2.py | 2 +- tests/compute/qemu/test_qemu_vm.py | 5 +++-- tests/compute/test_base_node.py | 6 +++--- tests/compute/test_manager.py | 4 ++-- tests/compute/test_project.py | 2 +- tests/compute/traceng/test_traceng_vm.py | 7 ++++--- tests/compute/virtualbox/test_virtualbox_manager.py | 5 +++-- tests/compute/virtualbox/test_virtualbox_vm.py | 5 +++-- tests/compute/vmware/test_vmware_manager.py | 6 +++--- tests/compute/vmware/test_vmware_vm.py | 4 ++-- tests/compute/vpcs/test_vpcs_vm.py | 7 ++++--- tests/conftest.py | 7 ++++--- tests/controller/gns3vm/test_remote_gns3_vm.py | 2 +- tests/controller/gns3vm/test_virtualbox_gns3_vm.py | 7 +++---- tests/controller/gns3vm/test_vmware_gns3_vm.py | 5 +++-- tests/controller/test_export_project.py | 7 ++++--- tests/controller/test_gns3vm.py | 6 +++--- tests/controller/test_import_project.py | 12 ++++++------ tests/controller/test_link.py | 3 ++- tests/controller/test_notification.py | 4 ++-- tests/controller/test_project.py | 3 ++- tests/handlers/api/compute/test_docker.py | 3 ++- tests/handlers/api/compute/test_iou.py | 3 ++- tests/handlers/api/compute/test_qemu.py | 3 ++- tests/handlers/api/compute/test_vpcs.py | 4 ++-- tests/handlers/api/controller/test_link.py | 4 ++-- tests/handlers/api/controller/test_project.py | 3 ++- tests/handlers/api/controller/test_snapshot.py | 6 +++--- tests/pytest.ini | 2 ++ tests/test_config.py | 8 ++++---- tests/utils/test_asyncio.py | 2 +- tests/web/test_response.py | 2 +- 40 files changed, 108 insertions(+), 89 deletions(-) create mode 100644 tests/pytest.ini diff --git a/dev-requirements.txt b/dev-requirements.txt index eba5db79..6502bfec 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ -rrequirements.txt -pytest==7.0.0 -flake8==4.0.1 -pytest-timeout==1.4.2 -pytest-aiohttp==0.3.0 +pytest==7.1.2 +flake8==5.0.4 +pytest-timeout==2.1.0 +pytest-aiohttp==1.0.4 diff --git a/gns3server/web/route.py b/gns3server/web/route.py index d1275250..e788a32c 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -147,7 +147,7 @@ class Route(object): else: route = path - # Compute metadata for the documentation + # Compute metadata for the documentation if api_version: handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.api.", "") cls._documentation.setdefault(handler, {}) diff --git a/tests/compute/builtin/nodes/test_cloud.py b/tests/compute/builtin/nodes/test_cloud.py index 3e5e5113..7cafef31 100644 --- a/tests/compute/builtin/nodes/test_cloud.py +++ b/tests/compute/builtin/nodes/test_cloud.py @@ -17,6 +17,7 @@ import uuid import pytest +import pytest_asyncio from unittest.mock import MagicMock, patch, call from gns3server.compute.builtin.nodes.cloud import Cloud @@ -30,8 +31,8 @@ def nio(): return NIOUDP(4242, "127.0.0.1", 4343) -@pytest.fixture -async def manager(loop): +@pytest_asyncio.fixture +async def manager(): m = MagicMock() m.module_name = "builtins" @@ -113,7 +114,7 @@ def test_json_without_ports(on_gns3vm, compute_project, manager): } -async def test_update_port_mappings(loop, on_gns3vm, compute_project): +async def test_update_port_mappings(on_gns3vm, compute_project): """ We don't allow an empty interface in the middle of port list """ @@ -153,7 +154,7 @@ async def test_update_port_mappings(loop, on_gns3vm, compute_project): assert cloud.ports_mapping == ports1 -async def test_linux_ethernet_raw_add_nio(loop, linux_platform, compute_project, nio): +async def test_linux_ethernet_raw_add_nio(linux_platform, compute_project, nio): ports = [ { "interface": "eth0", @@ -180,7 +181,7 @@ async def test_linux_ethernet_raw_add_nio(loop, linux_platform, compute_project, ]) -async def test_linux_ethernet_raw_add_nio_bridge(loop, linux_platform, compute_project, nio): +async def test_linux_ethernet_raw_add_nio_bridge(linux_platform, compute_project, nio): """ Bridge can't be connected directly to a cloud we use a tap in the middle """ diff --git a/tests/compute/docker/test_docker.py b/tests/compute/docker/test_docker.py index 2e9193ad..94a2d941 100644 --- a/tests/compute/docker/test_docker.py +++ b/tests/compute/docker/test_docker.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio from unittest.mock import MagicMock, patch from tests.utils import asyncio_patch, AsyncioMagicMock @@ -23,8 +24,8 @@ from gns3server.compute.docker import Docker, DOCKER_PREFERRED_API_VERSION, DOCK from gns3server.compute.docker.docker_error import DockerError, DockerHttp404Error -@pytest.fixture -async def vm(loop): +@pytest_asyncio.fixture +async def vm(): vm = Docker() vm._connected = True diff --git a/tests/compute/docker/test_docker_vm.py b/tests/compute/docker/test_docker_vm.py index 1effa9b0..15073cc6 100644 --- a/tests/compute/docker/test_docker_vm.py +++ b/tests/compute/docker/test_docker_vm.py @@ -34,7 +34,7 @@ from unittest.mock import patch, MagicMock, call @pytest.fixture() -async def manager(loop, port_manager): +async def manager(port_manager): m = Docker.instance() m.port_manager = port_manager @@ -42,7 +42,7 @@ async def manager(loop, port_manager): @pytest.fixture(scope="function") -async def vm(loop, compute_project, manager): +async def vm(compute_project, manager): vm = DockerVM("test", str(uuid.uuid4()), compute_project, manager, "ubuntu:latest") vm._cid = "e90e34656842" diff --git a/tests/compute/dynamips/test_dynamips_manager.py b/tests/compute/dynamips/test_dynamips_manager.py index aee2c326..e1b8585f 100644 --- a/tests/compute/dynamips/test_dynamips_manager.py +++ b/tests/compute/dynamips/test_dynamips_manager.py @@ -17,6 +17,7 @@ import pytest +import pytest_asyncio import tempfile import sys import uuid @@ -28,8 +29,8 @@ from unittest.mock import patch from tests.utils import asyncio_patch, AsyncioMagicMock -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = Dynamips.instance() m.port_manager = port_manager diff --git a/tests/compute/dynamips/test_dynamips_router.py b/tests/compute/dynamips/test_dynamips_router.py index 3ab250a1..6aa5f33a 100644 --- a/tests/compute/dynamips/test_dynamips_router.py +++ b/tests/compute/dynamips/test_dynamips_router.py @@ -18,7 +18,7 @@ import os import uuid import pytest -import asyncio +import pytest_asyncio from gns3server.compute.dynamips.nodes.router import Router from gns3server.compute.dynamips.dynamips_error import DynamipsError @@ -26,8 +26,8 @@ from gns3server.compute.dynamips import Dynamips from gns3server.config import Config -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = Dynamips.instance() m.port_manager = port_manager diff --git a/tests/compute/iou/test_iou_vm.py b/tests/compute/iou/test_iou_vm.py index 93fbb78d..d5fe9912 100644 --- a/tests/compute/iou/test_iou_vm.py +++ b/tests/compute/iou/test_iou_vm.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import asyncio import os import stat @@ -36,8 +37,8 @@ if not sys.platform.startswith("win"): from gns3server.compute.iou import IOU -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = IOU.instance() m.port_manager = port_manager @@ -45,7 +46,7 @@ async def manager(loop, port_manager): @pytest.fixture(scope="function") -async def vm(loop, compute_project, manager, tmpdir, fake_iou_bin, iourc_file): +async def vm(compute_project, manager, tmpdir, fake_iou_bin, iourc_file): vm = IOUVM("test", str(uuid.uuid4()), compute_project, manager, application_id=1) config = manager.config.get_section_config("IOU") diff --git a/tests/compute/qemu/test_qcow2.py b/tests/compute/qemu/test_qcow2.py index d185135b..b14e631e 100644 --- a/tests/compute/qemu/test_qcow2.py +++ b/tests/compute/qemu/test_qcow2.py @@ -66,7 +66,7 @@ def test_invalid_empty_file(tmpdir): @pytest.mark.skipif(qemu_img() is None, reason="qemu-img is not available") -async def test_rebase(loop, tmpdir): +async def test_rebase(tmpdir): shutil.copy("tests/resources/empty8G.qcow2", str(tmpdir / "empty16G.qcow2")) shutil.copy("tests/resources/linked.qcow2", str(tmpdir / "linked.qcow2")) diff --git a/tests/compute/qemu/test_qemu_vm.py b/tests/compute/qemu/test_qemu_vm.py index 6b87a86b..bd7fa873 100644 --- a/tests/compute/qemu/test_qemu_vm.py +++ b/tests/compute/qemu/test_qemu_vm.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import asyncio import os import sys @@ -33,8 +34,8 @@ from gns3server.utils import force_unix_path, macaddress_to_int, int_to_macaddre from gns3server.compute.notification_manager import NotificationManager -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = Qemu.instance() m.port_manager = port_manager diff --git a/tests/compute/test_base_node.py b/tests/compute/test_base_node.py index 9052a818..dab1a17c 100644 --- a/tests/compute/test_base_node.py +++ b/tests/compute/test_base_node.py @@ -18,7 +18,7 @@ from collections import OrderedDict import pytest -import asyncio +import pytest_asyncio from tests.utils import asyncio_patch, AsyncioMagicMock @@ -29,8 +29,8 @@ from gns3server.compute.vpcs import VPCS from gns3server.compute.nios.nio_udp import NIOUDP -@pytest.fixture(scope="function") -async def manager(loop, port_manager): +@pytest_asyncio.fixture(scope="function") +async def manager(port_manager): m = VPCS.instance() m.port_manager = port_manager diff --git a/tests/compute/test_manager.py b/tests/compute/test_manager.py index eef0d1d2..556072db 100644 --- a/tests/compute/test_manager.py +++ b/tests/compute/test_manager.py @@ -29,7 +29,7 @@ from gns3server.utils import force_unix_path @pytest.fixture(scope="function") -async def vpcs(loop, port_manager): +async def vpcs(port_manager): VPCS._instance = None vpcs = VPCS.instance() @@ -38,7 +38,7 @@ async def vpcs(loop, port_manager): @pytest.fixture(scope="function") -async def qemu(loop, port_manager): +async def qemu(port_manager): Qemu._instance = None Qemu._init_config_disk = MagicMock() # do not create the config.img image diff --git a/tests/compute/test_project.py b/tests/compute/test_project.py index 6ae23717..11870b62 100644 --- a/tests/compute/test_project.py +++ b/tests/compute/test_project.py @@ -33,7 +33,7 @@ from gns3server.config import Config @pytest.fixture(scope="function") -async def manager(loop, port_manager): +async def manager(port_manager): m = VPCS.instance() m.port_manager = port_manager diff --git a/tests/compute/traceng/test_traceng_vm.py b/tests/compute/traceng/test_traceng_vm.py index e4d381dd..84604976 100644 --- a/tests/compute/traceng/test_traceng_vm.py +++ b/tests/compute/traceng/test_traceng_vm.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import asyncio from tests.utils import asyncio_patch, AsyncioMagicMock @@ -27,15 +28,15 @@ from gns3server.compute.traceng import TraceNG from gns3server.compute.notification_manager import NotificationManager -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = TraceNG.instance() m.port_manager = port_manager return m -@pytest.fixture(scope="function") +@pytest_asyncio.fixture(scope="function") async def vm(compute_project, manager, ubridge_path): vm = TraceNGVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager) diff --git a/tests/compute/virtualbox/test_virtualbox_manager.py b/tests/compute/virtualbox/test_virtualbox_manager.py index 3ba1d9eb..4cc00971 100644 --- a/tests/compute/virtualbox/test_virtualbox_manager.py +++ b/tests/compute/virtualbox/test_virtualbox_manager.py @@ -17,6 +17,7 @@ import pytest +import pytest_asyncio import tempfile import os import stat @@ -28,8 +29,8 @@ from gns3server.compute.virtualbox.virtualbox_error import VirtualBoxError from tests.utils import asyncio_patch -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = VirtualBox.instance() m.port_manager = port_manager diff --git a/tests/compute/virtualbox/test_virtualbox_vm.py b/tests/compute/virtualbox/test_virtualbox_vm.py index 12d59656..03ebd223 100644 --- a/tests/compute/virtualbox/test_virtualbox_vm.py +++ b/tests/compute/virtualbox/test_virtualbox_vm.py @@ -17,6 +17,7 @@ import os import pytest +import pytest_asyncio from tests.utils import asyncio_patch, AsyncioMagicMock from gns3server.compute.virtualbox.virtualbox_vm import VirtualBoxVM @@ -24,8 +25,8 @@ from gns3server.compute.virtualbox.virtualbox_error import VirtualBoxError from gns3server.compute.virtualbox import VirtualBox -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = VirtualBox.instance() m.port_manager = port_manager diff --git a/tests/compute/vmware/test_vmware_manager.py b/tests/compute/vmware/test_vmware_manager.py index a26dbed1..7f2c2e0b 100644 --- a/tests/compute/vmware/test_vmware_manager.py +++ b/tests/compute/vmware/test_vmware_manager.py @@ -16,13 +16,13 @@ # along with this program. If not, see . -import pytest +import pytest_asyncio from gns3server.compute.vmware import VMware -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = VMware.instance() m.port_manager = port_manager diff --git a/tests/compute/vmware/test_vmware_vm.py b/tests/compute/vmware/test_vmware_vm.py index 22bf1d46..bcfbefaa 100644 --- a/tests/compute/vmware/test_vmware_vm.py +++ b/tests/compute/vmware/test_vmware_vm.py @@ -16,14 +16,14 @@ # along with this program. If not, see . import pytest -import asyncio +import pytest_asyncio from gns3server.compute.vmware.vmware_vm import VMwareVM from gns3server.compute.vmware import VMware @pytest.fixture -async def manager(loop, port_manager): +async def manager(port_manager): m = VMware.instance() m.port_manager = port_manager diff --git a/tests/compute/vpcs/test_vpcs_vm.py b/tests/compute/vpcs/test_vpcs_vm.py index 618cabea..eda0c299 100644 --- a/tests/compute/vpcs/test_vpcs_vm.py +++ b/tests/compute/vpcs/test_vpcs_vm.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import asyncio import os import sys @@ -30,8 +31,8 @@ from gns3server.compute.vpcs import VPCS from gns3server.compute.notification_manager import NotificationManager -@pytest.fixture -async def manager(loop, port_manager): +@pytest_asyncio.fixture +async def manager(port_manager): m = VPCS.instance() m.port_manager = port_manager @@ -39,7 +40,7 @@ async def manager(loop, port_manager): @pytest.fixture(scope="function") -async def vm(loop, compute_project, manager, tmpdir, ubridge_path): +async def vm(compute_project, manager, tmpdir, ubridge_path): vm = VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager) vm._vpcs_version = parse_version("0.9") diff --git a/tests/conftest.py b/tests/conftest.py index 7311b7e6..b04309d2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ import pytest +import pytest_asyncio import asyncio import tempfile import shutil @@ -34,7 +35,7 @@ if sys.platform.startswith("win"): asyncio.set_event_loop(None) -@pytest.fixture(scope='function') +@pytest_asyncio.fixture(scope='function') async def http_client(aiohttp_client): app = web.Application() @@ -71,8 +72,8 @@ def compute(controller): return compute -@pytest.fixture -async def project(loop, tmpdir, controller): +@pytest_asyncio.fixture +async def project(tmpdir, controller): return await controller.add_project(name="Test") diff --git a/tests/controller/gns3vm/test_remote_gns3_vm.py b/tests/controller/gns3vm/test_remote_gns3_vm.py index 1d1fc62f..09994b86 100644 --- a/tests/controller/gns3vm/test_remote_gns3_vm.py +++ b/tests/controller/gns3vm/test_remote_gns3_vm.py @@ -55,7 +55,7 @@ async def test_start(gns3vm, controller): assert gns3vm.password == "world" -async def test_start_invalid_vm(loop, gns3vm, controller): +async def test_start_invalid_vm(gns3vm, controller): await controller.add_compute("r1", name="R1", diff --git a/tests/controller/gns3vm/test_virtualbox_gns3_vm.py b/tests/controller/gns3vm/test_virtualbox_gns3_vm.py index eb90dce0..ff899c5b 100644 --- a/tests/controller/gns3vm/test_virtualbox_gns3_vm.py +++ b/tests/controller/gns3vm/test_virtualbox_gns3_vm.py @@ -15,8 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest -import asyncio +import pytest_asyncio from tests.utils import asyncio_patch, AsyncioMagicMock from gns3server.utils.asyncio import wait_run_in_executor @@ -25,8 +24,8 @@ from unittest.mock import patch from gns3server.controller.gns3vm.virtualbox_gns3_vm import VirtualBoxGNS3VM -@pytest.fixture -async def gns3vm(loop, controller): +@pytest_asyncio.fixture +async def gns3vm(controller): vm = VirtualBoxGNS3VM(controller) vm.vmname = "GNS3 VM" diff --git a/tests/controller/gns3vm/test_vmware_gns3_vm.py b/tests/controller/gns3vm/test_vmware_gns3_vm.py index cb0d54ad..bf48f199 100644 --- a/tests/controller/gns3vm/test_vmware_gns3_vm.py +++ b/tests/controller/gns3vm/test_vmware_gns3_vm.py @@ -16,12 +16,13 @@ # along with this program. If not, see . import pytest +import pytest_asyncio from gns3server.controller.gns3vm.vmware_gns3_vm import VMwareGNS3VM -@pytest.fixture -async def gns3vm(loop, controller): +@pytest_asyncio.fixture +async def gns3vm(controller): vm = VMwareGNS3VM(controller) vm.vmname = "GNS3 VM" diff --git a/tests/controller/test_export_project.py b/tests/controller/test_export_project.py index 973ed36e..02877bda 100644 --- a/tests/controller/test_export_project.py +++ b/tests/controller/test_export_project.py @@ -19,6 +19,7 @@ import os import json import pytest +import pytest_asyncio import aiohttp import zipfile @@ -32,15 +33,15 @@ from gns3server.controller.export_project import export_project, _is_exportable from gns3server.utils.asyncio import aiozipstream -@pytest.fixture -async def project(loop, controller): +@pytest_asyncio.fixture +async def project(controller): p = Project(controller=controller, name="test") p.dump = MagicMock() return p -@pytest.fixture +@pytest_asyncio.fixture async def node(controller, project): compute = MagicMock() diff --git a/tests/controller/test_gns3vm.py b/tests/controller/test_gns3vm.py index 8d01fae9..0058ed4c 100644 --- a/tests/controller/test_gns3vm.py +++ b/tests/controller/test_gns3vm.py @@ -47,7 +47,7 @@ def dummy_gns3vm(controller, dummy_engine): return vm -async def test_list(loop, controller): +async def test_list(controller): vm = GNS3VM(controller) with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.list", return_value=[{"vmname": "test", "vmx_path": "test"}]): @@ -60,14 +60,14 @@ async def test_list(loop, controller): await vm.list("hyperv") -async def test_json(loop, controller): +async def test_json(controller): vm = GNS3VM(controller) assert vm.__json__() == vm._settings @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows") -async def test_update_settings(loop, controller): +async def test_update_settings(controller): vm = GNS3VM(controller) vm.settings = { diff --git a/tests/controller/test_import_project.py b/tests/controller/test_import_project.py index 1ef9a2d5..e80da797 100644 --- a/tests/controller/test_import_project.py +++ b/tests/controller/test_import_project.py @@ -166,7 +166,7 @@ async def test_import_with_images(tmpdir, controller): assert os.path.exists(path), path -async def test_import_iou_linux_no_vm(loop, linux_platform, tmpdir, controller): +async def test_import_iou_linux_no_vm(linux_platform, tmpdir, controller): """ On non linux host IOU should be local if we don't have a GNS3 VM """ @@ -210,7 +210,7 @@ async def test_import_iou_linux_no_vm(loop, linux_platform, tmpdir, controller): assert topo["topology"]["nodes"][0]["compute_id"] == "local" -async def test_import_iou_linux_with_vm(loop, linux_platform, tmpdir, controller): +async def test_import_iou_linux_with_vm(linux_platform, tmpdir, controller): """ On non linux host IOU should be vm if we have a GNS3 VM configured """ @@ -255,7 +255,7 @@ async def test_import_iou_linux_with_vm(loop, linux_platform, tmpdir, controller assert topo["topology"]["nodes"][0]["compute_id"] == "vm" -async def test_import_nat_non_linux(loop, windows_platform, tmpdir, controller): +async def test_import_nat_non_linux(windows_platform, tmpdir, controller): """ On non linux host NAT should be moved to the GNS3 VM """ @@ -300,7 +300,7 @@ async def test_import_nat_non_linux(loop, windows_platform, tmpdir, controller): assert topo["topology"]["nodes"][0]["compute_id"] == "vm" -async def test_import_iou_non_linux(loop, windows_platform, tmpdir, controller): +async def test_import_iou_non_linux(windows_platform, tmpdir, controller): """ On non linux host IOU should be moved to the GNS3 VM """ @@ -356,7 +356,7 @@ async def test_import_iou_non_linux(loop, windows_platform, tmpdir, controller): mock.assert_called_with(controller._computes["vm"], project_id, project.path, os.path.join('project-files', 'iou', topo["topology"]["nodes"][0]['node_id'])) -async def test_import_node_id(loop, linux_platform, tmpdir, controller): +async def test_import_node_id(linux_platform, tmpdir, controller): """ When importing a node, node_id should change """ @@ -449,7 +449,7 @@ async def test_import_node_id(loop, linux_platform, tmpdir, controller): assert os.path.exists(os.path.join(project.path, "project-files", "iou", topo["topology"]["nodes"][0]["node_id"], "startup.cfg")) -async def test_import_keep_compute_id(loop, windows_platform, tmpdir, controller): +async def test_import_keep_compute_id(windows_platform, tmpdir, controller): """ On linux host IOU should be moved to the GNS3 VM """ diff --git a/tests/controller/test_link.py b/tests/controller/test_link.py index 702dbdc2..25a82404 100644 --- a/tests/controller/test_link.py +++ b/tests/controller/test_link.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import aiohttp from unittest.mock import MagicMock @@ -26,7 +27,7 @@ from gns3server.controller.ports.serial_port import SerialPort from tests.utils import AsyncioBytesIO, AsyncioMagicMock -@pytest.fixture +@pytest_asyncio.fixture async def link(project, compute): node1 = Node(project, compute, "node1", node_type="qemu") diff --git a/tests/controller/test_notification.py b/tests/controller/test_notification.py index d0cc4e3d..ab2c0f39 100644 --- a/tests/controller/test_notification.py +++ b/tests/controller/test_notification.py @@ -15,13 +15,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest +import pytest_asyncio from unittest.mock import MagicMock from tests.utils import AsyncioMagicMock -@pytest.fixture +@pytest_asyncio.fixture async def node(project): compute = MagicMock() diff --git a/tests/controller/test_project.py b/tests/controller/test_project.py index bc729fee..48c8a758 100644 --- a/tests/controller/test_project.py +++ b/tests/controller/test_project.py @@ -20,6 +20,7 @@ import os import sys import uuid import pytest +import pytest_asyncio import aiohttp from unittest.mock import MagicMock from tests.utils import AsyncioMagicMock, asyncio_patch @@ -33,7 +34,7 @@ from gns3server.controller.ports.ethernet_port import EthernetPort from gns3server.config import Config -@pytest.fixture +@pytest_asyncio.fixture async def node(controller, project): compute = MagicMock() diff --git a/tests/handlers/api/compute/test_docker.py b/tests/handlers/api/compute/test_docker.py index 217fb3b0..878c99c0 100644 --- a/tests/handlers/api/compute/test_docker.py +++ b/tests/handlers/api/compute/test_docker.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import sys import uuid @@ -52,7 +53,7 @@ def base_params(): # Docker._instance = None -@pytest.fixture +@pytest_asyncio.fixture async def vm(compute_api, compute_project, base_params): with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "nginx"}]): diff --git a/tests/handlers/api/compute/test_iou.py b/tests/handlers/api/compute/test_iou.py index aadb4fa0..f54c926b 100644 --- a/tests/handlers/api/compute/test_iou.py +++ b/tests/handlers/api/compute/test_iou.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import os import stat import sys @@ -45,7 +46,7 @@ def base_params(tmpdir, fake_iou_bin): return {"application_id": 42, "name": "PC TEST 1", "path": "iou.bin"} -@pytest.fixture +@pytest_asyncio.fixture async def vm(compute_api, compute_project, base_params): response = await compute_api.post("/projects/{project_id}/iou/nodes".format(project_id=compute_project.id), base_params) diff --git a/tests/handlers/api/compute/test_qemu.py b/tests/handlers/api/compute/test_qemu.py index 00245f25..7575a0b4 100644 --- a/tests/handlers/api/compute/test_qemu.py +++ b/tests/handlers/api/compute/test_qemu.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import pytest +import pytest_asyncio import uuid import os import sys @@ -57,7 +58,7 @@ def base_params(tmpdir, fake_qemu_bin): return {"name": "PC TEST 1", "qemu_path": fake_qemu_bin} -@pytest.fixture +@pytest_asyncio.fixture async def vm(compute_api, compute_project, base_params): response = await compute_api.post("/projects/{project_id}/qemu/nodes".format(project_id=compute_project.id), base_params) diff --git a/tests/handlers/api/compute/test_vpcs.py b/tests/handlers/api/compute/test_vpcs.py index f75aba85..70ee8294 100644 --- a/tests/handlers/api/compute/test_vpcs.py +++ b/tests/handlers/api/compute/test_vpcs.py @@ -15,13 +15,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest +import pytest_asyncio import uuid from tests.utils import asyncio_patch from unittest.mock import patch -@pytest.fixture +@pytest_asyncio.fixture async def vm(compute_api, compute_project): params = {"name": "PC TEST 1"} diff --git a/tests/handlers/api/controller/test_link.py b/tests/handlers/api/controller/test_link.py index be87b74b..67c77a47 100644 --- a/tests/handlers/api/controller/test_link.py +++ b/tests/handlers/api/controller/test_link.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest +import pytest_asyncio from unittest.mock import patch, MagicMock from tests.utils import asyncio_patch, AsyncioMagicMock @@ -24,7 +24,7 @@ from gns3server.controller.ports.ethernet_port import EthernetPort from gns3server.controller.link import Link, FILTERS -@pytest.fixture +@pytest_asyncio.fixture async def nodes(compute, project): response = MagicMock() diff --git a/tests/handlers/api/controller/test_project.py b/tests/handlers/api/controller/test_project.py index ed8aeb22..035c96b4 100644 --- a/tests/handlers/api/controller/test_project.py +++ b/tests/handlers/api/controller/test_project.py @@ -18,6 +18,7 @@ import uuid import os import pytest +import pytest_asyncio import zipfile import json @@ -25,7 +26,7 @@ from unittest.mock import patch, MagicMock from tests.utils import asyncio_patch -@pytest.fixture +@pytest_asyncio.fixture async def project(controller_api, controller): u = str(uuid.uuid4()) diff --git a/tests/handlers/api/controller/test_snapshot.py b/tests/handlers/api/controller/test_snapshot.py index faed67df..034470c8 100644 --- a/tests/handlers/api/controller/test_snapshot.py +++ b/tests/handlers/api/controller/test_snapshot.py @@ -17,10 +17,10 @@ import os import uuid -import pytest +import pytest_asyncio -@pytest.fixture +@pytest_asyncio.fixture async def project(controller_api, controller): u = str(uuid.uuid4()) @@ -30,7 +30,7 @@ async def project(controller_api, controller): return project -@pytest.fixture +@pytest_asyncio.fixture async def snapshot(project): snapshot = await project.snapshot("test") diff --git a/tests/pytest.ini b/tests/pytest.ini new file mode 100644 index 00000000..2f4c80e3 --- /dev/null +++ b/tests/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +asyncio_mode = auto diff --git a/tests/test_config.py b/tests/test_config.py index f670ad54..cdaa346e 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -53,7 +53,7 @@ def write_config(tmpdir, settings): return path -def test_get_section_config(loop, tmpdir): +def test_get_section_config(tmpdir): config = load_config(tmpdir, { "Server": { @@ -63,7 +63,7 @@ def test_get_section_config(loop, tmpdir): assert dict(config.get_section_config("Server")) == {"host": "127.0.0.1"} -def test_set_section_config(loop, tmpdir): +def test_set_section_config(tmpdir): config = load_config(tmpdir, { "Server": { @@ -77,7 +77,7 @@ def test_set_section_config(loop, tmpdir): assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1", "local": "true"} -def test_set(loop, tmpdir): +def test_set(tmpdir): config = load_config(tmpdir, { "Server": { @@ -90,7 +90,7 @@ def test_set(loop, tmpdir): assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1"} -def test_reload(loop, tmpdir): +def test_reload(tmpdir): config = load_config(tmpdir, { "Server": { diff --git a/tests/utils/test_asyncio.py b/tests/utils/test_asyncio.py index 9e66c124..f9f45feb 100644 --- a/tests/utils/test_asyncio.py +++ b/tests/utils/test_asyncio.py @@ -44,7 +44,7 @@ async def test_exception_wait_run_in_executor(): @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows") -async def test_subprocess_check_output(loop, tmpdir): +async def test_subprocess_check_output(tmpdir): path = str(tmpdir / "test") result = await subprocess_check_output("echo", "-n", path) diff --git a/tests/web/test_response.py b/tests/web/test_response.py index 837f8163..3c29abcb 100644 --- a/tests/web/test_response.py +++ b/tests/web/test_response.py @@ -39,7 +39,7 @@ def response(): # assert response.status == 200 -async def test_response_file_not_found(loop, tmpdir, response): +async def test_response_file_not_found(tmpdir, response): filename = str(tmpdir / 'hello-not-found') with pytest.raises(HTTPNotFound): From fad3df453dfebf2ce462aa6c666ce516028bd557 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 19:31:24 +0200 Subject: [PATCH 05/21] Run tests on 2.2 branch --- .github/workflows/testing.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 41699422..36039595 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -2,9 +2,13 @@ name: testing on: push: - branches: [ master ] + branches: + - master + - 2.2 pull_request: - branches: [ master ] + branches: + - master + - 2.2 jobs: build: From 4b3d6572d4049b207d29a1778525b28711befa60 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 19:35:36 +0200 Subject: [PATCH 06/21] Downgrade to pytest v7.0.1 (last version to support --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 6502bfec..a663c848 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ -rrequirements.txt -pytest==7.1.2 +pytest==7.0.1 # last version to support Python 3.6 flake8==5.0.4 pytest-timeout==2.1.0 pytest-aiohttp==1.0.4 From e8273fb19e632ace44abe0e428b4e2bfc94b0473 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 19:39:02 +0200 Subject: [PATCH 07/21] Downgrade to pytest-aiohttp v0.3.0 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index a663c848..34e7c703 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,4 +3,4 @@ pytest==7.0.1 # last version to support Python 3.6 flake8==5.0.4 pytest-timeout==2.1.0 -pytest-aiohttp==1.0.4 +pytest-aiohttp==0.3.0 # last version to support Python 3.6 From 470e6cb901917d8fcd4272b0ce077dfb0de0caa1 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 19:41:46 +0200 Subject: [PATCH 08/21] Add pytest-asyncio 0.19.0 --- dev-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-requirements.txt b/dev-requirements.txt index 34e7c703..161a1adb 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,4 +3,5 @@ pytest==7.0.1 # last version to support Python 3.6 flake8==5.0.4 pytest-timeout==2.1.0 +pytest-asyncio==0.19.0 pytest-aiohttp==0.3.0 # last version to support Python 3.6 From 852de03d43476a30f29cff24b3e317d0a6f06718 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 20:40:35 +0200 Subject: [PATCH 09/21] Install latest dev dependencies for Python >= 3.7 --- dev-requirements.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 161a1adb..b926d113 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,10 @@ -rrequirements.txt -pytest==7.0.1 # last version to support Python 3.6 +pytest==7.0.1; python_version < '3.7' # last version to support Python 3.6 +pytest==7.1.2; python_version >= '3.7' flake8==5.0.4 pytest-timeout==2.1.0 -pytest-asyncio==0.19.0 -pytest-aiohttp==0.3.0 # last version to support Python 3.6 +pytest-asyncio==0.16.0; python_version < '3.7' # last version to support Python 3.6 +pytest-asyncio==0.19.0; python_version >= '3.7' +pytest-aiohttp==0.3.0; python_version < '3.7' # last version to support Python 3.6 +pytest-aiohttp==1.0.4; python_version >= '3.7' From 600c18f04b80b95a136a7f5a059e8be692dcad4b Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 21:00:31 +0200 Subject: [PATCH 10/21] Remove pytest.ini from tests dir --- pytest.ini | 1 + tests/pytest.ini | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 tests/pytest.ini diff --git a/pytest.ini b/pytest.ini index c1ea2797..a37fdb73 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,4 @@ [pytest] +asyncio_mode=auto log_level=NOTSET ignore=env \ No newline at end of file diff --git a/tests/pytest.ini b/tests/pytest.ini deleted file mode 100644 index 2f4c80e3..00000000 --- a/tests/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -asyncio_mode = auto From fc7d5be7366e8ac5d3abbe67f1987af8c0905859 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 21:10:17 +0200 Subject: [PATCH 11/21] Use pytest-asyncio auto mode --- dev-requirements.txt | 2 -- tests/compute/builtin/nodes/test_cloud.py | 3 +-- tests/compute/docker/test_docker.py | 3 +-- tests/compute/dynamips/test_dynamips_manager.py | 3 +-- tests/compute/dynamips/test_dynamips_router.py | 3 +-- tests/compute/iou/test_iou_vm.py | 3 +-- tests/compute/qemu/test_qemu_vm.py | 3 +-- tests/compute/test_base_node.py | 3 +-- tests/compute/traceng/test_traceng_vm.py | 5 ++--- tests/compute/virtualbox/test_virtualbox_manager.py | 3 +-- tests/compute/virtualbox/test_virtualbox_vm.py | 3 +-- tests/compute/vmware/test_vmware_manager.py | 5 ++--- tests/compute/vmware/test_vmware_vm.py | 1 - tests/compute/vpcs/test_vpcs_vm.py | 3 +-- tests/conftest.py | 5 ++--- tests/controller/gns3vm/test_virtualbox_gns3_vm.py | 4 ++-- tests/controller/gns3vm/test_vmware_gns3_vm.py | 3 +-- tests/controller/test_export_project.py | 5 ++--- tests/controller/test_link.py | 3 +-- tests/controller/test_notification.py | 4 ++-- tests/controller/test_project.py | 3 +-- tests/handlers/api/compute/test_docker.py | 3 +-- tests/handlers/api/compute/test_iou.py | 3 +-- tests/handlers/api/compute/test_qemu.py | 3 +-- tests/handlers/api/compute/test_vpcs.py | 4 ++-- tests/handlers/api/controller/test_link.py | 4 ++-- tests/handlers/api/controller/test_project.py | 3 +-- tests/handlers/api/controller/test_snapshot.py | 6 +++--- 28 files changed, 36 insertions(+), 60 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index b926d113..86cc066f 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,7 +4,5 @@ pytest==7.0.1; python_version < '3.7' # last version to support Python 3.6 pytest==7.1.2; python_version >= '3.7' flake8==5.0.4 pytest-timeout==2.1.0 -pytest-asyncio==0.16.0; python_version < '3.7' # last version to support Python 3.6 -pytest-asyncio==0.19.0; python_version >= '3.7' pytest-aiohttp==0.3.0; python_version < '3.7' # last version to support Python 3.6 pytest-aiohttp==1.0.4; python_version >= '3.7' diff --git a/tests/compute/builtin/nodes/test_cloud.py b/tests/compute/builtin/nodes/test_cloud.py index 7cafef31..09506b45 100644 --- a/tests/compute/builtin/nodes/test_cloud.py +++ b/tests/compute/builtin/nodes/test_cloud.py @@ -17,7 +17,6 @@ import uuid import pytest -import pytest_asyncio from unittest.mock import MagicMock, patch, call from gns3server.compute.builtin.nodes.cloud import Cloud @@ -31,7 +30,7 @@ def nio(): return NIOUDP(4242, "127.0.0.1", 4343) -@pytest_asyncio.fixture +@pytest.fixture async def manager(): m = MagicMock() diff --git a/tests/compute/docker/test_docker.py b/tests/compute/docker/test_docker.py index 94a2d941..60e2d73e 100644 --- a/tests/compute/docker/test_docker.py +++ b/tests/compute/docker/test_docker.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio from unittest.mock import MagicMock, patch from tests.utils import asyncio_patch, AsyncioMagicMock @@ -24,7 +23,7 @@ from gns3server.compute.docker import Docker, DOCKER_PREFERRED_API_VERSION, DOCK from gns3server.compute.docker.docker_error import DockerError, DockerHttp404Error -@pytest_asyncio.fixture +@pytest.fixture async def vm(): vm = Docker() diff --git a/tests/compute/dynamips/test_dynamips_manager.py b/tests/compute/dynamips/test_dynamips_manager.py index e1b8585f..11bbdfc0 100644 --- a/tests/compute/dynamips/test_dynamips_manager.py +++ b/tests/compute/dynamips/test_dynamips_manager.py @@ -17,7 +17,6 @@ import pytest -import pytest_asyncio import tempfile import sys import uuid @@ -29,7 +28,7 @@ from unittest.mock import patch from tests.utils import asyncio_patch, AsyncioMagicMock -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = Dynamips.instance() diff --git a/tests/compute/dynamips/test_dynamips_router.py b/tests/compute/dynamips/test_dynamips_router.py index 6aa5f33a..1f3d0a21 100644 --- a/tests/compute/dynamips/test_dynamips_router.py +++ b/tests/compute/dynamips/test_dynamips_router.py @@ -18,7 +18,6 @@ import os import uuid import pytest -import pytest_asyncio from gns3server.compute.dynamips.nodes.router import Router from gns3server.compute.dynamips.dynamips_error import DynamipsError @@ -26,7 +25,7 @@ from gns3server.compute.dynamips import Dynamips from gns3server.config import Config -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = Dynamips.instance() diff --git a/tests/compute/iou/test_iou_vm.py b/tests/compute/iou/test_iou_vm.py index d5fe9912..79bb3489 100644 --- a/tests/compute/iou/test_iou_vm.py +++ b/tests/compute/iou/test_iou_vm.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import asyncio import os import stat @@ -37,7 +36,7 @@ if not sys.platform.startswith("win"): from gns3server.compute.iou import IOU -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = IOU.instance() diff --git a/tests/compute/qemu/test_qemu_vm.py b/tests/compute/qemu/test_qemu_vm.py index bd7fa873..af329d6e 100644 --- a/tests/compute/qemu/test_qemu_vm.py +++ b/tests/compute/qemu/test_qemu_vm.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import asyncio import os import sys @@ -34,7 +33,7 @@ from gns3server.utils import force_unix_path, macaddress_to_int, int_to_macaddre from gns3server.compute.notification_manager import NotificationManager -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = Qemu.instance() diff --git a/tests/compute/test_base_node.py b/tests/compute/test_base_node.py index dab1a17c..50060e3a 100644 --- a/tests/compute/test_base_node.py +++ b/tests/compute/test_base_node.py @@ -18,7 +18,6 @@ from collections import OrderedDict import pytest -import pytest_asyncio from tests.utils import asyncio_patch, AsyncioMagicMock @@ -29,7 +28,7 @@ from gns3server.compute.vpcs import VPCS from gns3server.compute.nios.nio_udp import NIOUDP -@pytest_asyncio.fixture(scope="function") +@pytest.fixture(scope="function") async def manager(port_manager): m = VPCS.instance() diff --git a/tests/compute/traceng/test_traceng_vm.py b/tests/compute/traceng/test_traceng_vm.py index 84604976..ce36a347 100644 --- a/tests/compute/traceng/test_traceng_vm.py +++ b/tests/compute/traceng/test_traceng_vm.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import asyncio from tests.utils import asyncio_patch, AsyncioMagicMock @@ -28,7 +27,7 @@ from gns3server.compute.traceng import TraceNG from gns3server.compute.notification_manager import NotificationManager -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = TraceNG.instance() @@ -36,7 +35,7 @@ async def manager(port_manager): return m -@pytest_asyncio.fixture(scope="function") +@pytest.fixture(scope="function") async def vm(compute_project, manager, ubridge_path): vm = TraceNGVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager) diff --git a/tests/compute/virtualbox/test_virtualbox_manager.py b/tests/compute/virtualbox/test_virtualbox_manager.py index 4cc00971..ddbb28b9 100644 --- a/tests/compute/virtualbox/test_virtualbox_manager.py +++ b/tests/compute/virtualbox/test_virtualbox_manager.py @@ -17,7 +17,6 @@ import pytest -import pytest_asyncio import tempfile import os import stat @@ -29,7 +28,7 @@ from gns3server.compute.virtualbox.virtualbox_error import VirtualBoxError from tests.utils import asyncio_patch -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = VirtualBox.instance() diff --git a/tests/compute/virtualbox/test_virtualbox_vm.py b/tests/compute/virtualbox/test_virtualbox_vm.py index 03ebd223..766f0215 100644 --- a/tests/compute/virtualbox/test_virtualbox_vm.py +++ b/tests/compute/virtualbox/test_virtualbox_vm.py @@ -17,7 +17,6 @@ import os import pytest -import pytest_asyncio from tests.utils import asyncio_patch, AsyncioMagicMock from gns3server.compute.virtualbox.virtualbox_vm import VirtualBoxVM @@ -25,7 +24,7 @@ from gns3server.compute.virtualbox.virtualbox_error import VirtualBoxError from gns3server.compute.virtualbox import VirtualBox -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = VirtualBox.instance() diff --git a/tests/compute/vmware/test_vmware_manager.py b/tests/compute/vmware/test_vmware_manager.py index 7f2c2e0b..336ede54 100644 --- a/tests/compute/vmware/test_vmware_manager.py +++ b/tests/compute/vmware/test_vmware_manager.py @@ -15,13 +15,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - -import pytest_asyncio +import pytest from gns3server.compute.vmware import VMware -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = VMware.instance() diff --git a/tests/compute/vmware/test_vmware_vm.py b/tests/compute/vmware/test_vmware_vm.py index bcfbefaa..2b34afa7 100644 --- a/tests/compute/vmware/test_vmware_vm.py +++ b/tests/compute/vmware/test_vmware_vm.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio from gns3server.compute.vmware.vmware_vm import VMwareVM from gns3server.compute.vmware import VMware diff --git a/tests/compute/vpcs/test_vpcs_vm.py b/tests/compute/vpcs/test_vpcs_vm.py index eda0c299..cff3bf4f 100644 --- a/tests/compute/vpcs/test_vpcs_vm.py +++ b/tests/compute/vpcs/test_vpcs_vm.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import asyncio import os import sys @@ -31,7 +30,7 @@ from gns3server.compute.vpcs import VPCS from gns3server.compute.notification_manager import NotificationManager -@pytest_asyncio.fixture +@pytest.fixture async def manager(port_manager): m = VPCS.instance() diff --git a/tests/conftest.py b/tests/conftest.py index b04309d2..034604dd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,4 @@ import pytest -import pytest_asyncio import asyncio import tempfile import shutil @@ -35,7 +34,7 @@ if sys.platform.startswith("win"): asyncio.set_event_loop(None) -@pytest_asyncio.fixture(scope='function') +@pytest.fixture(scope='function') async def http_client(aiohttp_client): app = web.Application() @@ -72,7 +71,7 @@ def compute(controller): return compute -@pytest_asyncio.fixture +@pytest.fixture async def project(tmpdir, controller): return await controller.add_project(name="Test") diff --git a/tests/controller/gns3vm/test_virtualbox_gns3_vm.py b/tests/controller/gns3vm/test_virtualbox_gns3_vm.py index ff899c5b..31f6d738 100644 --- a/tests/controller/gns3vm/test_virtualbox_gns3_vm.py +++ b/tests/controller/gns3vm/test_virtualbox_gns3_vm.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest_asyncio +import pytest from tests.utils import asyncio_patch, AsyncioMagicMock from gns3server.utils.asyncio import wait_run_in_executor @@ -24,7 +24,7 @@ from unittest.mock import patch from gns3server.controller.gns3vm.virtualbox_gns3_vm import VirtualBoxGNS3VM -@pytest_asyncio.fixture +@pytest.fixture async def gns3vm(controller): vm = VirtualBoxGNS3VM(controller) diff --git a/tests/controller/gns3vm/test_vmware_gns3_vm.py b/tests/controller/gns3vm/test_vmware_gns3_vm.py index bf48f199..9b256e31 100644 --- a/tests/controller/gns3vm/test_vmware_gns3_vm.py +++ b/tests/controller/gns3vm/test_vmware_gns3_vm.py @@ -16,12 +16,11 @@ # along with this program. If not, see . import pytest -import pytest_asyncio from gns3server.controller.gns3vm.vmware_gns3_vm import VMwareGNS3VM -@pytest_asyncio.fixture +@pytest.fixture async def gns3vm(controller): vm = VMwareGNS3VM(controller) diff --git a/tests/controller/test_export_project.py b/tests/controller/test_export_project.py index 02877bda..d8db6fb3 100644 --- a/tests/controller/test_export_project.py +++ b/tests/controller/test_export_project.py @@ -19,7 +19,6 @@ import os import json import pytest -import pytest_asyncio import aiohttp import zipfile @@ -33,7 +32,7 @@ from gns3server.controller.export_project import export_project, _is_exportable from gns3server.utils.asyncio import aiozipstream -@pytest_asyncio.fixture +@pytest.fixture async def project(controller): p = Project(controller=controller, name="test") @@ -41,7 +40,7 @@ async def project(controller): return p -@pytest_asyncio.fixture +@pytest.fixture async def node(controller, project): compute = MagicMock() diff --git a/tests/controller/test_link.py b/tests/controller/test_link.py index 25a82404..702dbdc2 100644 --- a/tests/controller/test_link.py +++ b/tests/controller/test_link.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import aiohttp from unittest.mock import MagicMock @@ -27,7 +26,7 @@ from gns3server.controller.ports.serial_port import SerialPort from tests.utils import AsyncioBytesIO, AsyncioMagicMock -@pytest_asyncio.fixture +@pytest.fixture async def link(project, compute): node1 = Node(project, compute, "node1", node_type="qemu") diff --git a/tests/controller/test_notification.py b/tests/controller/test_notification.py index ab2c0f39..d0cc4e3d 100644 --- a/tests/controller/test_notification.py +++ b/tests/controller/test_notification.py @@ -15,13 +15,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest_asyncio +import pytest from unittest.mock import MagicMock from tests.utils import AsyncioMagicMock -@pytest_asyncio.fixture +@pytest.fixture async def node(project): compute = MagicMock() diff --git a/tests/controller/test_project.py b/tests/controller/test_project.py index 48c8a758..bc729fee 100644 --- a/tests/controller/test_project.py +++ b/tests/controller/test_project.py @@ -20,7 +20,6 @@ import os import sys import uuid import pytest -import pytest_asyncio import aiohttp from unittest.mock import MagicMock from tests.utils import AsyncioMagicMock, asyncio_patch @@ -34,7 +33,7 @@ from gns3server.controller.ports.ethernet_port import EthernetPort from gns3server.config import Config -@pytest_asyncio.fixture +@pytest.fixture async def node(controller, project): compute = MagicMock() diff --git a/tests/handlers/api/compute/test_docker.py b/tests/handlers/api/compute/test_docker.py index 878c99c0..217fb3b0 100644 --- a/tests/handlers/api/compute/test_docker.py +++ b/tests/handlers/api/compute/test_docker.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import sys import uuid @@ -53,7 +52,7 @@ def base_params(): # Docker._instance = None -@pytest_asyncio.fixture +@pytest.fixture async def vm(compute_api, compute_project, base_params): with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "nginx"}]): diff --git a/tests/handlers/api/compute/test_iou.py b/tests/handlers/api/compute/test_iou.py index f54c926b..aadb4fa0 100644 --- a/tests/handlers/api/compute/test_iou.py +++ b/tests/handlers/api/compute/test_iou.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import os import stat import sys @@ -46,7 +45,7 @@ def base_params(tmpdir, fake_iou_bin): return {"application_id": 42, "name": "PC TEST 1", "path": "iou.bin"} -@pytest_asyncio.fixture +@pytest.fixture async def vm(compute_api, compute_project, base_params): response = await compute_api.post("/projects/{project_id}/iou/nodes".format(project_id=compute_project.id), base_params) diff --git a/tests/handlers/api/compute/test_qemu.py b/tests/handlers/api/compute/test_qemu.py index 7575a0b4..00245f25 100644 --- a/tests/handlers/api/compute/test_qemu.py +++ b/tests/handlers/api/compute/test_qemu.py @@ -16,7 +16,6 @@ # along with this program. If not, see . import pytest -import pytest_asyncio import uuid import os import sys @@ -58,7 +57,7 @@ def base_params(tmpdir, fake_qemu_bin): return {"name": "PC TEST 1", "qemu_path": fake_qemu_bin} -@pytest_asyncio.fixture +@pytest.fixture async def vm(compute_api, compute_project, base_params): response = await compute_api.post("/projects/{project_id}/qemu/nodes".format(project_id=compute_project.id), base_params) diff --git a/tests/handlers/api/compute/test_vpcs.py b/tests/handlers/api/compute/test_vpcs.py index 70ee8294..f75aba85 100644 --- a/tests/handlers/api/compute/test_vpcs.py +++ b/tests/handlers/api/compute/test_vpcs.py @@ -15,13 +15,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest_asyncio +import pytest import uuid from tests.utils import asyncio_patch from unittest.mock import patch -@pytest_asyncio.fixture +@pytest.fixture async def vm(compute_api, compute_project): params = {"name": "PC TEST 1"} diff --git a/tests/handlers/api/controller/test_link.py b/tests/handlers/api/controller/test_link.py index 67c77a47..be87b74b 100644 --- a/tests/handlers/api/controller/test_link.py +++ b/tests/handlers/api/controller/test_link.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import pytest_asyncio +import pytest from unittest.mock import patch, MagicMock from tests.utils import asyncio_patch, AsyncioMagicMock @@ -24,7 +24,7 @@ from gns3server.controller.ports.ethernet_port import EthernetPort from gns3server.controller.link import Link, FILTERS -@pytest_asyncio.fixture +@pytest.fixture async def nodes(compute, project): response = MagicMock() diff --git a/tests/handlers/api/controller/test_project.py b/tests/handlers/api/controller/test_project.py index 035c96b4..ed8aeb22 100644 --- a/tests/handlers/api/controller/test_project.py +++ b/tests/handlers/api/controller/test_project.py @@ -18,7 +18,6 @@ import uuid import os import pytest -import pytest_asyncio import zipfile import json @@ -26,7 +25,7 @@ from unittest.mock import patch, MagicMock from tests.utils import asyncio_patch -@pytest_asyncio.fixture +@pytest.fixture async def project(controller_api, controller): u = str(uuid.uuid4()) diff --git a/tests/handlers/api/controller/test_snapshot.py b/tests/handlers/api/controller/test_snapshot.py index 034470c8..faed67df 100644 --- a/tests/handlers/api/controller/test_snapshot.py +++ b/tests/handlers/api/controller/test_snapshot.py @@ -17,10 +17,10 @@ import os import uuid -import pytest_asyncio +import pytest -@pytest_asyncio.fixture +@pytest.fixture async def project(controller_api, controller): u = str(uuid.uuid4()) @@ -30,7 +30,7 @@ async def project(controller_api, controller): return project -@pytest_asyncio.fixture +@pytest.fixture async def snapshot(project): snapshot = await project.snapshot("test") From 8f296e54f44ebd669b9cb94f4ce49ce2685298bd Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 23:41:52 +0200 Subject: [PATCH 12/21] Add back loop --- tests/compute/builtin/nodes/test_cloud.py | 8 ++++---- tests/compute/docker/test_docker.py | 2 +- tests/compute/docker/test_docker_vm.py | 4 ++-- tests/compute/dynamips/test_dynamips_manager.py | 2 +- tests/compute/dynamips/test_dynamips_router.py | 2 +- tests/compute/iou/test_iou_vm.py | 4 ++-- tests/compute/qemu/test_qcow2.py | 2 +- tests/compute/qemu/test_qemu_vm.py | 2 +- tests/compute/test_base_node.py | 2 +- tests/compute/test_manager.py | 4 ++-- tests/compute/test_project.py | 2 +- tests/compute/traceng/test_traceng_vm.py | 2 +- tests/compute/virtualbox/test_virtualbox_manager.py | 2 +- tests/compute/virtualbox/test_virtualbox_vm.py | 2 +- tests/compute/vmware/test_vmware_vm.py | 4 ++-- tests/compute/vpcs/test_vpcs_vm.py | 4 ++-- tests/conftest.py | 6 +++--- tests/controller/gns3vm/test_remote_gns3_vm.py | 2 +- tests/controller/gns3vm/test_virtualbox_gns3_vm.py | 2 +- tests/controller/gns3vm/test_vmware_gns3_vm.py | 2 +- tests/controller/test_export_project.py | 2 +- tests/controller/test_gns3vm.py | 6 +++--- tests/controller/test_import_project.py | 12 ++++++------ tests/test_config.py | 8 ++++---- tests/utils/test_asyncio.py | 2 +- tests/web/test_response.py | 2 +- 26 files changed, 46 insertions(+), 46 deletions(-) diff --git a/tests/compute/builtin/nodes/test_cloud.py b/tests/compute/builtin/nodes/test_cloud.py index 09506b45..3e5e5113 100644 --- a/tests/compute/builtin/nodes/test_cloud.py +++ b/tests/compute/builtin/nodes/test_cloud.py @@ -31,7 +31,7 @@ def nio(): @pytest.fixture -async def manager(): +async def manager(loop): m = MagicMock() m.module_name = "builtins" @@ -113,7 +113,7 @@ def test_json_without_ports(on_gns3vm, compute_project, manager): } -async def test_update_port_mappings(on_gns3vm, compute_project): +async def test_update_port_mappings(loop, on_gns3vm, compute_project): """ We don't allow an empty interface in the middle of port list """ @@ -153,7 +153,7 @@ async def test_update_port_mappings(on_gns3vm, compute_project): assert cloud.ports_mapping == ports1 -async def test_linux_ethernet_raw_add_nio(linux_platform, compute_project, nio): +async def test_linux_ethernet_raw_add_nio(loop, linux_platform, compute_project, nio): ports = [ { "interface": "eth0", @@ -180,7 +180,7 @@ async def test_linux_ethernet_raw_add_nio(linux_platform, compute_project, nio): ]) -async def test_linux_ethernet_raw_add_nio_bridge(linux_platform, compute_project, nio): +async def test_linux_ethernet_raw_add_nio_bridge(loop, linux_platform, compute_project, nio): """ Bridge can't be connected directly to a cloud we use a tap in the middle """ diff --git a/tests/compute/docker/test_docker.py b/tests/compute/docker/test_docker.py index 60e2d73e..2e9193ad 100644 --- a/tests/compute/docker/test_docker.py +++ b/tests/compute/docker/test_docker.py @@ -24,7 +24,7 @@ from gns3server.compute.docker.docker_error import DockerError, DockerHttp404Err @pytest.fixture -async def vm(): +async def vm(loop): vm = Docker() vm._connected = True diff --git a/tests/compute/docker/test_docker_vm.py b/tests/compute/docker/test_docker_vm.py index 15073cc6..1effa9b0 100644 --- a/tests/compute/docker/test_docker_vm.py +++ b/tests/compute/docker/test_docker_vm.py @@ -34,7 +34,7 @@ from unittest.mock import patch, MagicMock, call @pytest.fixture() -async def manager(port_manager): +async def manager(loop, port_manager): m = Docker.instance() m.port_manager = port_manager @@ -42,7 +42,7 @@ async def manager(port_manager): @pytest.fixture(scope="function") -async def vm(compute_project, manager): +async def vm(loop, compute_project, manager): vm = DockerVM("test", str(uuid.uuid4()), compute_project, manager, "ubuntu:latest") vm._cid = "e90e34656842" diff --git a/tests/compute/dynamips/test_dynamips_manager.py b/tests/compute/dynamips/test_dynamips_manager.py index 11bbdfc0..aee2c326 100644 --- a/tests/compute/dynamips/test_dynamips_manager.py +++ b/tests/compute/dynamips/test_dynamips_manager.py @@ -29,7 +29,7 @@ from tests.utils import asyncio_patch, AsyncioMagicMock @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = Dynamips.instance() m.port_manager = port_manager diff --git a/tests/compute/dynamips/test_dynamips_router.py b/tests/compute/dynamips/test_dynamips_router.py index 1f3d0a21..7657422e 100644 --- a/tests/compute/dynamips/test_dynamips_router.py +++ b/tests/compute/dynamips/test_dynamips_router.py @@ -26,7 +26,7 @@ from gns3server.config import Config @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = Dynamips.instance() m.port_manager = port_manager diff --git a/tests/compute/iou/test_iou_vm.py b/tests/compute/iou/test_iou_vm.py index 79bb3489..93fbb78d 100644 --- a/tests/compute/iou/test_iou_vm.py +++ b/tests/compute/iou/test_iou_vm.py @@ -37,7 +37,7 @@ if not sys.platform.startswith("win"): @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = IOU.instance() m.port_manager = port_manager @@ -45,7 +45,7 @@ async def manager(port_manager): @pytest.fixture(scope="function") -async def vm(compute_project, manager, tmpdir, fake_iou_bin, iourc_file): +async def vm(loop, compute_project, manager, tmpdir, fake_iou_bin, iourc_file): vm = IOUVM("test", str(uuid.uuid4()), compute_project, manager, application_id=1) config = manager.config.get_section_config("IOU") diff --git a/tests/compute/qemu/test_qcow2.py b/tests/compute/qemu/test_qcow2.py index b14e631e..d185135b 100644 --- a/tests/compute/qemu/test_qcow2.py +++ b/tests/compute/qemu/test_qcow2.py @@ -66,7 +66,7 @@ def test_invalid_empty_file(tmpdir): @pytest.mark.skipif(qemu_img() is None, reason="qemu-img is not available") -async def test_rebase(tmpdir): +async def test_rebase(loop, tmpdir): shutil.copy("tests/resources/empty8G.qcow2", str(tmpdir / "empty16G.qcow2")) shutil.copy("tests/resources/linked.qcow2", str(tmpdir / "linked.qcow2")) diff --git a/tests/compute/qemu/test_qemu_vm.py b/tests/compute/qemu/test_qemu_vm.py index af329d6e..6b87a86b 100644 --- a/tests/compute/qemu/test_qemu_vm.py +++ b/tests/compute/qemu/test_qemu_vm.py @@ -34,7 +34,7 @@ from gns3server.compute.notification_manager import NotificationManager @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = Qemu.instance() m.port_manager = port_manager diff --git a/tests/compute/test_base_node.py b/tests/compute/test_base_node.py index 50060e3a..d96c67ce 100644 --- a/tests/compute/test_base_node.py +++ b/tests/compute/test_base_node.py @@ -29,7 +29,7 @@ from gns3server.compute.nios.nio_udp import NIOUDP @pytest.fixture(scope="function") -async def manager(port_manager): +async def manager(loop, port_manager): m = VPCS.instance() m.port_manager = port_manager diff --git a/tests/compute/test_manager.py b/tests/compute/test_manager.py index 556072db..eef0d1d2 100644 --- a/tests/compute/test_manager.py +++ b/tests/compute/test_manager.py @@ -29,7 +29,7 @@ from gns3server.utils import force_unix_path @pytest.fixture(scope="function") -async def vpcs(port_manager): +async def vpcs(loop, port_manager): VPCS._instance = None vpcs = VPCS.instance() @@ -38,7 +38,7 @@ async def vpcs(port_manager): @pytest.fixture(scope="function") -async def qemu(port_manager): +async def qemu(loop, port_manager): Qemu._instance = None Qemu._init_config_disk = MagicMock() # do not create the config.img image diff --git a/tests/compute/test_project.py b/tests/compute/test_project.py index 11870b62..6ae23717 100644 --- a/tests/compute/test_project.py +++ b/tests/compute/test_project.py @@ -33,7 +33,7 @@ from gns3server.config import Config @pytest.fixture(scope="function") -async def manager(port_manager): +async def manager(loop, port_manager): m = VPCS.instance() m.port_manager = port_manager diff --git a/tests/compute/traceng/test_traceng_vm.py b/tests/compute/traceng/test_traceng_vm.py index ce36a347..e4d381dd 100644 --- a/tests/compute/traceng/test_traceng_vm.py +++ b/tests/compute/traceng/test_traceng_vm.py @@ -28,7 +28,7 @@ from gns3server.compute.notification_manager import NotificationManager @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = TraceNG.instance() m.port_manager = port_manager diff --git a/tests/compute/virtualbox/test_virtualbox_manager.py b/tests/compute/virtualbox/test_virtualbox_manager.py index ddbb28b9..3ba1d9eb 100644 --- a/tests/compute/virtualbox/test_virtualbox_manager.py +++ b/tests/compute/virtualbox/test_virtualbox_manager.py @@ -29,7 +29,7 @@ from tests.utils import asyncio_patch @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = VirtualBox.instance() m.port_manager = port_manager diff --git a/tests/compute/virtualbox/test_virtualbox_vm.py b/tests/compute/virtualbox/test_virtualbox_vm.py index 766f0215..12d59656 100644 --- a/tests/compute/virtualbox/test_virtualbox_vm.py +++ b/tests/compute/virtualbox/test_virtualbox_vm.py @@ -25,7 +25,7 @@ from gns3server.compute.virtualbox import VirtualBox @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = VirtualBox.instance() m.port_manager = port_manager diff --git a/tests/compute/vmware/test_vmware_vm.py b/tests/compute/vmware/test_vmware_vm.py index 2b34afa7..fa4b8fa3 100644 --- a/tests/compute/vmware/test_vmware_vm.py +++ b/tests/compute/vmware/test_vmware_vm.py @@ -22,7 +22,7 @@ from gns3server.compute.vmware import VMware @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = VMware.instance() m.port_manager = port_manager @@ -30,7 +30,7 @@ async def manager(port_manager): @pytest.fixture(scope="function") -async def vm(compute_project, manager, tmpdir): +async def vm(loop, compute_project, manager, tmpdir): fake_vmx = str(tmpdir / "test.vmx") open(fake_vmx, "w+").close() diff --git a/tests/compute/vpcs/test_vpcs_vm.py b/tests/compute/vpcs/test_vpcs_vm.py index cff3bf4f..618cabea 100644 --- a/tests/compute/vpcs/test_vpcs_vm.py +++ b/tests/compute/vpcs/test_vpcs_vm.py @@ -31,7 +31,7 @@ from gns3server.compute.notification_manager import NotificationManager @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = VPCS.instance() m.port_manager = port_manager @@ -39,7 +39,7 @@ async def manager(port_manager): @pytest.fixture(scope="function") -async def vm(compute_project, manager, tmpdir, ubridge_path): +async def vm(loop, compute_project, manager, tmpdir, ubridge_path): vm = VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager) vm._vpcs_version = parse_version("0.9") diff --git a/tests/conftest.py b/tests/conftest.py index 034604dd..05cef8a4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,9 +29,9 @@ if sys.platform.startswith("win"): """Return an event loop and destroy it at the end of test""" loop = asyncio.ProactorEventLoop() - asyncio.set_event_loop(loop) # Replace main loop to avoid conflict between tests + asyncio.set_loop(loop) # Replace main loop to avoid conflict between tests yield loop - asyncio.set_event_loop(None) + asyncio.set_loop(None) @pytest.fixture(scope='function') @@ -72,7 +72,7 @@ def compute(controller): @pytest.fixture -async def project(tmpdir, controller): +async def project(loop, tmpdir, controller): return await controller.add_project(name="Test") diff --git a/tests/controller/gns3vm/test_remote_gns3_vm.py b/tests/controller/gns3vm/test_remote_gns3_vm.py index 09994b86..1d1fc62f 100644 --- a/tests/controller/gns3vm/test_remote_gns3_vm.py +++ b/tests/controller/gns3vm/test_remote_gns3_vm.py @@ -55,7 +55,7 @@ async def test_start(gns3vm, controller): assert gns3vm.password == "world" -async def test_start_invalid_vm(gns3vm, controller): +async def test_start_invalid_vm(loop, gns3vm, controller): await controller.add_compute("r1", name="R1", diff --git a/tests/controller/gns3vm/test_virtualbox_gns3_vm.py b/tests/controller/gns3vm/test_virtualbox_gns3_vm.py index 31f6d738..eac3bf22 100644 --- a/tests/controller/gns3vm/test_virtualbox_gns3_vm.py +++ b/tests/controller/gns3vm/test_virtualbox_gns3_vm.py @@ -25,7 +25,7 @@ from gns3server.controller.gns3vm.virtualbox_gns3_vm import VirtualBoxGNS3VM @pytest.fixture -async def gns3vm(controller): +async def gns3vm(loop, controller): vm = VirtualBoxGNS3VM(controller) vm.vmname = "GNS3 VM" diff --git a/tests/controller/gns3vm/test_vmware_gns3_vm.py b/tests/controller/gns3vm/test_vmware_gns3_vm.py index 9b256e31..cb0d54ad 100644 --- a/tests/controller/gns3vm/test_vmware_gns3_vm.py +++ b/tests/controller/gns3vm/test_vmware_gns3_vm.py @@ -21,7 +21,7 @@ from gns3server.controller.gns3vm.vmware_gns3_vm import VMwareGNS3VM @pytest.fixture -async def gns3vm(controller): +async def gns3vm(loop, controller): vm = VMwareGNS3VM(controller) vm.vmname = "GNS3 VM" diff --git a/tests/controller/test_export_project.py b/tests/controller/test_export_project.py index d8db6fb3..973ed36e 100644 --- a/tests/controller/test_export_project.py +++ b/tests/controller/test_export_project.py @@ -33,7 +33,7 @@ from gns3server.utils.asyncio import aiozipstream @pytest.fixture -async def project(controller): +async def project(loop, controller): p = Project(controller=controller, name="test") p.dump = MagicMock() diff --git a/tests/controller/test_gns3vm.py b/tests/controller/test_gns3vm.py index 0058ed4c..8d01fae9 100644 --- a/tests/controller/test_gns3vm.py +++ b/tests/controller/test_gns3vm.py @@ -47,7 +47,7 @@ def dummy_gns3vm(controller, dummy_engine): return vm -async def test_list(controller): +async def test_list(loop, controller): vm = GNS3VM(controller) with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.list", return_value=[{"vmname": "test", "vmx_path": "test"}]): @@ -60,14 +60,14 @@ async def test_list(controller): await vm.list("hyperv") -async def test_json(controller): +async def test_json(loop, controller): vm = GNS3VM(controller) assert vm.__json__() == vm._settings @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows") -async def test_update_settings(controller): +async def test_update_settings(loop, controller): vm = GNS3VM(controller) vm.settings = { diff --git a/tests/controller/test_import_project.py b/tests/controller/test_import_project.py index e80da797..1ef9a2d5 100644 --- a/tests/controller/test_import_project.py +++ b/tests/controller/test_import_project.py @@ -166,7 +166,7 @@ async def test_import_with_images(tmpdir, controller): assert os.path.exists(path), path -async def test_import_iou_linux_no_vm(linux_platform, tmpdir, controller): +async def test_import_iou_linux_no_vm(loop, linux_platform, tmpdir, controller): """ On non linux host IOU should be local if we don't have a GNS3 VM """ @@ -210,7 +210,7 @@ async def test_import_iou_linux_no_vm(linux_platform, tmpdir, controller): assert topo["topology"]["nodes"][0]["compute_id"] == "local" -async def test_import_iou_linux_with_vm(linux_platform, tmpdir, controller): +async def test_import_iou_linux_with_vm(loop, linux_platform, tmpdir, controller): """ On non linux host IOU should be vm if we have a GNS3 VM configured """ @@ -255,7 +255,7 @@ async def test_import_iou_linux_with_vm(linux_platform, tmpdir, controller): assert topo["topology"]["nodes"][0]["compute_id"] == "vm" -async def test_import_nat_non_linux(windows_platform, tmpdir, controller): +async def test_import_nat_non_linux(loop, windows_platform, tmpdir, controller): """ On non linux host NAT should be moved to the GNS3 VM """ @@ -300,7 +300,7 @@ async def test_import_nat_non_linux(windows_platform, tmpdir, controller): assert topo["topology"]["nodes"][0]["compute_id"] == "vm" -async def test_import_iou_non_linux(windows_platform, tmpdir, controller): +async def test_import_iou_non_linux(loop, windows_platform, tmpdir, controller): """ On non linux host IOU should be moved to the GNS3 VM """ @@ -356,7 +356,7 @@ async def test_import_iou_non_linux(windows_platform, tmpdir, controller): mock.assert_called_with(controller._computes["vm"], project_id, project.path, os.path.join('project-files', 'iou', topo["topology"]["nodes"][0]['node_id'])) -async def test_import_node_id(linux_platform, tmpdir, controller): +async def test_import_node_id(loop, linux_platform, tmpdir, controller): """ When importing a node, node_id should change """ @@ -449,7 +449,7 @@ async def test_import_node_id(linux_platform, tmpdir, controller): assert os.path.exists(os.path.join(project.path, "project-files", "iou", topo["topology"]["nodes"][0]["node_id"], "startup.cfg")) -async def test_import_keep_compute_id(windows_platform, tmpdir, controller): +async def test_import_keep_compute_id(loop, windows_platform, tmpdir, controller): """ On linux host IOU should be moved to the GNS3 VM """ diff --git a/tests/test_config.py b/tests/test_config.py index cdaa346e..f670ad54 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -53,7 +53,7 @@ def write_config(tmpdir, settings): return path -def test_get_section_config(tmpdir): +def test_get_section_config(loop, tmpdir): config = load_config(tmpdir, { "Server": { @@ -63,7 +63,7 @@ def test_get_section_config(tmpdir): assert dict(config.get_section_config("Server")) == {"host": "127.0.0.1"} -def test_set_section_config(tmpdir): +def test_set_section_config(loop, tmpdir): config = load_config(tmpdir, { "Server": { @@ -77,7 +77,7 @@ def test_set_section_config(tmpdir): assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1", "local": "true"} -def test_set(tmpdir): +def test_set(loop, tmpdir): config = load_config(tmpdir, { "Server": { @@ -90,7 +90,7 @@ def test_set(tmpdir): assert dict(config.get_section_config("Server")) == {"host": "192.168.1.1"} -def test_reload(tmpdir): +def test_reload(loop, tmpdir): config = load_config(tmpdir, { "Server": { diff --git a/tests/utils/test_asyncio.py b/tests/utils/test_asyncio.py index f9f45feb..9e66c124 100644 --- a/tests/utils/test_asyncio.py +++ b/tests/utils/test_asyncio.py @@ -44,7 +44,7 @@ async def test_exception_wait_run_in_executor(): @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows") -async def test_subprocess_check_output(tmpdir): +async def test_subprocess_check_output(loop, tmpdir): path = str(tmpdir / "test") result = await subprocess_check_output("echo", "-n", path) diff --git a/tests/web/test_response.py b/tests/web/test_response.py index 3c29abcb..837f8163 100644 --- a/tests/web/test_response.py +++ b/tests/web/test_response.py @@ -39,7 +39,7 @@ def response(): # assert response.status == 200 -async def test_response_file_not_found(tmpdir, response): +async def test_response_file_not_found(loop, tmpdir, response): filename = str(tmpdir / 'hello-not-found') with pytest.raises(HTTPNotFound): From 46b022f72630a3bbb1a4f64114451ccde1622c7a Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 23:45:30 +0200 Subject: [PATCH 13/21] Restore missing loop --- tests/compute/vmware/test_vmware_manager.py | 2 +- tests/compute/vmware/test_vmware_vm.py | 2 +- tests/conftest.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/compute/vmware/test_vmware_manager.py b/tests/compute/vmware/test_vmware_manager.py index 336ede54..9953d1e8 100644 --- a/tests/compute/vmware/test_vmware_manager.py +++ b/tests/compute/vmware/test_vmware_manager.py @@ -21,7 +21,7 @@ from gns3server.compute.vmware import VMware @pytest.fixture -async def manager(port_manager): +async def manager(loop, port_manager): m = VMware.instance() m.port_manager = port_manager diff --git a/tests/compute/vmware/test_vmware_vm.py b/tests/compute/vmware/test_vmware_vm.py index fa4b8fa3..d160e245 100644 --- a/tests/compute/vmware/test_vmware_vm.py +++ b/tests/compute/vmware/test_vmware_vm.py @@ -30,7 +30,7 @@ async def manager(loop, port_manager): @pytest.fixture(scope="function") -async def vm(loop, compute_project, manager, tmpdir): +async def vm(compute_project, manager, tmpdir): fake_vmx = str(tmpdir / "test.vmx") open(fake_vmx, "w+").close() diff --git a/tests/conftest.py b/tests/conftest.py index 05cef8a4..7311b7e6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,9 +29,9 @@ if sys.platform.startswith("win"): """Return an event loop and destroy it at the end of test""" loop = asyncio.ProactorEventLoop() - asyncio.set_loop(loop) # Replace main loop to avoid conflict between tests + asyncio.set_event_loop(loop) # Replace main loop to avoid conflict between tests yield loop - asyncio.set_loop(None) + asyncio.set_event_loop(None) @pytest.fixture(scope='function') From 6546407e5d0bfa4dc8f7d88d3742ddf181a1b899 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 23:52:59 +0200 Subject: [PATCH 14/21] Upgrade to Python 3.7 for Windows tests --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d35cafe6..db38580a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,7 @@ image: Visual Studio 2015 platform: x64 environment: - PYTHON: "C:\\Python36-x64" + PYTHON: "C:\\Python37-x64" DISTUTILS_USE_SDK: "1" API_TOKEN: secure: VEKn4bYH3QO0ixtQW5ni4Enmn8cS1NlZV246ludBDgQ= From b6cf3aabca07e68f6e6d5837d0a1e9ad132f55a6 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 27 Aug 2022 23:55:42 +0200 Subject: [PATCH 15/21] Don't install nmap --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index db38580a..c21301e8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,6 @@ environment: secure: VEKn4bYH3QO0ixtQW5ni4Enmn8cS1NlZV246ludBDgQ= install: - - cinst nmap - "%PYTHON%\\python.exe -m pip install -r dev-requirements.txt" - "%PYTHON%\\python.exe -m pip install -r win-requirements.txt" From 028f977823ec6c239b4330128dac3628dd489546 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Aug 2022 00:01:26 +0200 Subject: [PATCH 16/21] Revert "Don't install nmap" This reverts commit b6cf3aabca07e68f6e6d5837d0a1e9ad132f55a6. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index c21301e8..db38580a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,7 @@ environment: secure: VEKn4bYH3QO0ixtQW5ni4Enmn8cS1NlZV246ludBDgQ= install: + - cinst nmap - "%PYTHON%\\python.exe -m pip install -r dev-requirements.txt" - "%PYTHON%\\python.exe -m pip install -r win-requirements.txt" From ab6c6535c63dcfec3b1bac780ac05685c8cf5aec Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Aug 2022 00:02:54 +0200 Subject: [PATCH 17/21] Upgrade Sentry dependency --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f84b9115..2afce927 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ jsonschema==3.2.0 aiohttp==3.8.1 aiohttp-cors==0.7.0 aiofiles==0.8.0 -Jinja2==3.0.3 -sentry-sdk==1.5.12 +Jinja2==3.1.2 +sentry-sdk==1.9.5 psutil==5.9.1 async-timeout==4.0.2 distro==1.7.0 From 129f0a631c0916d5fb9db8d00675f392d5a28636 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Aug 2022 12:06:56 +0200 Subject: [PATCH 18/21] Use original $PATH in init.sh for Docker containers. Ref #2069 --- gns3server/compute/docker/resources/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/compute/docker/resources/init.sh b/gns3server/compute/docker/resources/init.sh index 8040d025..e21627d7 100755 --- a/gns3server/compute/docker/resources/init.sh +++ b/gns3server/compute/docker/resources/init.sh @@ -20,7 +20,7 @@ # the start command of the container # OLD_PATH="$PATH" -PATH=/gns3/bin:/tmp/gns3/bin:/sbin +PATH=/gns3/bin:/tmp/gns3/bin:/sbin:$PATH # bootstrap busybox commands if [ ! -d /tmp/gns3/bin ]; then From e0209a0491b37b6e90ef6f4779840cace28f8ac7 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Aug 2022 22:32:42 +0200 Subject: [PATCH 19/21] Downgrade Jinja2 to v3.0.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2afce927..4703e6dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ jsonschema==3.2.0 aiohttp==3.8.1 aiohttp-cors==0.7.0 aiofiles==0.8.0 -Jinja2==3.1.2 +Jinja2==3.0.3 sentry-sdk==1.9.5 psutil==5.9.1 async-timeout==4.0.2 From fd1d8d9d8640e8d5e8080c7e6e5e3241319805cc Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Aug 2022 22:51:26 +0200 Subject: [PATCH 20/21] Update appliance files --- gns3server/appliances/aruba-arubaoscx.gns3a | 15 ++++- gns3server/appliances/aruba-vgw.gns3a | 2 +- gns3server/appliances/aruba-vmc.gns3a | 2 +- gns3server/appliances/cisco-asav.gns3a | 13 +++++ gns3server/appliances/cisco-c8000v.gns3a | 13 +++++ gns3server/appliances/cisco-iou-l3.gns3a | 12 ++++ gns3server/appliances/cumulus-vx.gns3a | 16 +++++- gns3server/appliances/debian.gns3a | 14 ++--- gns3server/appliances/empty-vm.gns3a | 20 ++++++- gns3server/appliances/exos.gns3a | 15 ++++- gns3server/appliances/fortianalyzer.gns3a | 14 +++++ gns3server/appliances/fortigate.gns3a | 14 +++++ gns3server/appliances/fortimail.gns3a | 14 +++++ gns3server/appliances/fortimanager.gns3a | 14 +++++ gns3server/appliances/fortiproxy.gns3a | 14 +++++ gns3server/appliances/fortisandbox.gns3a | 14 +++++ gns3server/appliances/fortiweb.gns3a | 14 +++++ gns3server/appliances/huawei-ar1kv.gns3a | 2 +- gns3server/appliances/huawei-ce12800.gns3a | 2 +- gns3server/appliances/huawei-ne40e.gns3a | 2 +- gns3server/appliances/huawei-usg6kv.gns3a | 2 +- gns3server/appliances/juniper-vmx-vfp.gns3a | 4 +- gns3server/appliances/juniper-vrr.gns3a | 19 ++++++ gns3server/appliances/mikrotik-chr.gns3a | 64 ++++++++++----------- gns3server/appliances/netem.gns3a | 4 +- gns3server/appliances/raspian.gns3a | 30 +++++++++- gns3server/appliances/ubuntu-cloud.gns3a | 14 +++++ gns3server/appliances/ubuntu-server.gns3a | 2 +- 28 files changed, 308 insertions(+), 57 deletions(-) diff --git a/gns3server/appliances/aruba-arubaoscx.gns3a b/gns3server/appliances/aruba-arubaoscx.gns3a index 39109f05..db45527b 100644 --- a/gns3server/appliances/aruba-arubaoscx.gns3a +++ b/gns3server/appliances/aruba-arubaoscx.gns3a @@ -4,7 +4,7 @@ "category": "multilayer_switch", "description": "The ArubaOS-CX Simulation Software is a virtual platform to enable simulation of the ArubaOS-CX Network Operating System. Simulated networks can be created using many of the protocols in the ArubaOS-CX Operating system like OSPF, BGP (inc. EVPN). Key features like the Aruba Network Analytics Engine and the REST API can be simulated, providing a lightweight development platform to building the modern network.", "vendor_name": "HPE Aruba", - "vendor_url": "arubanetworks.com", + "vendor_url": "https://www.arubanetworks.com", "product_name": "ArubaOS-CX Simulation Software", "registry_version": 4, "status": "stable", @@ -30,6 +30,13 @@ "process_priority": "normal" }, "images": [ + { + "filename": "arubaoscx-disk-image-genericx86-p4-20220616193419.vmdk", + "version": "10.10.0002", + "md5sum": "ed031aeb6caf92adb408c7603d294fd4", + "filesize": 355858944, + "download_url": "https://asp.arubanetworks.com/" + }, { "filename": "arubaoscx-disk-image-genericx86-p4-20220223012712.vmdk", "version": "10.09.1000", @@ -88,6 +95,12 @@ } ], "versions": [ + { + "name": "10.10.0002", + "images": { + "hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20220616193419.vmdk" + } + }, { "name": "10.09.1000", "images": { diff --git a/gns3server/appliances/aruba-vgw.gns3a b/gns3server/appliances/aruba-vgw.gns3a index 6592a204..67c3910a 100644 --- a/gns3server/appliances/aruba-vgw.gns3a +++ b/gns3server/appliances/aruba-vgw.gns3a @@ -4,7 +4,7 @@ "category": "firewall", "description": "Aruba Virtual Gateways allow customers to bring their public cloud infrastructure to the SD-WAN fabric and facilitate connectivity between branches and the public cloud.", "vendor_name": "HPE Aruba", - "vendor_url": "arubanetworks.com", + "vendor_url": "https://www.arubanetworks.com", "documentation_url": "https://asp.arubanetworks.com/downloads;products=Aruba%20SD-WAN", "product_name": "Aruba SD-WAN Virtual Gateway", "product_url": "https://www.arubanetworks.com/products/networking/gateways-and-controllers/", diff --git a/gns3server/appliances/aruba-vmc.gns3a b/gns3server/appliances/aruba-vmc.gns3a index 52ba75d4..7be2cca4 100644 --- a/gns3server/appliances/aruba-vmc.gns3a +++ b/gns3server/appliances/aruba-vmc.gns3a @@ -4,7 +4,7 @@ "category": "guest", "description": "Aruba Virtual Mobility Controller", "vendor_name": "HPE Aruba", - "vendor_url": "arubanetworks.com", + "vendor_url": "https://www.arubanetworks.com", "product_name": "Aruba VMC", "registry_version": 4, "status": "stable", diff --git a/gns3server/appliances/cisco-asav.gns3a b/gns3server/appliances/cisco-asav.gns3a index d74e0118..31b695d0 100644 --- a/gns3server/appliances/cisco-asav.gns3a +++ b/gns3server/appliances/cisco-asav.gns3a @@ -27,6 +27,13 @@ }, "images": [ { + "filename": "asav9-16-2.qcow2", + "version": "9.16.2 CML", + "md5sum": "1f8db97063a7f738fddc81ac880a906c", + "filesize": 262078976, + "download_url": "https://learningnetworkstore.cisco.com/cisco-modeling-labs-personal/cisco-modeling-labs-personal/CML-PERSONAL.html" + }, + { "filename": "asav9-16-2.qcow2", "version": "9.16.2", "md5sum": "c3aa2b73b029146ec345bf888dd54eab", @@ -112,6 +119,12 @@ } ], "versions": [ + { + "name": "9.16.2 CML", + "images": { + "hda_disk_image": "asav9-16-2.qcow2" + } + }, { "name": "9.16.2", "images": { diff --git a/gns3server/appliances/cisco-c8000v.gns3a b/gns3server/appliances/cisco-c8000v.gns3a index 6c1828da..14ab53c8 100644 --- a/gns3server/appliances/cisco-c8000v.gns3a +++ b/gns3server/appliances/cisco-c8000v.gns3a @@ -24,6 +24,13 @@ "kvm": "require" }, "images": [ + { + "filename": "c8000v-universalk9_8G_serial.17.06.01a.qcow2", + "version": "17.06.01a 8G", + "md5sum": "d8b8ae633d953ec1b6d8f18a09a4f4e7", + "filesize": 1595277312, + "download_url": "https://software.cisco.com/download/home/286327102/type/282046477/release/Bengaluru-17.6.1a" + }, { "filename": "c8000v-universalk9_8G_serial.17.04.01a.qcow2", "version": "17.04.01a 8G", @@ -40,6 +47,12 @@ } ], "versions": [ + { + "name": "17.06.01a 8G", + "images": { + "hda_disk_image": "c8000v-universalk9_8G_serial.17.06.01a.qcow2" + } + }, { "name": "17.04.01a 8G", "images": { diff --git a/gns3server/appliances/cisco-iou-l3.gns3a b/gns3server/appliances/cisco-iou-l3.gns3a index 19a5380b..3b0ac2f0 100644 --- a/gns3server/appliances/cisco-iou-l3.gns3a +++ b/gns3server/appliances/cisco-iou-l3.gns3a @@ -18,6 +18,12 @@ "startup_config": "iou_l3_base_startup-config.txt" }, "images": [ + { + "filename": "i86bi_LinuxL3-AdvEnterpriseK9-M2_157_3_May_2018.bin", + "version": "15.7(3)M2", + "md5sum": "d6874260c3daeeb96d10fc844ae0b93b", + "filesize": 184759244 + }, { "filename": "i86bi-linux-l3-adventerprisek9-ms.155-2.T.bin", "version": "155-2T", @@ -32,6 +38,12 @@ } ], "versions": [ + { + "name": "15.7(3)M2", + "images": { + "image": "i86bi_LinuxL3-AdvEnterpriseK9-M2_157_3_May_2018.bin" + } + }, { "name": "155-2T", "images": { diff --git a/gns3server/appliances/cumulus-vx.gns3a b/gns3server/appliances/cumulus-vx.gns3a index 03685393..c21971a4 100644 --- a/gns3server/appliances/cumulus-vx.gns3a +++ b/gns3server/appliances/cumulus-vx.gns3a @@ -12,7 +12,7 @@ "status": "stable", "maintainer": "GNS3 Team", "maintainer_email": "developers@gns3.net", - "usage": "Default username is cumulus and password is CumulusLinux! in version 4.1 and earlier, and cumulus in version 4.2 and later.", + "usage": "Default username/password is cumulus/CumulusLinux! in version 4.1 and earlier, and cumulus/cumulus in version 4.2 and later.", "first_port_name": "eth0", "port_name_format": "swp{port1}", "qemu": { @@ -25,6 +25,14 @@ "kvm": "require" }, "images": [ + { + "filename": "cumulus-linux-5.1.0-vx-amd64-qemu.qcow2", + "version": "5.1.0", + "md5sum": "b46a68bbb57e77fab5c2927367bead13", + "filesize": 4174446592, + "download_url": "https://www.nvidia.com/en-us/networking/ethernet-switching/cumulus-vx/download/", + "direct_download_url": "https://d2cd9e7ca6hntp.cloudfront.net/public/CumulusLinux-5.1.0/cumulus-linux-5.1.0-vx-amd64-qemu.qcow2" + }, { "filename": "cumulus-linux-4.3.0-vx-amd64-qemu.qcow2", "version": "4.3.0", @@ -231,6 +239,12 @@ } ], "versions": [ + { + "name": "5.1.0", + "images": { + "hda_disk_image": "cumulus-linux-5.1.0-vx-amd64-qemu.qcow2" + } + }, { "name": "4.3.0", "images": { diff --git a/gns3server/appliances/debian.gns3a b/gns3server/appliances/debian.gns3a index 13f55861..4b98cc20 100644 --- a/gns3server/appliances/debian.gns3a +++ b/gns3server/appliances/debian.gns3a @@ -24,12 +24,12 @@ }, "images": [ { - "filename": "debian-11-genericcloud-amd64-20220328-962.qcow2", - "version": "11.3", - "md5sum": "7cf51e23747898485971a656ac2eb96d", - "filesize": 253296640, + "filename": "debian-11-genericcloud-amd64-20220711-1073.qcow2", + "version": "11.4", + "md5sum": "e8fadf4bbf7324a2e2875a5ba00588e7", + "filesize": 253231104, "download_url": "https://cloud.debian.org/images/cloud/bullseye/", - "direct_download_url": "https://cloud.debian.org/images/cloud/bullseye/20220328-962/debian-11-genericcloud-amd64-20220328-962.qcow2" + "direct_download_url": "https://cloud.debian.org/images/cloud/bullseye/20220711-1073/debian-11-genericcloud-amd64-20220711-1073.qcow2" }, { "filename": "debian-10-genericcloud-amd64-20220328-962.qcow2", @@ -49,9 +49,9 @@ ], "versions": [ { - "name": "11.3", + "name": "11.4", "images": { - "hda_disk_image": "debian-11-genericcloud-amd64-20220328-962.qcow2", + "hda_disk_image": "debian-11-genericcloud-amd64-20220711-1073.qcow2", "cdrom_image": "debian-cloud-init-data.iso" } }, diff --git a/gns3server/appliances/empty-vm.gns3a b/gns3server/appliances/empty-vm.gns3a index 83724603..8e2ac20f 100644 --- a/gns3server/appliances/empty-vm.gns3a +++ b/gns3server/appliances/empty-vm.gns3a @@ -2,7 +2,7 @@ "appliance_id": "1cfdf900-7c30-4cb7-8f03-3f61d2581633", "name": "Empty VM", "category": "guest", - "description": "An empty VM with empty hard disks 8G, 30G & 100G.", + "description": "A empty VM with empty hard disks 8G, 30G, 100G & 200G.", "vendor_name": "GNS3", "vendor_url": "https://gns3.com", "documentation_url": "", @@ -20,7 +20,7 @@ "ram": 1024, "arch": "x86_64", "console_type": "vnc", - "hda_disk_interface": "sata", + "hda_disk_interface": "sata", "boot_priority": "d", "kvm": "allow" }, @@ -48,6 +48,14 @@ "filesize": 198656, "download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/", "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty100G.qcow2/download" + }, + { + "filename": "empty200G.qcow2", + "version": "200G", + "md5sum": "d1686d2f25695dee32eab9a6f4652c7c", + "filesize": 200192, + "download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/", + "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty200G.qcow2/download" } ], "versions": [ @@ -63,11 +71,17 @@ "hda_disk_image": "empty30G.qcow2" } }, - { + { "name": "100G", "images": { "hda_disk_image": "empty100G.qcow2" } + }, + { + "name": "200G", + "images": { + "hda_disk_image": "empty200G.qcow2" + } } ] } diff --git a/gns3server/appliances/exos.gns3a b/gns3server/appliances/exos.gns3a index 6d596124..4b67b8ac 100644 --- a/gns3server/appliances/exos.gns3a +++ b/gns3server/appliances/exos.gns3a @@ -27,7 +27,14 @@ "options": "-cpu core2duo" }, "images": [ - { + { + "filename": "EXOS-VM_v32.1.1.6.qcow2", + "version": "32.1.1.6", + "md5sum": "48868bbcb4255d6365049b5941dd2af7", + "filesize": 231211008, + "direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_EXOS/EXOS-VM_v32.1.1.6.qcow2" + }, + { "filename": "EXOS-VM_v31.7.1.4.qcow2", "version": "31.7.1.4", "md5sum": "a70e4fa3bc361434237ad12937aaf0fb", @@ -106,6 +113,12 @@ } ], "versions": [ + { + "name": "32.1.1.6", + "images": { + "hda_disk_image": "EXOS-VM_v32.1.1.6.qcow2" + } + }, { "name": "31.7.1.4", "images": { diff --git a/gns3server/appliances/fortianalyzer.gns3a b/gns3server/appliances/fortianalyzer.gns3a index 3e73ea7a..e82a10f4 100644 --- a/gns3server/appliances/fortianalyzer.gns3a +++ b/gns3server/appliances/fortianalyzer.gns3a @@ -27,6 +27,13 @@ "kvm": "allow" }, "images": [ + { + "filename": "FAZ_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2", + "version": "7.2.1", + "md5sum": "c13b6c7678a2fc12ab969fc681ad3af5", + "filesize": 340631552, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FAZ_VM64_KVM-v6-build2288-FORTINET.out.kvm.qcow2", "version": "6.4.5", @@ -177,6 +184,13 @@ } ], "versions": [ + { + "name": "7.2.1", + "images": { + "hda_disk_image": "FAZ_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "empty30G.qcow2" + } + }, { "name": "6.4.5", "images": { diff --git a/gns3server/appliances/fortigate.gns3a b/gns3server/appliances/fortigate.gns3a index fb830442..73a6e997 100644 --- a/gns3server/appliances/fortigate.gns3a +++ b/gns3server/appliances/fortigate.gns3a @@ -27,6 +27,13 @@ "kvm": "allow" }, "images": [ + { + "filename": "FGT_VM64_KVM-v7.2.1.F-build1254-FORTINET.out.kvm.qcow2", + "version": "7.2.1", + "md5sum": "e382a1ad5c7c16f49a1c0d3f45e3a3b2", + "filesize": 86704128, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FGT_VM64_KVM-v6-build1828-FORTINET.out.kvm.qcow2", "version": "6.4.5", @@ -254,6 +261,13 @@ } ], "versions": [ + { + "name": "7.2.1", + "images": { + "hda_disk_image": "FGT_VM64_KVM-v7.2.1.F-build1254-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "empty30G.qcow2" + } + }, { "name": "6.4.5", "images": { diff --git a/gns3server/appliances/fortimail.gns3a b/gns3server/appliances/fortimail.gns3a index 77bc0c35..4d5cf111 100644 --- a/gns3server/appliances/fortimail.gns3a +++ b/gns3server/appliances/fortimail.gns3a @@ -27,6 +27,13 @@ "kvm": "allow" }, "images": [ + { + "filename": "FML_VMKV-64-v721.M-build0364-FORTINET.out.kvm.qcow2", + "version": "7.2.1", + "md5sum": "b7bf13c2fb013693936b45d89dfab1ac", + "filesize": 123535360, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FML_VMKV-64-v60-build0257-FORTINET.out.kvm.qcow2", "version": "6.2.1", @@ -184,6 +191,13 @@ } ], "versions": [ + { + "name": "7.2.1", + "images": { + "hda_disk_image": "FML_VMKV-64-v721.M-build0364-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "empty30G.qcow2" + } + }, { "name": "6.2.1", "images": { diff --git a/gns3server/appliances/fortimanager.gns3a b/gns3server/appliances/fortimanager.gns3a index ce77ab7f..2f920388 100644 --- a/gns3server/appliances/fortimanager.gns3a +++ b/gns3server/appliances/fortimanager.gns3a @@ -27,6 +27,13 @@ "kvm": "allow" }, "images": [ + { + "filename": "FMG_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2", + "version": "7.2.1", + "md5sum": "1a3eeff1204fa8f4243773f7521e12b5", + "filesize": 242814976, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FMG_VM64_KVM-v6-build2288-FORTINET.out.kvm.qcow2", "version": "6.4.5", @@ -177,6 +184,13 @@ } ], "versions": [ + { + "name": "7.2.1", + "images": { + "hda_disk_image": "FMG_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "empty30G.qcow2" + } + }, { "name": "6.4.5", "images": { diff --git a/gns3server/appliances/fortiproxy.gns3a b/gns3server/appliances/fortiproxy.gns3a index 93de1f51..a03f9cce 100644 --- a/gns3server/appliances/fortiproxy.gns3a +++ b/gns3server/appliances/fortiproxy.gns3a @@ -27,6 +27,13 @@ "kvm": "allow" }, "images": [ + { + "filename": "FPX_KVM-v700.M-build0102-FORTINET.out.kvm.qcow2", + "version": "7.0.6", + "md5sum": "ad0a4612580b5a2754cc4e0121a9cf22", + "filesize": 146800640, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FPX_KVM-v100-build0162-FORTINET.out.kvm.qcow2", "version": "1.1.2", @@ -51,6 +58,13 @@ } ], "versions": [ + { + "name": "7.0.6", + "images": { + "hda_disk_image": "FPX_KVM-v700.M-build0102-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "empty30G.qcow2" + } + }, { "name": "1.1.2", "images": { diff --git a/gns3server/appliances/fortisandbox.gns3a b/gns3server/appliances/fortisandbox.gns3a index 6d352117..6fa98c51 100644 --- a/gns3server/appliances/fortisandbox.gns3a +++ b/gns3server/appliances/fortisandbox.gns3a @@ -28,6 +28,13 @@ "options": "-smp 2" }, "images": [ + { + "filename": "FSA_KVM-v400-build0231-FORTINET.out.kvm.qcow2", + "version": "4.2.2", + "md5sum": "02b7f49e3c04861601a7af26452eed66", + "filesize": 156172304, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FSA_KVM-v300-build0124-FORTINET.out.kvm.qcow2", "version": "3.1.2", @@ -114,6 +121,13 @@ } ], "versions": [ + { + "name": "4.2.2", + "images": { + "hda_disk_image": "FSA_KVM-v400-build0231-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "FSA-datadrive.qcow2" + } + }, { "name": "3.1.2", "images": { diff --git a/gns3server/appliances/fortiweb.gns3a b/gns3server/appliances/fortiweb.gns3a index a0924bec..6a39036d 100644 --- a/gns3server/appliances/fortiweb.gns3a +++ b/gns3server/appliances/fortiweb.gns3a @@ -27,6 +27,13 @@ "kvm": "allow" }, "images": [ + { + "filename": "FWB_KVM-v700-build0097-FORTINET.out.kvm.qcow2", + "version": "7.0.1", + "md5sum": "a197e9db03ffaf7feb520c8f77f940f7", + "filesize": 257622528, + "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" + }, { "filename": "FWB_KVM-v600-build0727-FORTINET.out.kvm.qcow2", "version": "6.2.1", @@ -121,6 +128,13 @@ } ], "versions": [ + { + "name": "7.0.1", + "images": { + "hda_disk_image": "FWB_KVM-v700-build0097-FORTINET.out.kvm.qcow2", + "hdb_disk_image": "empty30G.qcow2" + } + }, { "name": "6.2.1", "images": { diff --git a/gns3server/appliances/huawei-ar1kv.gns3a b/gns3server/appliances/huawei-ar1kv.gns3a index fdb1c9d1..f98698a7 100644 --- a/gns3server/appliances/huawei-ar1kv.gns3a +++ b/gns3server/appliances/huawei-ar1kv.gns3a @@ -11,7 +11,7 @@ "status": "experimental", "availability": "service-contract", "maintainer": "none", - "maintainer_email": "none", + "maintainer_email": "", "usage": "Default user is super, default password is super.", "port_name_format": "GigabitEthernet0/0/{0}", "qemu": { diff --git a/gns3server/appliances/huawei-ce12800.gns3a b/gns3server/appliances/huawei-ce12800.gns3a index cf5cf6fb..8626d8cb 100644 --- a/gns3server/appliances/huawei-ce12800.gns3a +++ b/gns3server/appliances/huawei-ce12800.gns3a @@ -10,7 +10,7 @@ "status": "experimental", "availability": "service-contract", "maintainer": "none", - "maintainer_email": "none", + "maintainer_email": "", "port_name_format": "GE1/0/{0}", "qemu": { "adapter_type": "e1000", diff --git a/gns3server/appliances/huawei-ne40e.gns3a b/gns3server/appliances/huawei-ne40e.gns3a index 8a039a7c..4248f204 100644 --- a/gns3server/appliances/huawei-ne40e.gns3a +++ b/gns3server/appliances/huawei-ne40e.gns3a @@ -11,7 +11,7 @@ "status": "experimental", "availability": "service-contract", "maintainer": "none", - "maintainer_email": "none", + "maintainer_email": "", "first_port_name": "eth0", "port_name_format": "Ethernet1/0/{0}", "qemu": { diff --git a/gns3server/appliances/huawei-usg6kv.gns3a b/gns3server/appliances/huawei-usg6kv.gns3a index f2d0506c..010a4039 100644 --- a/gns3server/appliances/huawei-usg6kv.gns3a +++ b/gns3server/appliances/huawei-usg6kv.gns3a @@ -11,7 +11,7 @@ "status": "experimental", "availability": "service-contract", "maintainer": "none", - "maintainer_email": "none", + "maintainer_email": "", "usage": "Default password is admin. Default username and password for web is admin/Admin@123.", "first_port_name": "GigabitEthernet0/0/0", "port_name_format": "GigabitEthernet1/0/{0}", diff --git a/gns3server/appliances/juniper-vmx-vfp.gns3a b/gns3server/appliances/juniper-vmx-vfp.gns3a index 626a3c3c..11708d3c 100644 --- a/gns3server/appliances/juniper-vmx-vfp.gns3a +++ b/gns3server/appliances/juniper-vmx-vfp.gns3a @@ -12,13 +12,13 @@ "status": "experimental", "maintainer": "none", "maintainer_email": "developers@gns3.net", - "usage": "Initial username is root, password is root.\n", + "usage": "Connect VCP by port Eth1.\nData port ge/xe-x/0/0 to ge/xe-x/0/9 mapping to Eth3 to Eth12.\nInitial username is root, password is root.\n", "symbol": "juniper-vmx.svg", "first_port_name": "Eth0", "port_name_format": "Eth{port1}", "qemu": { "adapter_type": "virtio-net-pci", - "adapters": 12, + "adapters": 13, "ram": 4096, "hda_disk_interface": "ide", "arch": "x86_64", diff --git a/gns3server/appliances/juniper-vrr.gns3a b/gns3server/appliances/juniper-vrr.gns3a index f1892c30..acfe6a9c 100644 --- a/gns3server/appliances/juniper-vrr.gns3a +++ b/gns3server/appliances/juniper-vrr.gns3a @@ -28,6 +28,18 @@ "options": "-nographic -enable-kvm" }, "images": [ + { + "filename": "junos-x86-64-20.4R3.8.img", + "version": "20.4R3.8-KVM", + "md5sum": "69638ba0ad83d7a99a28b658b1dd8def", + "filesize": 2773090304 + }, + { + "filename": "metadata.img", + "version": "20.4R3.8-KVM", + "md5sum": "ae4e3562aa389929476d82420c79d511", + "filesize": 393216 + }, { "filename": "junos-x86-64-20.3R1.8.img", "version": "20.3R1.8-KVM", @@ -42,6 +54,13 @@ } ], "versions": [ + { + "name": "20.4R3.8-KVM", + "images": { + "hda_disk_image": "junos-x86-64-20.4R3.8.img", + "hdb_disk_image": "metadata.img" + } + }, { "name": "20.3R1.8-KVM", "images": { diff --git a/gns3server/appliances/mikrotik-chr.gns3a b/gns3server/appliances/mikrotik-chr.gns3a index 4175e369..69092601 100644 --- a/gns3server/appliances/mikrotik-chr.gns3a +++ b/gns3server/appliances/mikrotik-chr.gns3a @@ -28,81 +28,81 @@ }, "images": [ { - "filename": "chr-7.1rc7.img", - "version": "7.1rc7", - "md5sum": "04bc0ae1e5fbbda1522135bc57cf6560", + "filename": "chr-7.4rc2.img", + "version": "7.4rc2", + "md5sum": "ddb107c95cc7d231f8d8bbdb4eebdab6", "filesize": 134217728, "download_url": "http://www.mikrotik.com/download", - "direct_download_url": "https://download.mikrotik.com/routeros/7.1rc7/chr-7.1rc7.img.zip", + "direct_download_url": "https://download.mikrotik.com/routeros/7.4rc2/chr-7.4rc2.img.zip", "compression": "zip" }, { - "filename": "chr-7.1.img", - "version": "7.1", - "md5sum": "41545bc7b55717fe5bb1e489ee39ca45", + "filename": "chr-7.3.1.img", + "version": "7.3.1", + "md5sum": "99f8ea75f8b745a8bf5ca3cc1bd325e3", "filesize": 134217728, "download_url": "http://www.mikrotik.com/download", - "direct_download_url": "https://download.mikrotik.com/routeros/7.1/chr-7.1.img.zip", + "direct_download_url": "https://download.mikrotik.com/routeros/7.3.1/chr-7.3.1.img.zip", "compression": "zip" }, { - "filename": "chr-6.49rc2.img", - "version": "6.49rc2", - "md5sum": "e1088f8f64ac3d6ecf2e56ac96261226", - "filesize": 67108864, + "filename": "chr-7.1.5.img", + "version": "7.1.5", + "md5sum": "9c0be05f891df2b1400bdae5e719898e", + "filesize": 134217728, "download_url": "http://www.mikrotik.com/download", - "direct_download_url": "https://download.mikrotik.com/routeros/6.49rc2/chr-6.49rc2.img.zip", + "direct_download_url": "https://download.mikrotik.com/routeros/7.1.5/chr-7.1.5.img.zip", "compression": "zip" }, { - "filename": "chr-6.49.1.img", - "version": "6.49.1", - "md5sum": "6c896c4c853de99f2ea77f0f4b102261", + "filename": "chr-6.49.6.img", + "version": "6.49.6", + "md5sum": "ae27d38acc9c4dcd875e0f97bcae8d97", "filesize": 67108864, "download_url": "http://www.mikrotik.com/download", - "direct_download_url": "https://download.mikrotik.com/routeros/6.49.1/chr-6.49.1.img.zip", + "direct_download_url": "https://download.mikrotik.com/routeros/6.49.6/chr-6.49.6.img.zip", "compression": "zip" }, { - "filename": "chr-6.48.5.img", - "version": "6.48.5", - "md5sum": "d14debd4cd989f16f695b5b075960703", + "filename": "chr-6.48.6.img", + "version": "6.48.6", + "md5sum": "875574a561570227ff8f395aabe478c6", "filesize": 67108864, "download_url": "http://www.mikrotik.com/download", - "direct_download_url": "https://download.mikrotik.com/routeros/6.48.5/chr-6.48.5.img.zip", + "direct_download_url": "https://download.mikrotik.com/routeros/6.48.6/chr-6.48.6.img.zip", "compression": "zip" } ], "versions": [ { - "name": "7.1rc7", + "name": "7.4rc2", "images": { - "hda_disk_image": "chr-7.1rc7.img" + "hda_disk_image": "chr-7.4rc2.img" } }, { - "name": "7.1", + "name": "7.3.1", "images": { - "hda_disk_image": "chr-7.1.img" + "hda_disk_image": "chr-7.3.1.img" } }, { - "name": "6.49rc2", + "name": "7.1.5", "images": { - "hda_disk_image": "chr-6.49rc2.img" + "hda_disk_image": "chr-7.1.5.img" } }, { - "name": "6.49.1", + "name": "6.49.6", "images": { - "hda_disk_image": "chr-6.49.1.img" + "hda_disk_image": "chr-6.49.6.img" } }, { - "name": "6.48.5", + "name": "6.48.6", "images": { - "hda_disk_image": "chr-6.48.5.img" + "hda_disk_image": "chr-6.48.6.img" } } ] -} +} \ No newline at end of file diff --git a/gns3server/appliances/netem.gns3a b/gns3server/appliances/netem.gns3a index 85302f39..ce071fa8 100644 --- a/gns3server/appliances/netem.gns3a +++ b/gns3server/appliances/netem.gns3a @@ -29,8 +29,8 @@ "version": "0.4", "md5sum": "e678698c97804901c7a53f6b68c8b861", "filesize": 26476544, - "download_url": "https://www.b-ehlers.de/projects/netem/index.html", - "direct_download_url": "https://www.b-ehlers.de/projects/netem/NETem-v4.qcow2" + "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/", + "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/NETem-v4.qcow2/download" } ], "versions": [ diff --git a/gns3server/appliances/raspian.gns3a b/gns3server/appliances/raspian.gns3a index e3973693..0c4cafca 100644 --- a/gns3server/appliances/raspian.gns3a +++ b/gns3server/appliances/raspian.gns3a @@ -15,7 +15,7 @@ "usage": "Default password is raspberry", "symbol": "rpi.png", "qemu": { - "adapter_type": "virtio", + "adapter_type": "e1000", "adapters": 1, "ram": 1024, "hda_disk_interface": "sata", @@ -25,6 +25,20 @@ }, "images": [ { + "filename": "2022-07-01-raspios-bullseye-i386.iso", + "version": "2022-07-01", + "md5sum": "e57f42852306ac5ed0d9e97bdc3513cb", + "filesize": 3607101440, + "download_url": "https://www.raspberrypi.org/downloads/raspberry-pi-desktop/" + }, + { + "filename": "2021-01-11-raspios-buster-i386.iso", + "version": "2021-01-11", + "md5sum": "14c0b29c393adee45b90d265b3243564", + "filesize": 3091660800, + "download_url": "https://www.raspberrypi.org/downloads/raspberry-pi-desktop/" + }, + { "filename": "2020-02-12-rpd-x86-buster.iso", "version": "2020-02-12", "md5sum": "98f34fb53086752b4c9c452094f30740", @@ -41,6 +55,20 @@ ], "versions": [ { + "name": "2022-07-01", + "images": { + "hda_disk_image": "empty8G.qcow2", + "cdrom_image": "2022-07-01-raspios-bullseye-i386.iso" + } + }, + { + "name": "2021-01-11", + "images": { + "hda_disk_image": "empty8G.qcow2", + "cdrom_image": "2021-01-11-raspios-buster-i386.iso" + } + }, + { "name": "2020-02-12", "images": { "hda_disk_image": "empty8G.qcow2", diff --git a/gns3server/appliances/ubuntu-cloud.gns3a b/gns3server/appliances/ubuntu-cloud.gns3a index c31af598..d0ddd03e 100644 --- a/gns3server/appliances/ubuntu-cloud.gns3a +++ b/gns3server/appliances/ubuntu-cloud.gns3a @@ -26,6 +26,13 @@ "options": "-nographic" }, "images": [ + { + "filename": "ubuntu-22.04-server-cloudimg-amd64.img", + "version": "22.04 (LTS)", + "md5sum": "ac2351289daa173fa1ed6b2b81d81d7c", + "filesize": 624295936, + "download_url": "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img" + }, { "filename": "ubuntu-20.04-server-cloudimg-amd64.img", "version": "20.04 (LTS)", @@ -70,6 +77,13 @@ } ], "versions": [ + { + "name": "22.04 (LTS)", + "images": { + "hda_disk_image": "ubuntu-22.04-server-cloudimg-amd64.img", + "cdrom_image": "ubuntu-cloud-init-data.iso" + } + }, { "name": "20.04 (LTS)", "images": { diff --git a/gns3server/appliances/ubuntu-server.gns3a b/gns3server/appliances/ubuntu-server.gns3a index 13cabbed..534be61c 100644 --- a/gns3server/appliances/ubuntu-server.gns3a +++ b/gns3server/appliances/ubuntu-server.gns3a @@ -11,7 +11,7 @@ "registry_version": 3, "status": "stable", "maintainer": "Mohamad Siblini", - "maintainer_email": "https://www.ictkin.com/contact", + "maintainer_email": "info@ictkin.com", "usage": "Username: gns3\nPassword: gns3 | MD5: 435f15a54f7f673e302ad26f05226e0e", "port_name_format": "ens{0}", "qemu": { From 8d4df08150cd87e0a31bd59eee2975daff9827b9 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 28 Aug 2022 23:28:12 +0200 Subject: [PATCH 21/21] Release v2.2.34 --- CHANGELOG | 7 +++++++ gns3server/crash_report.py | 2 +- gns3server/version.py | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 255471b4..bf59e33f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,12 @@ # Change Log +## 2.2.34 28/08/2022 + +* Use original $PATH in init.sh for Docker containers. Ref #2069 +* Support pytest-asyncio 0.19.0 +* Upgrade dev dependencies and fix issues after upgrading to pytest-aiohttp v1.0.4 +* Update compute.py + ## 2.2.33.1 21/06/2022 * Add missing file for web-ui v2.2.33 diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py index 983267e8..31d4b37e 100644 --- a/gns3server/crash_report.py +++ b/gns3server/crash_report.py @@ -58,7 +58,7 @@ class CrashReport: Report crash to a third party service """ - DSN = "https://0d263705382642f287a1ed05fce61171@o19455.ingest.sentry.io/38482" + DSN = "https://3f074423e7664595923ae5895b0819c4@o19455.ingest.sentry.io/38482" _instance = None def __init__(self): diff --git a/gns3server/version.py b/gns3server/version.py index 8324414e..bdef617c 100644 --- a/gns3server/version.py +++ b/gns3server/version.py @@ -23,8 +23,8 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.34dev2" -__version_info__ = (2, 2, 34, 99) +__version__ = "2.2.34" +__version_info__ = (2, 2, 34, 0) if "dev" in __version__: try: