1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-04-20 01:29:01 +00:00

Compare commits

..

50 Commits

Author SHA1 Message Date
Jeremy Grossmann
483719568f
Merge pull request #2511 from NAKNAO-nnct/feature/update-dockerfile-ubuntu-2404
Update Dockerfile base image to Ubuntu 24.04
2025-03-08 20:26:12 +07:00
NAKNAO-nnct
018598a300 refactor 2025-03-08 20:22:06 +09:00
NAKNAO-nnct
e262a46cfd rm space 2025-03-08 20:19:37 +09:00
NAKNAO-nnct
00bf1c028b Update README to Run Docker Compose 2025-03-08 14:11:42 +09:00
NAKNAO-nnct
21ebb934f4 add compose.yaml 2025-03-08 14:08:42 +09:00
NAKNAO-nnct
2ecd2cfe3b update Ubuntu24.04 2025-03-08 13:59:05 +09:00
Jeremy Grossmann
ce4b3091dd
Merge pull request #2507 from GNS3/fix-remote-install-script
Improvements for remote-install.sh
2025-03-03 05:55:42 +07:00
grossmj
f722816849
Improvements for remote-install.sh
* Use apt-add-repository to install repository
* Add option to not upgrade the system
* Check if Python version is >= 3.9 when installing from ppa-v3 repository
2025-03-02 22:27:53 +07:00
Jeremy Grossmann
4cb38b23eb
Merge pull request #2506 from FedericoTorres233/patch-1
Check if remote-install.sh is being run as root
2025-03-02 16:14:33 +08:00
Federico Torres
f3e46227d8
fix: check if remote-install.sh is being run as root 2025-03-01 16:56:21 -03:00
Jeremy Grossmann
185cd01e19
Merge pull request #2488 from GNS3/release/v2.2.53
Release v2.2.53
2025-01-21 09:47:43 +07:00
grossmj
369fcaa512
Release v2.2.53 2025-01-21 11:52:11 +10:00
grossmj
7b7d3d676f
Bundle web-ui v2.2.53 2025-01-21 11:43:11 +10:00
grossmj
d1186b2acc
Sync appliances 2025-01-21 11:29:28 +10:00
grossmj
bd58196817
Add more information when patching .vbox file. Ref https://github.com/GNS3/gns3-gui/issues/3542 2025-01-20 13:22:22 +10:00
grossmj
ccc8974d92
Fix tests 2024-12-30 16:14:33 +07:00
grossmj
0090ff3722
Increase timeout to run compute HTTP queries. Fixes #2461 2024-12-30 16:10:04 +07:00
grossmj
2c727c6bd2
Use 'allow_methods="*"' in aiohttp_cors.ResourceOptions(). Fixes #2459 2024-12-30 11:06:19 +07:00
grossmj
13b0caef4f
Upgrade dependencies 2024-12-30 10:49:35 +07:00
grossmj
8ed1fa6ad5
Merge branch 'master' into 2.2 2024-12-28 18:03:39 +07:00
Jeremy Grossmann
a689a55937
Merge pull request #2467 from GNS3/update-remote-install-script
Use iptables to block IOU home call
2024-12-28 18:01:25 +07:00
grossmj
1c0b0ae423
Remove blocking IOU phone home call. 2024-12-28 18:00:22 +07:00
grossmj
ad7813d04b
Use iptables to block IOU home call 2024-12-28 17:50:59 +07:00
Jeremy Grossmann
685bf88005
Merge pull request #2457 from GNS3/update-remote-install-script
Update remote install script
2024-12-22 22:07:33 +07:00
grossmj
a1090a3da8
Fallback when cannot use deb822 format 2024-12-22 21:52:18 +07:00
grossmj
c8e5b41f39
Add compatibility for earlier Ubuntu versions 2024-12-22 21:29:05 +07:00
grossmj
94b5d3e636
Update remote-install.sh to support a custom repository and the deb822 source format 2024-12-22 20:26:24 +07:00
grossmj
df56955bf0
Use license instead of licence 2024-12-17 15:01:01 +07:00
grossmj
423d3fd82b
Fix tests 2024-12-16 18:30:30 +07:00
grossmj
86fbae00e1
Fix issue with iourc_path 2024-12-16 18:16:42 +07:00
grossmj
91e9fa1cbc
Fix tests 2024-12-16 18:13:51 +07:00
grossmj
6314dd3c35
Fix: do not use the iourc file if IOU licence check is not enabled 2024-12-16 18:07:02 +07:00
Jeremy Grossmann
e94b55e3bf
Merge pull request #2452 from GNS3/release/v2.2.52
release/v2.2.52
2024-12-02 11:36:09 +10:00
grossmj
6c521b5f7a
Development on 2.2.53.dev1 2024-12-02 11:33:59 +10:00
grossmj
a8014da10b
Release v2.2.52 2024-12-02 11:14:23 +10:00
grossmj
f6080013e3
Bundle web-ui v2.2.52 2024-12-02 11:09:30 +10:00
grossmj
fc54c6e496
Sync appliances 2024-12-02 11:02:47 +10:00
Jeremy Grossmann
04cd107651
Merge pull request #2448 from GNS3/bugfix/3664
Fix listing images
2024-11-28 12:45:37 +10:00
grossmj
19cabdfde6
Use log.debug for some messages in images.py 2024-11-28 12:42:50 +10:00
grossmj
af7fbe6bb4
Fix tests 2024-11-27 15:18:49 +10:00
grossmj
3d58b437b4
Remove restrictions based on file extension when listing images and fix ELF header checks 2024-11-27 14:51:34 +10:00
grossmj
83921a45df
Fix use project name instead of ID for fast duplication when running local server. Fixes #2446 2024-11-26 12:07:06 +10:00
Jeremy Grossmann
11c9802268
Merge pull request #2443 from GNS3/feature/upgrade-resource-files
Overwrite user resources when the originals have changed
2024-11-10 18:30:13 +10:00
grossmj
a60e0d424d
Overwrite user resources when the originals have changed.
Excepting configs and disks which can be customized.
2024-11-09 12:17:06 +10:00
grossmj
db1fb29c63
Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy 2024-11-08 12:46:55 +10:00
Jeremy Grossmann
1a6a729736
Merge pull request #2442 from Xatrekak/master
Fixed issues with installing on Ubuntu 24.04 via remote-install.sh
2024-11-08 10:02:43 +10:00
Dustin
77c356c82c
Update remote-install.sh
Fixes for Ubuntu 24.04
2024-11-07 18:15:52 -05:00
Dustin
b4819b5500
Update remote-install.sh
Fixing changes for Ubuntu 24.04
2024-11-07 17:44:42 -05:00
grossmj
a5f0dba5cf
Development on 2.2.52.dev1 2024-11-07 23:13:31 +10:00
Jeremy Grossmann
11a9451098
Merge pull request #2440 from GNS3/release/v2.2.51
release/v2.2.51
2024-11-07 23:13:03 +10:00
41 changed files with 876 additions and 857 deletions

View File

@ -1,5 +1,24 @@
# Change Log
## 2.2.53 21/01/2025
* Bundle web-ui v2.2.53
* Add more information when patching .vbox file. Ref https://github.com/GNS3/gns3-gui/issues/3542
* Increase timeout to run compute HTTP queries. Fixes #2461
* Use 'allow_methods="*"' in aiohttp_cors.ResourceOptions(). Fixes #2459
* Upgrade dependencies
* Update remote-install.sh to support a custom repository and the deb822 source format
* Fix: do not use the iourc file if IOU licence check is not enabled
## 2.2.52 02/12/2024
* Bundle web-ui v2.2.52
* Remove restrictions based on file extension when listing images and fix ELF header checks
* Fix use project name instead of ID for fast duplication when running local server. Fixes #2446
* Overwrite user resources when the originals have changed.
* Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy
## 2.2.51 07/11/2024
* Catch error when cannot resize Docker container TTY.

View File

@ -1,24 +1,27 @@
# Dockerfile for GNS3 server development
FROM ubuntu:18.04
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Set the locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# this environment is externally managed
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:gns3/ppa
RUN apt-get update && apt-get install -y \
locales \
python3-pip \
python3-dev \
python3-dev \
qemu-system-x86 \
qemu-kvm \
libvirt-bin \
x11vnc
libvirt-daemon-system libvirt-clients \
x11vnc
RUN locale-gen en_US.UTF-8
@ -32,4 +35,4 @@ RUN pip3 install --no-cache-dir -r /server/requirements.txt
EXPOSE 3080
CMD python3 -m gns3server
CMD [ "python3", "-m", "gns3server", "--port", "3080" ]

View File

@ -112,6 +112,12 @@ For development, you can run the GNS3 server in a container
bash scripts/docker_dev_server.sh
```
#### use Docker Compose
``` {.bash}
docker compose up -d
```
### Run as daemon (Unix only)
You will find init sample scripts for various systems inside the init

7
compose.yaml Normal file
View File

@ -0,0 +1,7 @@
services:
gen3-server:
build:
context: .
dockerfile: Dockerfile
ports:
- "8001:3080"

View File

@ -0,0 +1,56 @@
{
"appliance_id": "edbaa01e-2032-4ee2-bb9f-dd5c4d84c270",
"name": "Alpine Cloud Guest",
"category": "guest",
"description": "Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.",
"vendor_name": "Alpine Linux Development Team",
"vendor_url": "http://alpinelinux.org",
"vendor_logo_url": "https://raw.githubusercontent.com/GNS3/gns3-registry/master/vendor-logos/Alpine Linux.png",
"documentation_url": "http://wiki.alpinelinux.org",
"product_name": "Alpine Linux",
"product_url": "https://www.alpinelinux.org/cloud/",
"registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "\nUsername: alpine\nPassword: alpine",
"port_name_format": "Ethernet{0}",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 1,
"ram": 1024,
"hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
"boot_priority": "c",
"kvm": "require",
"options": "-nographic"
},
"images": [
{
"filename": "generic_alpine-3.21.2-x86_64-bios-cloudinit-r0.qcow2",
"version": "3.21.2",
"md5sum": "b40825dff2867e0ffaffbc4c87674462",
"filesize": 189726720,
"download_url": "https://www.alpinelinux.org/cloud/",
"direct_download_url": "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/cloud/generic_alpine-3.21.2-x86_64-bios-cloudinit-r0.qcow2"
},
{
"filename": "alpine-cloud-init-data.iso",
"version": "1.0",
"md5sum": "b1b4b16cc3bf0250c0fa377c19c97683",
"filesize": 374784,
"download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/alpine-cloud",
"direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/alpine-cloud/alpine-cloud-init-data.iso"
}
],
"versions": [
{
"name": "3.21.2",
"images": {
"hda_disk_image": "generic_alpine-3.21.2-x86_64-bios-cloudinit-r0.qcow2",
"cdrom_image": "alpine-cloud-init-data.iso"
}
}
]
}

View File

@ -2,14 +2,14 @@
"appliance_id": "c90f3ff3-4ed2-4437-9afb-21232fa92015",
"name": "Arista vEOS",
"category": "multilayer_switch",
"description": "Arista EOS\u00ae is the core of Arista cloud networking solutions for next-generation data centers and cloud networks. Cloud architectures built with Arista EOS scale to tens of thousands of compute and storage nodes with management and provisioning capabilities that work at scale. Through its programmability, EOS enables a set of software applications that deliver workflow automation, high availability, unprecedented network visibility and analytics and rapid integration with a wide range of third-party applications for virtualization, management, automation and orchestration services.\n\nArista Extensible Operating System (EOS) is a fully programmable and highly modular, Linux-based network operation system, using familiar industry standard CLI and runs a single binary software image across the Arista switching family. Architected for resiliency and programmability, EOS has a unique multi-process state sharing architecture that separates state information and packet forwarding from protocol processing and application logic.",
"description": "Arista EOS is the core of Arista cloud networking solutions for next-generation data centers and cloud networks. Cloud architectures built with Arista EOS scale to tens of thousands of compute and storage nodes with management and provisioning capabilities that work at scale. Through its programmability, EOS enables a set of software applications that deliver workflow automation, high availability, unprecedented network visibility and analytics and rapid integration with a wide range of third-party applications for virtualization, management, automation and orchestration services.\n\nArista Extensible Operating System (EOS) is a fully programmable and highly modular, Linux-based network operation system, using familiar industry standard CLI and runs a single binary software image across the Arista switching family. Architected for resiliency and programmability, EOS has a unique multi-process state sharing architecture that separates state information and packet forwarding from protocol processing and application logic.",
"vendor_name": "Arista",
"vendor_url": "http://www.arista.com/",
"documentation_url": "https://www.arista.com/assets/data/docs/Manuals/EOS-4.17.2F-Manual.pdf",
"product_name": "vEOS",
"product_url": "https://eos.arista.com/",
"registry_version": 4,
"status": "experimental",
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "The login is admin, with no password by default",
@ -29,87 +29,24 @@
},
"images": [
{
"filename": "vEOS64-lab-4.32.0F.vmdk",
"version": "4.32.0F",
"md5sum": "851771260bb18ad3e90fa6956f0c6161",
"filesize": 591724544,
"filename": "vEOS-lab-4.33.1F.qcow2",
"version": "4.33.1F",
"md5sum": "8f662409c0732ed9f682edce63601e8a",
"filesize": 611909632,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS64-lab-4.31.3M.vmdk",
"version": "4.31.3M",
"md5sum": "7df107da137f4a4e752014d4f0e94cd3",
"filesize": 577961984,
"filename": "vEOS-lab-4.32.3M.qcow2",
"version": "4.32.3M",
"md5sum": "46fc46f5ed1da8752eed8396f08862f8",
"filesize": 605683712,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS64-lab-4.30.6M.vmdk",
"version": "4.30.6M",
"md5sum": "19721aace820b9ebf6d7ae6524803cf5",
"filesize": 553123840,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS64-lab-4.29.8M.vmdk",
"version": "4.29.8M",
"md5sum": "131888f74cd63a93894521d40eb4d0b6",
"filesize": 548405248,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS64-lab-4.28.11M.vmdk",
"version": "4.28.11M",
"md5sum": "6cac0e7b04a74ee0dc358327a00accfd",
"filesize": 513343488,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS64-lab-4.27.12M.vmdk",
"version": "4.27.12M",
"md5sum": "34c4f785c7fc054cda8754dd13c0d7c7",
"filesize": 496697344,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.32.0F.vmdk",
"version": "4.32.0F",
"md5sum": "584b901a1249717504050e48f74fb8dd",
"filesize": 591396864,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.31.3M.vmdk",
"version": "4.31.3M",
"md5sum": "a2e130697cdf8547006eebebde6eefca",
"filesize": 590086144,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.30.6M.vmdk",
"version": "4.30.6M",
"md5sum": "a4467648bcfa7b19640af8a4ad3153c6",
"filesize": 565968896,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.29.8M.vmdk",
"version": "4.29.8M",
"md5sum": "1952f6114a4376212c525db9ec8efd5f",
"filesize": 558039040,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.28.11M.vmdk",
"version": "4.28.11M",
"md5sum": "5502df24dfc231c45afb33d6018c16d0",
"filesize": 521338880,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.27.12M.vmdk",
"version": "4.27.12M",
"md5sum": "e08a97e7c1977993f947fedeb4c6ddd5",
"filesize": 504299520,
"filename": "vEOS-lab-4.31.6M.qcow2",
"version": "4.31.6M",
"md5sum": "7410110b77472f058322ec4681f8a356",
"filesize": 590479360,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
@ -118,459 +55,28 @@
"md5sum": "8d7e754efebca1930a93a2587ff7606c",
"filesize": 6291456,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.26.2F.vmdk",
"version": "4.26.2F",
"md5sum": "de8ce9750fddb63bd3f71bccfcd7651e",
"filesize": 475332608,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.25.3M.vmdk",
"version": "4.25.3M",
"md5sum": "2f196969036b4d283e86f15118d59c26",
"filesize": 451543040,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.24.3M.vmdk",
"version": "4.24.3M",
"md5sum": "0a28e44c7ce4a8965f24a4a463a89b7d",
"filesize": 455213056,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.24.2.1F.vmdk",
"version": "4.24.2.1F",
"md5sum": "6bab8b59ce5230e243e56f4127448fc8",
"filesize": 455213056,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.23.4.2M.vmdk",
"version": "4.23.4.2M",
"md5sum": "d21cbef4e39f1e783b13a926cb54a242",
"filesize": 454295552,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.23.0.1F.vmdk",
"version": "4.23.0.1F",
"md5sum": "08d52154aa11a834aef9f42bbf29f977",
"filesize": 439484416,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.22.2.1F.vmdk",
"version": "4.22.2.1F",
"md5sum": "2a425bf8efe569a2bdf0e328f240cd16",
"filesize": 426377216,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.22.0F.vmdk",
"version": "4.22.0F",
"md5sum": "cfcc75c2b8176cfd819afcfd6799b74c",
"filesize": 414121984,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.21.1.1F.vmdk",
"version": "4.21.1F",
"md5sum": "02bfb7e53781fd44ff02357f201586d9",
"filesize": 358809600,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.20.10M-combined.vmdk",
"version": "4.20.10M-combined",
"md5sum": "d1f2d650f93dbf24e04fdd2c9d62bd62",
"filesize": 334626816,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.20.1F.vmdk",
"version": "4.20.1F",
"md5sum": "aadb6f3dbff28317f68cb4c4502d0db8",
"filesize": 662044672,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.19.10M-combined.vmdk",
"version": "4.19.10M-combined",
"md5sum": "103daa45c33be4584cbe6adc60de46a3",
"filesize": 324141056,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.19.10M.vmdk",
"version": "4.19.10M",
"md5sum": "665ed14389411ae5f16ba0a2ff84240a",
"filesize": 637337600,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.18.10M-combined.vmdk",
"version": "4.18.10M-combined",
"md5sum": "e33e0ef5b8cecc84c5bb57569b36b9c6",
"filesize": 317652992,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.18.10M.vmdk",
"version": "4.18.10M",
"md5sum": "1d87e9ace37fe3706dbf3e49c8d4d231",
"filesize": 624427008,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.18.5M.vmdk",
"version": "4.18.5M",
"md5sum": "b1ee6268dbaf2b2276fd7a5286c7ce2b",
"filesize": 623116288,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.18.1F.vmdk",
"version": "4.18.1F",
"md5sum": "9648c63185f3b793b47528a858ca4364",
"filesize": 620625920,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.17.8M.vmdk",
"version": "4.17.8M",
"md5sum": "afc79a06f930ea2cc0ae3e03cbfd3f23",
"filesize": 608829440,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.17.2F.vmdk",
"version": "4.17.2F",
"md5sum": "3b4845edfa77cf9aaeb9c0a005d3e277",
"filesize": 609615872,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.16.13M.vmdk",
"version": "4.16.13M",
"md5sum": "4d0facf90140fc3aab031f0f8f88a32f",
"filesize": 521404416,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.16.6M.vmdk",
"version": "4.16.6M",
"md5sum": "b3f7b7cee17f2e66bb38b453a4939fef",
"filesize": 519962624,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.15.10M.vmdk",
"version": "4.15.10M",
"md5sum": "98e08281a9c48ddf6f3c5d62a124a20f",
"filesize": 517079040,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.15.5M.vmdk",
"version": "4.15.5M",
"md5sum": "cd74bb69c7ee905ac3d33c4d109f3ab7",
"filesize": 516030464,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.14.14M.vmdk",
"version": "4.14.14M",
"md5sum": "d81ba0522f4d7838d96f7985e41cdc47",
"filesize": 422641664,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.13.16M.vmdk",
"version": "4.13.16M",
"md5sum": "5763b2c043830c341c8b1009f4ea9a49",
"filesize": 404684800,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "vEOS-lab-4.13.8M.vmdk",
"version": "4.13.8M",
"md5sum": "a47145b9e6e7a24171c0850f8755535e",
"filesize": 409010176,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "Aboot-veos-serial-8.0.0.iso",
"version": "8.0.0",
"md5sum": "488ad1c435d18c69bb8d69c7806457c9",
"filesize": 5242880,
"download_url": "https://www.arista.com/en/support/software-download"
}
],
"versions": [
{
"name": "4.32.0F",
"name": "4.33.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.32.0F.vmdk"
"hdb_disk_image": "vEOS-lab-4.33.1F.qcow2"
}
},
{
"name": "4.31.3M",
"name": "4.32.3M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.31.3M.vmdk"
"hdb_disk_image": "vEOS-lab-4.32.3M.qcow2"
}
},
{
"name": "4.30.6M",
"name": "4.31.6M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.30.6M.vmdk"
}
},
{
"name": "4.29.8M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.29.8M.vmdk"
}
},
{
"name": "4.28.11M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.28.11M.vmdk"
}
},
{
"name": "4.27.12M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.27.12M.vmdk"
}
},
{
"name": "4.32.0F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS-lab-4.32.0F.vmdk"
}
},
{
"name": "4.31.3M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS-lab-4.31.3M.vmdk"
}
},
{
"name": "4.30.6M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS-lab-4.30.6M.vmdk"
}
},
{
"name": "4.29.8M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS-lab-4.29.8M.vmdk"
}
},
{
"name": "4.28.11M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS-lab-4.28.11M.vmdk"
}
},
{
"name": "4.27.12M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS-lab-4.27.12M.vmdk"
}
},
{
"name": "4.26.2F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.26.2F.vmdk"
}
},
{
"name": "4.25.3M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.25.3M.vmdk"
}
},
{
"name": "4.24.3M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.24.3M.vmdk"
}
},
{
"name": "4.24.2.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.24.2.1F.vmdk"
}
},
{
"name": "4.23.4.2M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.23.4.2M.vmdk"
}
},
{
"name": "4.23.0.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.23.0.1F.vmdk"
}
},
{
"name": "4.22.2.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.22.2.1F.vmdk"
}
},
{
"name": "4.22.0F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.22.0F.vmdk"
}
},
{
"name": "4.21.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.21.1.1F.vmdk"
}
},
{
"name": "4.20.10M-combined",
"images": {
"hda_disk_image": "vEOS-lab-4.20.10M-combined.vmdk"
}
},
{
"name": "4.20.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.20.1F.vmdk"
}
},
{
"name": "4.19.10M-combined",
"images": {
"hda_disk_image": "vEOS-lab-4.19.10M-combined.vmdk"
}
},
{
"name": "4.19.10M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.19.10M.vmdk"
}
},
{
"name": "4.18.10M-combined",
"images": {
"hda_disk_image": "vEOS-lab-4.18.10M-combined.vmdk"
}
},
{
"name": "4.18.10M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.18.10M.vmdk"
}
},
{
"name": "4.18.5M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.18.5M.vmdk"
}
},
{
"name": "4.18.1F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.18.1F.vmdk"
}
},
{
"name": "4.17.8M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.17.8M.vmdk"
}
},
{
"name": "4.17.2F",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.17.2F.vmdk"
}
},
{
"name": "4.16.13M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.16.13M.vmdk"
}
},
{
"name": "4.16.6M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.16.6M.vmdk"
}
},
{
"name": "4.15.10M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.15.10M.vmdk"
}
},
{
"name": "4.15.5M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.15.5M.vmdk"
}
},
{
"name": "4.14.14M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.14.14M.vmdk"
}
},
{
"name": "4.13.16M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.13.16M.vmdk"
}
},
{
"name": "4.13.8M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.0.iso",
"hdb_disk_image": "vEOS-lab-4.13.8M.vmdk"
"hdb_disk_image": "vEOS-lab-4.31.6M.qcow2"
}
}
]

View File

@ -33,11 +33,23 @@
"md5sum": "cbbbea66a253f1dac0fcf81274dc778d",
"filesize": 87756936
},
{
"filename": "c7200-adventerprisek9-mz.152-4.M11.image",
"version": "152-4.M11",
"md5sum": "9a2005ad09ce1ec6fe7cf9af1e9b099e",
"filesize": 128487680
},
{
"filename": "c7200-adventerprisek9-mz.124-24.T5.image",
"version": "124-24.T5",
"md5sum": "6b89d0d804e1f2bb5b8bda66b5692047",
"filesize": 102345240
},
{
"filename": "c7200-a3jk9s-mz.124-25g.image",
"version": "124-25G",
"md5sum": "9c7cc9b3f3b3571411a7f62faaa2c036",
"filesize": 71528984
}
],
"versions": [
@ -55,12 +67,26 @@
"image": "c7200-advipservicesk9-mz.152-4.S5.image"
}
},
{
"name": "152-4.M11",
"idlepc": "0x6062e5c0",
"images": {
"image": "c7200-adventerprisek9-mz.152-4.M11.image"
}
},
{
"name": "124-24.T5",
"idlepc": "0x606df838",
"images": {
"image": "c7200-adventerprisek9-mz.124-24.T5.image"
}
},
{
"name": "124-25G",
"idlepc": "0x6066a998",
"images": {
"image": "c7200-a3jk9s-mz.124-25g.image"
}
}
]
}

View File

@ -12,7 +12,7 @@
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "There is no default password and enable password. A default configuration is present. ASAv goes through a double-boot before becoming active. This is normal and expected.",
"usage": "There is no default password and enable password. A default configuration is present. ASAv goes through a double-boot before becoming active. This is normal and expected. Switch to the Telnet console type after the first boot.",
"symbol": ":/symbols/asa.svg",
"first_port_name": "Management0/0",
"port_name_format": "Gi0/{0}",
@ -26,6 +26,13 @@
"kvm": "require"
},
"images": [
{
"filename": "asav9-22-1-1.qcow2",
"version": "9.22.1.1 CML",
"md5sum": "250a924cdc2370208eaac9d1dc8dc9e3",
"filesize": 379518976,
"download_url": "https://learningnetworkstore.cisco.com/cisco-modeling-labs-personal/cisco-modeling-labs-personal/CML-PERSONAL.html"
},
{
"filename": "asav9-18-2.qcow2",
"version": "9.18.2 CML",
@ -126,6 +133,12 @@
}
],
"versions": [
{
"name": "9.22.1.1 CML",
"images": {
"hda_disk_image": "asav9-22-1-1.qcow2"
}
},
{
"name": "9.18.2 CML",
"images": {

View File

@ -24,12 +24,26 @@
"kvm": "require"
},
"images": [
{
"filename": "csr1000v-universalk9.17.03.08a-serial.qcow2",
"version": "17.03.08a",
"md5sum": "6abece87d6db99d9fd6917203e253f91",
"filesize": 1421410304,
"download_url": "https://software.cisco.com/download/home/286323714/type/282046477/release/Amsterdam-17.3.8a"
},
{
"filename": "csr1000v-universalk9.17.03.06-serial.qcow2",
"version": "17.03.06",
"md5sum": "086ab9bef6e66de847af0da3910c60e8",
"filesize": 1422000128,
"download_url": "https://software.cisco.com/download/home/284364978/type/282046477/release/Gibraltar-16.12.3"
"download_url": "https://software.cisco.com/download/home/286323714/type/282046477/release/Amsterdam-17.3.6"
},
{
"filename": "csr1000v-ucmk9.16.12.5-serial.qcow2",
"version": "16.12.05",
"md5sum": "5c0cc217f0f0648407b34b11a1dd5b8e",
"filesize": 844103680,
"download_url": "https://software.cisco.com/download/home/286323714/type/286321980/release/16.12.5"
},
{
"filename": "csr1000v-universalk9.16.12.03-serial.qcow2",
@ -166,13 +180,25 @@
}
],
"versions": [
{
"name": "17.03.08a",
"images": {
"hda_disk_image": "csr1000v-universalk9.17.03.08a-serial.qcow2"
}
},
{
"name": "17.03.06",
"images": {
"hda_disk_image": "csr1000v-universalk9.17.03.06-serial.qcow2"
}
},
{
{
"name": "16.12.05",
"images": {
"hda_disk_image": "csr1000v-ucmk9.16.12.5-serial.qcow2"
}
},
{
"name": "16.12.3",
"images": {
"hda_disk_image": "csr1000v-universalk9.16.12.03-serial.qcow2"

View File

@ -13,13 +13,19 @@
"iou": {
"ethernet_adapters": 4,
"serial_adapters": 0,
"nvram": 128,
"ram": 256,
"nvram": 512,
"ram": 512,
"startup_config": "iou_l2_base_startup-config.txt"
},
"images": [
{
"filename": "x86_64_crb_linux_l2-adventerprisek9-ms.bin",
"filename": "x86_64_crb_linux_l2-adventerprisek9-ms.iol",
"version": "17.15.1",
"md5sum": "6c587cdfd5056078e70b3f6c26800d66",
"filesize": 243251976
},
{
"filename": "x86_64_crb_linux_l2-adventerprisek9-ms",
"version": "17.12.1",
"md5sum": "2b5055e4cef8fd257416d74a94adb626",
"filesize": 240355720
@ -44,10 +50,16 @@
}
],
"versions": [
{
"name": "17.15.1",
"images": {
"image": "x86_64_crb_linux_l2-adventerprisek9-ms.iol"
}
},
{
"name": "17.12.1",
"images": {
"image": "x86_64_crb_linux_l2-adventerprisek9-ms.bin"
"image": "x86_64_crb_linux_l2-adventerprisek9-ms"
}
},
{

View File

@ -13,13 +13,19 @@
"iou": {
"ethernet_adapters": 2,
"serial_adapters": 2,
"nvram": 128,
"ram": 256,
"nvram": 512,
"ram": 512,
"startup_config": "iou_l3_base_startup-config.txt"
},
"images": [
{
"filename": "x86_64_crb_linux-adventerprisek9-ms.bin",
"filename": "x86_64_crb_linux-adventerprisek9-ms.iol",
"version": "17.15.1",
"md5sum": "5d584f6cfbeaadc87d55f613da1049ed",
"filesize": 292001512
},
{
"filename": "x86_64_crb_linux-adventerprisek9-ms",
"version": "17.12.1",
"md5sum": "4a2fce8de21d1831fbceffd155e41ae7",
"filesize": 288947184
@ -44,10 +50,16 @@
}
],
"versions": [
{
"name": "17.15.1",
"images": {
"image": "x86_64_crb_linux-adventerprisek9-ms.iol"
}
},
{
"name": "17.12.1",
"images": {
"image": "x86_64_crb_linux-adventerprisek9-ms.bin"
"image": "x86_64_crb_linux-adventerprisek9-ms"
}
},
{

View File

@ -28,7 +28,21 @@
"options": ""
},
"images": [
{
{
"filename": "MFG_CTVM_8_10_196_0.iso",
"version": "8.10.196.0",
"md5sum": "6093aca44dcf45c999f83e62dc9aeea2",
"filesize": 650809344,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.10.196.0"
},
{
"filename": "MFG_CTVM_8_5_182_0.iso",
"version": "8.5.182.0",
"md5sum": "1cf3c57c2b123e739ab4662ea0abbc34",
"filesize": 388579328,
"download_url": "https://software.cisco.com/download/home/284464214/type/280926587/release/8.5.182.0"
},
{
"filename": "MFG_CTVM_8_3_102_0.iso",
"version": "8.3.102.0",
"md5sum": "7f6b7968b5bed04b5ecc119b6ba4e41c",
@ -73,6 +87,20 @@
}
],
"versions": [
{
"name": "8.10.196.0",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "MFG_CTVM_8_10_196_0.iso"
}
},
{
"name": "8.5.182.0",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "MFG_CTVM_8_5_182_0.iso"
}
},
{
"name": "8.3.102.0",
"images": {

View File

@ -0,0 +1,50 @@
{
"appliance_id": "92dbd0e9-144e-4c59-a4a8-97b6a1661818",
"name": "Innovaphone App-Platform",
"category": "guest",
"description": "In addition to telephony, apps for Video Telephony, Chat, Conferencing, Application Sharing and many other functions have become indispensable UCC tools in the area of business communication. Based on the myApps platform and its various components, innovaphone provides a collaborative work and communication platform for enhanced corporate communications \u2013 regardless of the location and the device being used. The innovaphone platform myApps consists of many independent components that work well individually, yet unfold their remarkable performance when combined.",
"vendor_name": "Innovaphone",
"vendor_url": "https://www.innovaphone.com",
"vendor_logo_url": "https://www.innovaphone.com/content/downloads/innovaphone-myapps-logo-short-without-background-screen.png",
"documentation_url": "https://wiki.innovaphone.com/index.php?title=Reference14r2:Concept_App_Platform",
"product_name": "App-Platform",
"product_url": "https://www.innovaphone.com/en/products/myapps/myapps-platform.html",
"registry_version": 4,
"status": "experimental",
"availability": "free-to-try",
"maintainer": "Thomas Marchsteiner",
"maintainer_email": "thomas.marchsteiner@acp.at",
"usage": "Default users console:root/iplinux , ssh:admin/ipapps , Webinterface:pwd \nAfter first boot wait for automatic reboot.\nA static ip can be set via the setip utility. \nLoading another keymap can be done via the loadkeys command. \nThe app-platform-disk1.vmdk file is contained within an ova file. \nIt can be extraced with the tar utility, 7Zip or any other tool which can handle tar files.",
"symbol": "innovaphone-ap-icon.jpg",
"first_port_name": "eth0",
"qemu": {
"adapter_type": "vmxnet3",
"adapters": 1,
"ram": 512,
"cpus": 1,
"hda_disk_interface": "scsi",
"arch": "x86_64",
"console_type": "vnc",
"boot_priority": "d",
"kvm": "allow",
"on_close": "power_off",
"process_priority": "normal"
},
"images": [
{
"filename": "app-platform-disk1_120010.vmdk",
"version": "12.0010",
"md5sum": "d5a5a77f682c2c988b0810935d79a787",
"filesize": 129474560,
"download_url": "https://store.innovaphone.com/"
}
],
"versions": [
{
"images": {
"hda_disk_image": "app-platform-disk1_120010.vmdk"
},
"name": "12.0010"
}
]
}

View File

@ -0,0 +1,78 @@
{
"appliance_id": "ddf8f7a4-60c0-4c9d-849c-ffc3c9d1d082",
"name": "Innovaphone IPVA",
"category": "guest",
"description": "The innovaphone PBX is a professional IP telephone system. The IPVA is a software-only solution. It appears as and performs as an innovaphone 'hard-box' excluding DSP-, ISDN-/AB-resources.",
"vendor_name": "Innovaphone",
"vendor_url": "https://www.innovaphone.com/",
"vendor_logo_url": "https://www.innovaphone.com/content/downloads/innovaphone-myapps-logo-short-without-background-screen.png",
"documentation_url": "https://wiki.innovaphone.com/index.php?title=Reference15r1:Concept_Innovaphone_Virtual_Appliance_(IPVA)",
"product_name": "IPVA",
"product_url": "https://www.innovaphone.com/en/products/innovaphone-pbx.html",
"registry_version": 4,
"status": "experimental",
"availability": "free-to-try",
"maintainer": "Thomas Marchsteiner",
"maintainer_email": "thomas.marchsteiner@acp.at",
"usage": "Default user admin/ipva \nDefault network configuration: DHCP client on eth0 with fallback to static address 192.168.0.1/24 after timeout. Static address 192.168.1.1/24 on eth1\n The ova in the zip file contains the disk images to run this appliance. Disableing the dhcp client and setting a static IP is possible with the following commands:\n> config change IP0 ETH0 /addr 192.168.0.1 /mask 255.255.255.0 \n> config change DHCP0 /mode off \n> config write \n> config activate \n> reset",
"symbol": "innovaphone-pbx-green.png",
"first_port_name": "eth0",
"port_name_format": "eth{port1}",
"qemu": {
"adapter_type": "vmxnet3",
"adapters": 2,
"ram": 256,
"cpus": 1,
"hda_disk_interface": "ide",
"hdb_disk_interface": "ide",
"hdc_disk_interface": "ide",
"hdd_disk_interface": "ide",
"arch": "x86_64",
"console_type": "vnc",
"boot_priority": "d",
"kvm": "allow",
"on_close": "power_off",
"process_priority": "normal"
},
"images": [
{
"filename": "ipva-qemu-disk1-14r2.vmdk",
"version": "14r2",
"md5sum": "aaa1c3885eee30ca6ffa3827619e8643",
"filesize": 6269952,
"download_url": "https://store.innovaphone.com/"
},
{
"filename": "ipva-qemu-disk2-14r2.vmdk",
"version": "14r2",
"md5sum": "008a8fc6b0b1e5f11a3e7fd6f22ba349",
"filesize": 72192,
"download_url": "https://store.innovaphone.com/"
},
{
"filename": "ipva-qemu-disk3-14r2.vmdk",
"version": "14r2",
"md5sum": "20516731c480e2112b3fb4a4d7f514f2",
"filesize": 68096,
"download_url": "https://store.innovaphone.com/"
},
{
"filename": "ipva-qemu-disk4-14r2.vmdk",
"version": "14r2",
"md5sum": "15d7d79ef8c28bd29b2eceac8405f964",
"filesize": 68096,
"download_url": "https://store.innovaphone.com/"
}
],
"versions": [
{
"images": {
"hda_disk_image": "ipva-qemu-disk1-14r2.vmdk",
"hdb_disk_image": "ipva-qemu-disk2-14r2.vmdk",
"hdc_disk_image": "ipva-qemu-disk3-14r2.vmdk",
"hdd_disk_image": "ipva-qemu-disk4-14r2.vmdk"
},
"name": "14r2"
}
]
}

View File

@ -24,6 +24,13 @@
"process_priority": "normal"
},
"images": [
{
"filename": "pfSense-CE-2.7.2-RELEASE-amd64.iso",
"version": "2.7.2",
"md5sum": "50c3e723d68ec74d038041a34fa846f8",
"filesize": 874672128,
"download_url": "https://www.pfsense.org/download/mirror.php?section=downloads"
},
{
"filename": "pfSense-CE-2.7.0-RELEASE-amd64.iso",
"version": "2.7.0",
@ -76,6 +83,13 @@
}
],
"versions": [
{
"name": "2.7.2",
"images": {
"hda_disk_image": "empty100G.qcow2",
"cdrom_image": "pfSense-CE-2.7.2-RELEASE-amd64.iso"
}
},
{
"name": "2.7.0",
"images": {

View File

@ -0,0 +1,50 @@
{
"appliance_id": "60801097-332e-4f40-a63e-8ad62047c01f",
"name": "Stormshield EVA",
"category": "firewall",
"description": "Stormshield EVA (Elastic Virtual Appliance) is a french virtual firewall designed to protect network infrastructures. It offers advanced features such as filtering, intrusion prevention (IPS), VPN management (IPSec/SSL), and access control.",
"vendor_name": "Stormshield",
"vendor_url": "https://www.stormshield.com/",
"vendor_logo_url": "https://www.stormshield.com/wp-content/uploads/stormshield-logo.png",
"documentation_url": "https://www.stormshield.com/fr/ressourcescenter/network-security-elastic-virtual-appliances/",
"product_name": "Stormshield EVA",
"product_url": "https://www.stormshield.com/fr/produits-et-services/produits/protection-des-reseaux/nos-produits/appliances-virtuelles/",
"registry_version": 4,
"status": "stable",
"availability": "service-contract",
"maintainer": "Samy SCANNA",
"maintainer_email": "samy.scanna@outlook.com",
"usage": "After the first boot, the appliance automatically runs the configuration script to set up the password, and network interfaces.",
"symbol": "stormshield.png",
"port_name_format": "port{port1}",
"qemu": {
"adapter_type": "vmxnet3",
"adapters": 8,
"ram": 2048,
"cpus": 1,
"hda_disk_interface": "scsi",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "allow",
"options": "-serial stdio",
"on_close": "shutdown_signal",
"process_priority": "normal"
},
"images": [
{
"filename": "utm-SNS-EVA-4.3.33-kvm.qcow2",
"version": "4.3.33",
"md5sum": "21d94d0e20f2e270f06c5853fd750d5b",
"filesize": 284360704,
"download_url": "https://mystormshield.eu/product/download/"
}
],
"versions": [
{
"images": {
"hda_disk_image": "utm-SNS-EVA-4.3.33-kvm.qcow2"
},
"name": "4.3.33"
}
]
}

View File

@ -10,8 +10,8 @@
"product_url": "http://www.cisco.com/",
"registry_version": 4,
"status": "experimental",
"maintainer": "Laurent LEVIER",
"maintainer_email": "laurent.levier@orange.com",
"maintainer": "Christopher Uhrig",
"maintainer_email": "christopher.uhrig@telekom.de",
"usage": "Initial username is admin, password is admin as well.",
"first_port_name": "Management0/0",
"port_name_format": "Ge0/{0}",
@ -39,6 +39,20 @@
"md5sum": "4aa487101d4cdc390f53a6e8b6f45ca7",
"filesize": 328400896,
"download_url": "http://www.cisco.com/"
},
{
"filename": "viptela-edge-20.9.5.1-genericx86-64.qcow2",
"version": "20.9.5.1",
"md5sum": "41d9e981908fd83695de78d6ca5794bd",
"filesize": 409468928,
"download_url": "https://software.cisco.com/download/home/286320995/type/286321047/release/20.9.5.1"
},
{
"filename": "viptela-edge-20.12.4-genericx86-64.qcow2",
"version": "20.12.4",
"md5sum": "9f1aedada5e632c7bc29a51c004f4486",
"filesize": 411762688,
"download_url": "https://software.cisco.com/download/home/286320995/type/286321047/release/20.12.4"
}
],
"versions": [
@ -53,6 +67,18 @@
"images": {
"hda_disk_image": "viptela-edge-genericx86-64.qcow2"
}
},
{
"name": "20.9.5.1",
"images": {
"hda_disk_image": "viptela-edge-20.9.5.1-genericx86-64.qcow2"
}
},
{
"name": "20.12.4",
"images": {
"hda_disk_image": "viptela-edge-20.12.4-genericx86-64.qcow2"
}
}
]
}

View File

@ -24,6 +24,20 @@
"options": "-smp 2,maxcpus=2 -cpu host"
},
"images": [
{
"filename": "viptela-smart-20.12.4-genericx86-64.qcow2",
"version": "20.12.4",
"md5sum": "0e7b6468498a89195ab815260bc4cfb6",
"filesize": 411762688,
"download_url": "https://software.cisco.com/download/home/286320995/type/286321043/release/20.12.4"
},
{
"filename": "viptela-smart-20.9.5.1-genericx86-64.qcow2",
"version": "20.9.5.1",
"md5sum": "08e105778bb68f8f24f323dfd263a91a",
"filesize": 409468928,
"download_url": "https://software.cisco.com/download/home/286320995/type/286321043/release/20.9.5.1"
},
{
"filename": "viptela-smart-19.2.0-genericx86-64.qcow2",
"version": "19.2.0",
@ -31,7 +45,7 @@
"filesize": 328400896,
"download_url": "http://www.cisco.com/"
},
{
{
"filename": "viptela-smart-genericx86-64-disk1.vmdk",
"version": "18.3.7",
"md5sum": "ab9b06c212319336810a4b336ec3dd96",
@ -51,6 +65,18 @@
"images": {
"hda_disk_image": "viptela-smart-19.2.0-genericx86-64.qcow2"
}
},
{
"name": "20.9.5.1",
"images": {
"hda_disk_image": "viptela-smart-20.9.5.1-genericx86-64.qcow2"
}
},
{
"name": "20.12.4",
"images": {
"hda_disk_image": "viptela-smart-20.12.4-genericx86-64.qcow2"
}
}
]
}

View File

@ -10,8 +10,8 @@
"product_url": "http://www.cisco.com/",
"registry_version": 4,
"status": "experimental",
"maintainer": "Laurent LEVIER",
"maintainer_email": "laurent.levier@orange.com",
"maintainer": "Christopher Uhrig",
"maintainer_email": "christopher.uhrig@telekom.de",
"usage": "Initial username is admin, password is admin as well.",
"qemu": {
"adapter_type": "vmxnet3",
@ -25,14 +25,28 @@
"options": "-cpu host -smp 2,maxcpus=2"
},
"images": [
{
{
"filename": "viptela-vmanage-20.12.4-genericx86-64.qcow2",
"version": "20.12.4",
"md5sum": "4e0d4c379623c495a0bb671a76a12f9f",
"filesize": 4951375872,
"download_url": "https://software.cisco.com/download/home/286320995/type/286321039/release/20.12.4"
},
{
"filename": "viptela-vmanage-20.9.5.2-genericx86-64.qcow2",
"version": "20.9.5.2",
"md5sum": "a8a4ebee0274541200f4fe94a739d454",
"filesize": 3133865984,
"download_url": "https://software.cisco.com/download/home/286320995/type/286321039/release/20.9.5.2"
},
{
"filename": "viptela-vmanage-19.2.0-genericx86-64.qcow2",
"version": "19.2.0",
"md5sum": "27ef126f178c6c929a36ad2cf6ed8db7",
"filesize": 1185349632,
"download_url": "http://www.cisco.com/"
},
{
{
"filename": "viptela-vmanage-genericx86-64-disk1.vmdk",
"version": "18.3.7",
"md5sum": "2290c6467c907d9ca9c65793fe898716",
@ -55,6 +69,20 @@
"hda_disk_image": "viptela-vmanage-19.2.0-genericx86-64.qcow2",
"hdb_disk_image": "empty30G.qcow2"
}
},
{
"name": "20.12.4",
"images": {
"hda_disk_image": "viptela-vmanage-20.12.4-genericx86-64.qcow2",
"hdb_disk_image": "empty30G.qcow2"
}
},
{
"name": "20.9.5.2",
"images": {
"hda_disk_image": "viptela-vmanage-20.9.5.2-genericx86-64.qcow2",
"hdb_disk_image": "empty30G.qcow2"
}
},
{
"name": "18.3.7",

View File

@ -390,14 +390,16 @@ class IOUVM(BaseNode):
raise IOUError("The following shared library dependencies cannot be found for IOU image {}: {}".format(self._path,
", ".join(missing_libs)))
async def _check_iou_licence(self):
def _is_iou_license_check_enabled(self):
"""
Checks for a valid IOU key in the iourc file (paranoid mode).
Returns if IOU license check is enabled.
:return: boolean
"""
# license check is sent by the controller
if self.license_check is False:
return
return False
try:
# we allow license check to be disabled server wide
@ -407,7 +409,14 @@ class IOUVM(BaseNode):
if server_wide_license_check is False:
log.warning("License check is explicitly disabled on this server")
return
return False
return True
async def _check_iou_license(self):
"""
Checks for a valid IOU key in the iourc file (paranoid mode).
"""
config = configparser.ConfigParser()
try:
@ -511,15 +520,16 @@ class IOUVM(BaseNode):
except OSError as e:
raise IOUError("Could not rename nvram files: {}".format(e))
iourc_path = self.iourc_path
if not iourc_path:
raise IOUError("Could not find an iourc file (IOU license), please configure an IOU license")
if not os.path.isfile(iourc_path):
raise IOUError("The iourc path '{}' is not a regular file".format(iourc_path))
iourc_path = None
if self._is_iou_license_check_enabled():
iourc_path = self.iourc_path
if not iourc_path:
raise IOUError("Could not find an iourc file (IOU license), please configure an IOU license")
if not os.path.isfile(iourc_path):
raise IOUError("The iourc path '{}' is not a regular file".format(iourc_path))
await self._check_iou_license()
await self._check_iou_licence()
await self._start_ubridge()
self._create_netmap_config()
if self.use_default_iou_values:
# make sure we have the default nvram amount to correctly push the configs
@ -531,7 +541,7 @@ class IOUVM(BaseNode):
self._nvram_watcher = FileWatcher(self._nvram_file(), self._nvram_changed, delay=2)
# created a environment variable pointing to the iourc file.
# created an environment variable pointing to the iourc file.
env = os.environ.copy()
if "IOURC" not in os.environ and iourc_path:
env["IOURC"] = iourc_path

View File

@ -218,28 +218,45 @@ class VirtualBoxVM(BaseNode):
"""
Fix the VM uuid in the case of linked clone
"""
if os.path.exists(self._linked_vbox_file()):
try:
tree = ET.parse(self._linked_vbox_file())
except ET.ParseError:
raise VirtualBoxError("Cannot modify VirtualBox linked nodes file. "
"File {} is corrupted.".format(self._linked_vbox_file()))
except OSError as e:
raise VirtualBoxError("Cannot modify VirtualBox linked nodes file '{}': {}".format(self._linked_vbox_file(), e))
machine = tree.getroot().find("{http://www.virtualbox.org/}Machine")
if machine is not None and machine.get("uuid") != "{" + self.id + "}":
linked_vbox_file = self._linked_vbox_file()
if not os.path.exists(linked_vbox_file):
raise VirtualBoxError("Cannot find VirtualBox linked node file: {}".format(linked_vbox_file))
for image in tree.getroot().findall("{http://www.virtualbox.org/}Image"):
currentSnapshot = machine.get("currentSnapshot")
if currentSnapshot:
newSnapshot = re.sub(r"\{.*\}", "{" + str(uuid.uuid4()) + "}", currentSnapshot)
shutil.move(os.path.join(self.working_dir, self._vmname, "Snapshots", currentSnapshot) + ".vdi",
os.path.join(self.working_dir, self._vmname, "Snapshots", newSnapshot) + ".vdi")
image.set("uuid", newSnapshot)
try:
tree = ET.parse(linked_vbox_file)
except ET.ParseError:
raise VirtualBoxError("Cannot modify VirtualBox linked node file. "
"File {} is corrupted.".format(linked_vbox_file))
except OSError as e:
raise VirtualBoxError("Cannot modify VirtualBox linked node file '{}': {}".format(linked_vbox_file, e))
machine.set("uuid", "{" + self.id + "}")
tree.write(self._linked_vbox_file())
machine = tree.getroot().find("{http://www.virtualbox.org/}Machine")
if machine is not None and machine.get("uuid") != "{" + self.id + "}":
for image in tree.getroot().findall("{http://www.virtualbox.org/}Image"):
currentSnapshot = machine.get("currentSnapshot")
if currentSnapshot:
newSnapshot = re.sub(r"\{.*\}", "{" + str(uuid.uuid4()) + "}", currentSnapshot)
shutil.move(
os.path.join(self.working_dir, self._vmname, "Snapshots", currentSnapshot) + ".vdi",
os.path.join(self.working_dir, self._vmname, "Snapshots", newSnapshot) + ".vdi"
)
log.info("VirtualBox VM '{name}' [{id}] snapshot file moved from '{current}' to '{new}'".format(
name=self.name,
id=self.id,
current=currentSnapshot,
new=newSnapshot,
))
image.set("uuid", newSnapshot)
log.info("VirtualBox VM '{name}' [{id}] '{vbox_file}' has been patched".format(
name=self.name,
id=self.id,
vbox_file=linked_vbox_file,
))
machine.set("uuid", "{" + self.id + "}")
tree.write(linked_vbox_file)
async def check_hw_virtualization(self):
"""
@ -458,7 +475,7 @@ class VirtualBoxVM(BaseNode):
async def save_linked_hdds_info(self):
"""
Save linked cloned hard disks information.
Save linked cloned hard disk information.
:returns: disk table information
"""

View File

@ -29,7 +29,7 @@ except ImportError:
from importlib import resources as importlib_resources
from ..config import Config
from ..utils import parse_version
from ..utils import parse_version, md5sum
from ..utils.images import default_images_directory
from .project import Project
@ -289,12 +289,21 @@ class Controller:
except OSError as e:
log.error(str(e))
@staticmethod
def install_resource_files(dst_path, resource_name):
def install_resource_files(dst_path, resource_name, upgrade_resources=True):
"""
Install files from resources to user's file system
"""
def should_copy(src, dst, upgrade_resources):
if not os.path.exists(dst):
return True
if upgrade_resources is False:
return False
# copy the resource if it is different
return md5sum(src) != md5sum(dst)
if hasattr(sys, "frozen") and sys.platform.startswith("win"):
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
for filename in os.listdir(resource_path):
@ -303,7 +312,7 @@ class Controller:
else:
for entry in importlib_resources.files('gns3server').joinpath(resource_name).iterdir():
full_path = os.path.join(dst_path, entry.name)
if entry.is_file() and not os.path.exists(full_path):
if entry.is_file() and should_copy(str(entry), full_path, upgrade_resources):
log.debug(f'Installing {resource_name} resource file "{entry.name}" to "{full_path}"')
shutil.copy(str(entry), os.path.join(dst_path, entry.name))
elif entry.is_dir():
@ -319,7 +328,7 @@ class Controller:
dst_path = self.configs_path()
log.info(f"Installing base configs in '{dst_path}'")
try:
Controller.install_resource_files(dst_path, "configs")
Controller.install_resource_files(dst_path, "configs", upgrade_resources=False)
except OSError as e:
log.error(f"Could not install base config files to {dst_path}: {e}")
@ -332,7 +341,7 @@ class Controller:
dst_path = self.disks_path()
log.info(f"Installing built-in disks in '{dst_path}'")
try:
Controller.install_resource_files(dst_path, "disks")
Controller.install_resource_files(dst_path, "disks", upgrade_resources=False)
except OSError as e:
log.error(f"Could not install disk files to {dst_path}: {e}")

View File

@ -82,7 +82,7 @@ class ApplianceManager:
os.makedirs(appliances_path, exist_ok=True)
return appliances_path
def builtin_appliances_path(self, delete_first=False):
def builtin_appliances_path(self):
"""
Get the built-in appliance storage directory
"""
@ -91,8 +91,6 @@ class ApplianceManager:
appname = vendor = "GNS3"
resources_path = os.path.expanduser(server_config.get("resources_path", platformdirs.user_data_dir(appname, vendor, roaming=True)))
appliances_dir = os.path.join(resources_path, "appliances")
if delete_first:
shutil.rmtree(appliances_dir, ignore_errors=True)
os.makedirs(appliances_dir, exist_ok=True)
return appliances_dir
@ -101,7 +99,7 @@ class ApplianceManager:
At startup we copy the built-in appliances files.
"""
dst_path = self.builtin_appliances_path(delete_first=True)
dst_path = self.builtin_appliances_path()
log.info(f"Installing built-in appliances in '{dst_path}'")
from . import Controller
try:

View File

@ -18,14 +18,19 @@
import ipaddress
import aiohttp
import asyncio
import async_timeout
import socket
import json
import uuid
import sys
import io
from operator import itemgetter
if sys.version_info >= (3, 11):
from asyncio import timeout as asynctimeout
else:
from async_timeout import timeout as asynctimeout
from ..utils import parse_version
from ..utils.asyncio import locking
from ..controller.controller_error import ControllerError
@ -483,8 +488,8 @@ class Compute:
""" Returns URL for specific path at Compute"""
return self._getUrl(path)
async def _run_http_query(self, method, path, data=None, timeout=20, raw=False):
async with async_timeout.timeout(delay=timeout):
async def _run_http_query(self, method, path, data=None, timeout=120, raw=False):
async with asynctimeout(delay=timeout):
url = self._getUrl(path)
headers = {}
headers['content-type'] = 'application/json'

View File

@ -588,7 +588,7 @@ class Project:
if node_type == "iou":
async with self._iou_id_lock:
# wait for a IOU node to be completely created before adding a new one
# wait for an IOU node to be completely created before adding a new one
# this is important otherwise we allocate the same application ID (used
# to generate MAC addresses) when creating multiple IOU node at the same time
if "properties" in kwargs.keys():
@ -1275,7 +1275,10 @@ class Project:
p_work = pathlib.Path(location or self.path).parent.absolute()
t0 = time.time()
new_project_id = str(uuid.uuid4())
new_project_path = p_work.joinpath(new_project_id)
if location:
new_project_path = p_work.joinpath(location)
else:
new_project_path = p_work.joinpath(new_project_id)
# copy dir
await wait_run_in_executor(shutil.copytree, self.path, new_project_path.as_posix(), symlinks=True, ignore_dangling_symlinks=True)
log.info("Project content copied from '{}' to '{}' in {}s".format(self.path, new_project_path, time.time() - t0))

View File

@ -57,7 +57,7 @@ class CrashReport:
Report crash to a third party service
"""
DSN = "https://088679fcf3aa35f775356982a80fe37c@o19455.ingest.us.sentry.io/38482"
DSN = "https://98c55f74bc61432b375d3eb392af9f7d@o19455.ingest.us.sentry.io/38482"
_instance = None
def __init__(self):

View File

@ -46,6 +46,6 @@
gtag('config', 'G-0BT7QQV1W1');
</script>
<script src="runtime.415291667f70565cd8ef.js" defer></script><script src="polyfills-es5.865074f5cd9a121111a2.js" nomodule defer></script><script src="polyfills.2f91a039d848e57ff02e.js" defer></script><script src="main.df8c319a3da6fb0e3629.js" defer></script>
<script src="runtime.415291667f70565cd8ef.js" defer></script><script src="polyfills-es5.865074f5cd9a121111a2.js" nomodule defer></script><script src="polyfills.2f91a039d848e57ff02e.js" defer></script><script src="main.c83939cdfe3af0ec27df.js" defer></script>
</body></html>

View File

@ -23,6 +23,7 @@ import textwrap
import posixpath
import socket
import errno
import hashlib
def force_unix_path(path):
@ -120,3 +121,14 @@ def is_ipv6_enabled() -> bool:
if e.errno == errno.EADDRINUSE:
return True
raise
def md5sum(filename):
"""
Calculate the MD5 checksum of a file.
"""
hash_md5 = hashlib.md5()
with open(filename, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()

View File

@ -45,7 +45,7 @@ def list_images(emulator_type):
# We limit recursion to path outside the default images directory
# the reason is in the default directory manage file organization and
# it should be flatten to keep things simple
# it should be flat to keep things simple
recurse = True
if os.path.commonprefix([directory, general_images_directory]) == general_images_directory:
recurse = False
@ -53,37 +53,53 @@ def list_images(emulator_type):
directory = os.path.normpath(directory)
for root, _, filenames in _os_walk(directory, recurse=recurse):
for filename in filenames:
if filename not in files:
if filename.endswith(".md5sum") or filename.startswith("."):
if filename in files:
log.debug("File {} has already been found, skipping...".format(filename))
continue
if filename.endswith(".md5sum") or filename.startswith("."):
continue
files.add(filename)
filesize = os.stat(os.path.join(root, filename)).st_size
if filesize < 7:
log.debug("File {} is too small to be an image, skipping...".format(filename))
continue
try:
with open(os.path.join(root, filename), "rb") as f:
# read the first 7 bytes of the file.
elf_header_start = f.read(7)
if emulator_type == "dynamips" and elf_header_start != b'\x7fELF\x01\x02\x01':
# IOS images must start with the ELF magic number, be 32-bit, big endian and have an ELF version of 1
log.warning("IOS image {} does not start with a valid ELF magic number, skipping...".format(filename))
continue
elif emulator_type == "iou" and elf_header_start != b'\x7fELF\x02\x01\x01' and elf_header_start != b'\x7fELF\x01\x01\x01':
# IOU images must start with the ELF magic number, be 32-bit or 64-bit, little endian and have an ELF version of 1
log.warning("IOU image {} does not start with a valid ELF magic number, skipping...".format(filename))
continue
elif emulator_type == "qemu" and elf_header_start[:4] == b'\x7fELF':
# QEMU images should not start with an ELF magic number
log.warning("QEMU image {} starts with an ELF magic number, skipping...".format(filename))
continue
elif ((filename.endswith(".image") or filename.endswith(".bin")) and emulator_type == "dynamips") \
or ((filename.endswith(".bin") or filename.startswith("i86bi")) and emulator_type == "iou") \
or (not filename.endswith(".bin") and not filename.endswith(".image") and emulator_type == "qemu"):
files.add(filename)
# It the image is located in the standard directory the path is relative
if os.path.commonprefix([root, default_directory]) != default_directory:
path = os.path.join(root, filename)
else:
path = os.path.relpath(os.path.join(root, filename), default_directory)
# It the image is located in the standard directory the path is relative
if os.path.commonprefix([root, default_directory]) != default_directory:
path = os.path.join(root, filename)
else:
path = os.path.relpath(os.path.join(root, filename), default_directory)
try:
if emulator_type in ["dynamips", "iou"]:
with open(os.path.join(root, filename), "rb") as f:
# read the first 7 bytes of the file.
elf_header_start = f.read(7)
# valid IOU or IOS images must start with the ELF magic number, be 32-bit or 64-bit,
# little endian and have an ELF version of 1
if elf_header_start != b'\x7fELF\x02\x01\x01' and elf_header_start != b'\x7fELF\x01\x01\x01':
continue
images.append(
{
"filename": filename,
"path": force_unix_path(path),
"md5sum": md5sum(os.path.join(root, filename)),
"filesize": filesize
}
)
images.append({
"filename": filename,
"path": force_unix_path(path),
"md5sum": md5sum(os.path.join(root, filename)),
"filesize": os.stat(os.path.join(root, filename)).st_size})
except OSError as e:
log.warning("Can't add image {}: {}".format(path, str(e)))
except OSError as e:
log.warning("Can't add image {}: {}".format(path, str(e)))
return images

View File

@ -23,8 +23,8 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)
__version__ = "2.2.51"
__version_info__ = (2, 2, 51, 0)
__version__ = "2.2.53"
__version_info__ = (2, 2, 53, 0)
if "dev" in __version__:
try:

View File

@ -311,7 +311,13 @@ class WebServer:
# Background task started with the server
self._app.on_startup.append(self._on_startup)
resource_options = aiohttp_cors.ResourceOptions(allow_credentials=True, expose_headers="*", allow_headers="*", max_age=0)
resource_options = aiohttp_cors.ResourceOptions(
allow_credentials=True,
expose_headers="*",
allow_headers="*",
allow_methods="*",
max_age=0
)
# Allow CORS for this domains
cors = aiohttp_cors.setup(self._app, defaults={

View File

@ -2,12 +2,12 @@ jsonschema>=4.23,<4.24
aiohttp>=3.10.10,<3.11
aiohttp-cors>=0.7.0,<0.8
aiofiles>=24.1.0,<25.0
Jinja2>=3.1.4,<3.2
sentry-sdk>=2.17,<2.18 # optional dependency
psutil>=6.1.0
async-timeout>=4.0.3,<4.1
Jinja2>=3.1.5,<3.2
sentry-sdk>=2.19.2,<2.20 # optional dependency
psutil>=6.1.1
async-timeout>=5.0.1,<5.1
distro>=1.9.0
py-cpuinfo>=9.0.0,<10.0
platformdirs>=2.4.0
platformdirs>=2.4.0,<3 # platformdirs >=3 conflicts when building Debian packages
importlib-resources>=1.3; python_version < '3.9'
truststore>=0.10.0; python_version >= '3.10'

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (C) 2015 GNS3 Technologies Inc.
# Copyright (C) 2025 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -16,19 +16,21 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Install GNS3 on a remote Ubuntu LTS server
# This create a dedicated user and setup all the package
# and optionnaly a VPN
# Install GNS3 on a remote Ubuntu server
# This creates a dedicated user and setup all the packages
# and optionally a VPN
#
function help {
echo "Usage:" >&2
echo "--with-openvpn: Install OpenVPN" >&2
echo "--with-iou: Install IOU" >&2
echo "--with-i386-repository: Add the i386 repositories required by IOU if they are not already available on the system. Warning: this will replace your source.list in order to use the official Ubuntu mirror" >&2
echo "--with-iou: Install IOU support" >&2
echo "--with-i386-repository: Add the i386 repositories required by IOU i386 images. This is not needed for recent x86_64 IOU images." >&2
echo "--with-welcome: Install GNS3-VM welcome.py script" >&2
echo "--without-kvm: Disable KVM, required if system do not support it (limitation in some hypervisors and cloud providers). Warning: only disable KVM if strictly necessary as this will degrade performance" >&2
echo "--unstable: Use the GNS3 unstable repository"
echo "--without-system-upgrade: Do not upgrade the system" >&2
echo "--unstable: Use the GNS3 unstable repository" >&2
echo "--custom-repository <repository>: Use a custom repository" >&2
echo "--help: This help" >&2
}
@ -37,21 +39,31 @@ function log {
}
lsb_release -d | grep "LTS" > /dev/null
if [ "$EUID" -ne 0 ]
then
echo "This script must be run as root"
exit 1
fi
if [ $? != 0 ]
then
echo "This script can only be run on a Linux Ubuntu LTS release"
exit 1
fi
# Default repository
REPOSITORY="ppa"
# Read the options
USE_VPN=0
USE_IOU=0
I386_REPO=0
DISABLE_KVM=0
UNSTABLE=0
NO_SYSTEM_UPGRADE=0
WELCOME_SETUP=0
TEMP=`getopt -o h --long with-openvpn,with-iou,with-i386-repository,with-welcome,without-kvm,unstable,help -n 'gns3-remote-install.sh' -- "$@"`
TEMP=`getopt -o h --long with-openvpn,with-iou,with-i386-repository,with-welcome,without-kvm,unstable,custom-repository:,help -n 'gns3-remote-install.sh' -- "$@"`
if [ $? != 0 ]
then
help
@ -82,10 +94,18 @@ while true ; do
DISABLE_KVM=1
shift
;;
--unstable)
UNSTABLE=1
--without-system-upgrade)
NO_SYSTEM_UPGRADE=1
shift
;;
--unstable)
REPOSITORY="unstable"
shift
;;
--custom-repository)
REPOSITORY="$2"
shift 2
;;
-h|--help)
help
exit 1
@ -95,99 +115,66 @@ while true ; do
esac
done
if [ "$REPOSITORY" == "ppa-v3" ]
then
if ! python3 -c 'import sys; assert sys.version_info >= (3,9)' > /dev/null 2>&1; then
echo "GNS3 version >= 3.0 requires Python 3.9 or later"
exit 1
fi
fi
# Exit in case of error
set -e
export DEBIAN_FRONTEND="noninteractive"
UBUNTU_CODENAME=`lsb_release -c -s`
log "Add GNS3 repository"
log "Updating system packages, installing curl and software-properties-common"
apt update
apt install -y curl software-properties-common
if [ "$UBUNTU_CODENAME" == "trusty" ]
if [ $NO_SYSTEM_UPGRADE == 0 ]
then
if [ $UNSTABLE == 1 ]
then
cat <<EOFLIST > /etc/apt/sources.list.d/gns3.list
deb http://ppa.launchpad.net/gns3/unstable/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/unstable/ubuntu $UBUNTU_CODENAME main
deb http://ppa.launchpad.net/gns3/qemu/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/qemu/ubuntu $UBUNTU_CODENAME main
EOFLIST
else
cat <<EOFLIST > /etc/apt/sources.list.d/gns3.list
deb http://ppa.launchpad.net/gns3/ppa/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu $UBUNTU_CODENAME main
deb http://ppa.launchpad.net/gns3/qemu/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/qemu/ubuntu $UBUNTU_CODENAME main
EOFLIST
fi
else
if [ $UNSTABLE == 1 ]
then
cat <<EOFLIST > /etc/apt/sources.list.d/gns3.list
deb http://ppa.launchpad.net/gns3/unstable/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/unstable/ubuntu $UBUNTU_CODENAME main
EOFLIST
else
cat <<EOFLIST > /etc/apt/sources.list.d/gns3.list
deb http://ppa.launchpad.net/gns3/ppa/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu $UBUNTU_CODENAME main
EOFLIST
fi
log "Upgrading system packages"
apt upgrade --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
fi
if [ $I386_REPO == 1 ]
then
cat <<EOFLIST2 >> /etc/apt/sources.list
###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu/ $UBUNTU_CODENAME main universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ $UBUNTU_CODENAME main universe multiverse
log "Adding GNS3 repository ppa:gns3/$REPOSITORY"
# use sudo -E to preserve proxy config
sudo -E apt-add-repository -y "ppa:gns3/$REPOSITORY"
###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-security main universe multiverse
deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-updates main universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-security main universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-updates main universe multiverse
EOFLIST2
fi
log "Installing the GNS3 server and its dependencies"
apt install -y gns3-server
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A2E3EF7B
log "Update system packages"
apt-get update
log "Upgrade packages"
apt-get upgrade --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
log "Install GNS3 packages"
apt-get install -y gns3-server
log "Create user GNS3 with /opt/gns3 as home directory"
log "Creating user GNS3 with /opt/gns3 as home directory"
if [ ! -d "/opt/gns3" ]
then
useradd -m -d /opt/gns3 gns3
fi
log "Add GNS3 to the ubridge group"
log "Adding GNS3 to the ubridge group"
usermod -aG ubridge gns3
log "Install docker"
log "Installing Docker"
if [ ! -f "/usr/bin/docker" ]
then
curl -sSL https://get.docker.com | bash
fi
log "Add GNS3 to the docker group"
log "Adding GNS3 to the docker group"
usermod -aG docker gns3
if [ $USE_IOU == 1 ]
then
log "Setup IOU"
dpkg --add-architecture i386
apt-get update
log "Setting up IOU support"
if [ $I386_REPO == 1 ]
then
log "Enabling i386 architecture for IOU support"
dpkg --add-architecture i386
apt update
fi
apt-get install -y gns3-iou
apt install -y gns3-iou
# Force the host name to gns3vm
echo gns3vm > /etc/hostname
@ -196,31 +183,18 @@ then
# Force hostid for IOU
dd if=/dev/zero bs=4 count=1 of=/etc/hostid
# Block potential IOU phone home call (xml.cisco.com is not in use at this time)
log "Block IOU phone home call"
if [ "$UBUNTU_CODENAME" == "focal" ]
then
iptables -I OUTPUT -p udp --dport 53 -m string --hex-string "|03|xml|05|cisco|03|com" --algo bm -j DROP
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
apt-get install -y iptables-persistent
else
echo "127.0.0.254 xml.cisco.com" | tee --append /etc/hosts
fi
fi
log "Add gns3 to the kvm group"
log "Adding gns3 to the kvm group"
usermod -aG kvm gns3
log "Setup GNS3 server"
log "Setting up the GNS3 server configuration"
mkdir -p /etc/gns3
cat <<EOFC > /etc/gns3/gns3_server.conf
[Server]
host = 0.0.0.0
port = 3080
port = 3080
images_path = /opt/gns3/images
projects_path = /opt/gns3/projects
appliances_path = /opt/gns3/appliances
@ -234,52 +208,15 @@ EOFC
if [ $DISABLE_KVM == 1 ]
then
log "Disable KVM support"
log "Disabling KVM support"
sed -i 's/hardware_acceleration = True/hardware_acceleration = False/g' /etc/gns3/gns3_server.conf
fi
chown -R gns3:gns3 /etc/gns3
chmod -R 700 /etc/gns3
if [ "$UBUNTU_CODENAME" == "trusty" ]
then
cat <<EOFI > /etc/init/gns3.conf
description "GNS3 server"
author "GNS3 Team"
start on filesystem or runlevel [2345]
stop on runlevel [016]
respawn
console log
script
exec start-stop-daemon --start --make-pidfile --pidfile /var/run/gns3.pid --chuid gns3 --exec "/usr/bin/gns3server"
end script
pre-start script
echo "" > /var/log/upstart/gns3.log
echo "[`date`] GNS3 Starting"
end script
pre-stop script
echo "[`date`] GNS3 Stopping"
end script
EOFI
chown root:root /etc/init/gns3.conf
chmod 644 /etc/init/gns3.conf
log "Start GNS3 service"
set +e
service gns3 stop
set -e
service gns3 start
else
# Install systemd service
cat <<EOFI > /lib/systemd/system/gns3.service
log "Installing the GNS3 systemd service"
cat <<EOFI > /lib/systemd/system/gns3.service
[Unit]
Description=GNS3 server
After=network-online.target
@ -302,15 +239,15 @@ LimitNOFILE=16384
[Install]
WantedBy=multi-user.target
EOFI
chmod 755 /lib/systemd/system/gns3.service
chown root:root /lib/systemd/system/gns3.service
log "Start GNS3 service"
systemctl enable gns3
systemctl start gns3
fi
chmod 755 /lib/systemd/system/gns3.service
chown root:root /lib/systemd/system/gns3.service
log "GNS3 installed with success"
log "Starting the GNS3 service"
systemctl enable gns3
systemctl start gns3
log "GNS3 has been installed with success"
if [ $WELCOME_SETUP == 1 ]
then
@ -319,11 +256,9 @@ gns3 ALL = (ALL) NOPASSWD: /usr/bin/apt-key
gns3 ALL = (ALL) NOPASSWD: /usr/bin/apt-get
gns3 ALL = (ALL) NOPASSWD: /usr/sbin/reboot
EOFI
NEEDRESTART_MODE=a apt-get install -y net-tools
NEEDRESTART_MODE=a apt-get install -y python3-pip
NEEDRESTART_MODE=a apt-get install -y dialog
pip install --no-input --upgrade pip
pip install --no-input pythondialog
NEEDRESTART_MODE=a apt install -y net-tools
NEEDRESTART_MODE=a apt install -y dialog
NEEDRESTART_MODE=a apt install -y python3-dialog
#Pull down welcome script from repo
curl https://raw.githubusercontent.com/GNS3/gns3-server/master/scripts/welcome.py > /usr/local/bin/welcome.py
@ -350,19 +285,15 @@ fi
if [ $USE_VPN == 1 ]
then
log "Setup VPN"
log "Setting up OpenVPN"
log "Change GNS3 to listen on VPN interface"
log "Changing the GNS3 server configuration to listen on VPN interface"
sed -i 's/host = 0.0.0.0/host = 172.16.253.1/' /etc/gns3/gns3_server.conf
log "Install packages for OpenVPN"
log "Installing the OpenVPN packages"
apt-get install -y \
openvpn \
uuid \
dnsutils \
nginx-light
apt install -y openvpn uuid dnsutils nginx-light
MY_IP_ADDR=$(dig @ns1.google.com -t txt o-o.myaddr.l.google.com +short -4 | sed 's/"//g')
@ -370,7 +301,7 @@ log "IP detected: $MY_IP_ADDR"
UUID=$(uuid)
log "Update motd"
log "Updating motd"
cat <<EOFMOTD > /etc/update-motd.d/70-openvpn
#!/bin/sh
@ -381,7 +312,7 @@ echo "http://$MY_IP_ADDR:8003/$UUID/$HOSTNAME.ovpn"
echo ""
echo "And add it to your openvpn client."
echo ""
echo "apt-get remove nginx-light to disable the HTTP server."
echo "apt remove nginx-light to disable the HTTP server."
echo "And remove this file with rm /etc/update-motd.d/70-openvpn"
EOFMOTD
chmod 755 /etc/update-motd.d/70-openvpn
@ -391,7 +322,7 @@ mkdir -p /etc/openvpn/
[ -d /dev/net ] || mkdir -p /dev/net
[ -c /dev/net/tun ] || mknod /dev/net/tun c 10 200
log "Create keys"
log "Creating OpenVPN keys"
[ -f /etc/openvpn/dh.pem ] || openssl dhparam -out /etc/openvpn/dh.pem 2048
[ -f /etc/openvpn/key.pem ] || openssl genrsa -out /etc/openvpn/key.pem 2048
@ -399,7 +330,7 @@ chmod 600 /etc/openvpn/key.pem
[ -f /etc/openvpn/csr.pem ] || openssl req -new -key /etc/openvpn/key.pem -out /etc/openvpn/csr.pem -subj /CN=OpenVPN/
[ -f /etc/openvpn/cert.pem ] || openssl x509 -req -in /etc/openvpn/csr.pem -out /etc/openvpn/cert.pem -signkey /etc/openvpn/key.pem -days 24855
log "Create client configuration"
log "Creating OpenVPN client configuration"
cat <<EOFCLIENT > /root/client.ovpn
client
nobind
@ -441,7 +372,7 @@ status openvpn-status-1194.log
log-append /var/log/openvpn-udp1194.log
EOFUDP
log "Setup HTTP server for serving client certificate"
log "Setting up an HTTP server for serving client certificate"
mkdir -p /usr/share/nginx/openvpn/$UUID
cp /root/client.ovpn /usr/share/nginx/openvpn/$UUID/$HOSTNAME.ovpn
touch /usr/share/nginx/openvpn/$UUID/index.html
@ -458,7 +389,7 @@ EOFNGINX
service nginx stop
service nginx start
log "Restart OpenVPN and GNS3"
log "Restarting OpenVPN and GNS3"
set +e
service openvpn stop
@ -466,15 +397,15 @@ service openvpn start
service gns3 stop
service gns3 start
log "Download http://$MY_IP_ADDR:8003/$UUID/$HOSTNAME.ovpn to setup your OpenVPN client after rebooting the server"
log "Please download http://$MY_IP_ADDR:8003/$UUID/$HOSTNAME.ovpn to setup your OpenVPN client after rebooting the server"
fi
if [ $WELCOME_SETUP == 1 ]
then
NEEDRESTART_MODE=a apt-get update
NEEDRESTART_MODE=a apt-get upgrade
python3 -c 'import sys; sys.path.append("/usr/local/bin/"); import welcome; ws = welcome.Welcome_dialog(); ws.repair_remote_install()'
cd /opt/gns3
su gns3
NEEDRESTART_MODE=a apt update
NEEDRESTART_MODE=a apt upgrade
python3 -c 'import sys; sys.path.append("/usr/local/bin/"); import welcome; ws = welcome.Welcome_dialog(); ws.repair_remote_install()'
cd /opt/gns3
su gns3
fi

View File

@ -65,7 +65,7 @@ setup(
zip_safe=False,
platforms="any",
python_requires=">=3.8",
setup_requires=["setuptools>=61.0"],
setup_requires=["setuptools>=45.2"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",

View File

@ -96,7 +96,7 @@ async def test_start(vm):
mock_process = MagicMock()
vm._check_requirements = AsyncioMagicMock(return_value=True)
vm._check_iou_licence = AsyncioMagicMock(return_value=True)
vm._check_iou_license = AsyncioMagicMock(return_value=True)
vm._start_ubridge = AsyncioMagicMock(return_value=True)
vm._ubridge_send = AsyncioMagicMock()
@ -108,7 +108,7 @@ async def test_start(vm):
assert vm.command_line == ' '.join(mock_exec.call_args[0])
assert vm._check_requirements.called
assert vm._check_iou_licence.called
assert vm._check_iou_license.called
assert vm._start_ubridge.called
vm._ubridge_send.assert_any_call("iol_bridge delete IOL-BRIDGE-513")
vm._ubridge_send.assert_any_call("iol_bridge create IOL-BRIDGE-513 513")
@ -123,7 +123,8 @@ async def test_start_with_iourc(vm, tmpdir):
mock_process = MagicMock()
vm._check_requirements = AsyncioMagicMock(return_value=True)
vm._check_iou_licence = AsyncioMagicMock(return_value=True)
vm._is_iou_license_check_enabled = AsyncioMagicMock(return_value=True)
vm._check_iou_license = AsyncioMagicMock(return_value=True)
vm._start_ioucon = AsyncioMagicMock(return_value=True)
vm._start_ubridge = AsyncioMagicMock(return_value=True)
vm._ubridge_send = AsyncioMagicMock()
@ -158,7 +159,7 @@ async def test_stop(vm):
process = MagicMock()
vm._check_requirements = AsyncioMagicMock(return_value=True)
vm._check_iou_licence = AsyncioMagicMock(return_value=True)
vm._check_iou_license = AsyncioMagicMock(return_value=True)
vm._start_ioucon = AsyncioMagicMock(return_value=True)
vm._start_ubridge = AsyncioMagicMock(return_value=True)
vm._ubridge_send = AsyncioMagicMock()
@ -183,7 +184,7 @@ async def test_reload(vm, fake_iou_bin):
process = MagicMock()
vm._check_requirements = AsyncioMagicMock(return_value=True)
vm._check_iou_licence = AsyncioMagicMock(return_value=True)
vm._check_iou_license = AsyncioMagicMock(return_value=True)
vm._start_ioucon = AsyncioMagicMock(return_value=True)
vm._start_ubridge = AsyncioMagicMock(return_value=True)
vm._ubridge_send = AsyncioMagicMock()
@ -376,42 +377,42 @@ def test_get_legacy_vm_workdir():
async def test_invalid_iou_file(vm, iourc_file):
hostname = socket.gethostname()
await vm._check_iou_licence()
await vm._check_iou_license()
# Missing ;
with pytest.raises(IOUError):
with open(iourc_file, "w+") as f:
f.write("[license]\n{} = aaaaaaaaaaaaaaaa".format(hostname))
await vm._check_iou_licence()
await vm._check_iou_license()
# Key too short
with pytest.raises(IOUError):
with open(iourc_file, "w+") as f:
f.write("[license]\n{} = aaaaaaaaaaaaaa;".format(hostname))
await vm._check_iou_licence()
await vm._check_iou_license()
# Invalid hostname
with pytest.raises(IOUError):
with open(iourc_file, "w+") as f:
f.write("[license]\nbla = aaaaaaaaaaaaaa;")
await vm._check_iou_licence()
await vm._check_iou_license()
# Missing licence section
with pytest.raises(IOUError):
with open(iourc_file, "w+") as f:
f.write("[licensetest]\n{} = aaaaaaaaaaaaaaaa;")
await vm._check_iou_licence()
await vm._check_iou_license()
# Broken config file
with pytest.raises(IOUError):
with open(iourc_file, "w+") as f:
f.write("[")
await vm._check_iou_licence()
await vm._check_iou_license()
# Missing file
with pytest.raises(IOUError):
os.remove(iourc_file)
await vm._check_iou_licence()
await vm._check_iou_license()
def test_iourc_content(vm):

View File

@ -239,12 +239,12 @@ async def test_list_images(qemu, tmpdir):
os.makedirs(tmp_images_dir, exist_ok=True)
for image in fake_images:
with open(os.path.join(tmp_images_dir, image), "w+") as f:
f.write("1")
f.write("1234567")
with patch("gns3server.utils.images.default_images_directory", return_value=str(tmp_images_dir)):
assert sorted(await qemu.list_images(), key=lambda k: k['filename']) == [
{"filename": "a.qcow2", "path": "a.qcow2", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1},
{"filename": "b.qcow2", "path": "b.qcow2", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1}
{"filename": "a.qcow2", "path": "a.qcow2", "md5sum": "fcea920f7412b5da7be0cf42b8c93759", "filesize": 7},
{"filename": "b.qcow2", "path": "b.qcow2", "md5sum": "fcea920f7412b5da7be0cf42b8c93759", "filesize": 7}
]
@ -255,19 +255,19 @@ async def test_list_images_recursives(qemu, tmpdir):
fake_images = ["a.qcow2", "b.qcow2", ".blu.qcow2", "a.qcow2.md5sum"]
for image in fake_images:
with open(os.path.join(tmp_images_dir, image), "w+") as f:
f.write("1")
f.write("1234567")
os.makedirs(os.path.join(tmp_images_dir, "c"))
fake_images = ["c.qcow2", "c.qcow2.md5sum"]
for image in fake_images:
with open(os.path.join(tmp_images_dir, "c", image), "w+") as f:
f.write("1")
f.write("1234567")
with patch("gns3server.utils.images.default_images_directory", return_value=str(tmp_images_dir)):
assert sorted(await qemu.list_images(), key=lambda k: k['filename']) == [
{"filename": "a.qcow2", "path": "a.qcow2", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1},
{"filename": "b.qcow2", "path": "b.qcow2", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1},
{"filename": "c.qcow2", "path": force_unix_path(os.path.sep.join(["c", "c.qcow2"])), "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1}
{"filename": "a.qcow2", "path": "a.qcow2", "md5sum": "fcea920f7412b5da7be0cf42b8c93759", "filesize": 7},
{"filename": "b.qcow2", "path": "b.qcow2", "md5sum": "fcea920f7412b5da7be0cf42b8c93759", "filesize": 7},
{"filename": "c.qcow2", "path": force_unix_path(os.path.sep.join(["c", "c.qcow2"])), "md5sum": "fcea920f7412b5da7be0cf42b8c93759", "filesize": 7}
]

View File

@ -85,7 +85,7 @@ async def test_compute_httpQuery(compute):
response.status = 200
await compute.post("/projects", {"a": "b"})
await compute.close()
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=b'{"a": "b"}', headers={'content-type': 'application/json'}, auth=None, chunked=None, timeout=20)
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=b'{"a": "b"}', headers={'content-type': 'application/json'}, auth=None, chunked=None, timeout=120)
assert compute._auth is None
@ -99,7 +99,7 @@ async def test_compute_httpQueryAuth(compute):
compute.password = "toor"
await compute.post("/projects", {"a": "b"})
await compute.close()
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=b'{"a": "b"}', headers={'content-type': 'application/json'}, auth=compute._auth, chunked=None, timeout=20)
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=b'{"a": "b"}', headers={'content-type': 'application/json'}, auth=compute._auth, chunked=None, timeout=120)
assert compute._auth.login == "root"
assert compute._auth.password == "toor"
@ -156,7 +156,7 @@ async def test_compute_httpQueryNotConnectedInvalidVersion(compute):
with asyncio_patch("aiohttp.ClientSession.request", return_value=response) as mock:
with pytest.raises(aiohttp.web.HTTPConflict):
await compute.post("/projects", {"a": "b"})
mock.assert_any_call("GET", "https://example.com:84/v2/compute/capabilities", headers={'content-type': 'application/json'}, data=None, auth=None, chunked=None, timeout=20)
mock.assert_any_call("GET", "https://example.com:84/v2/compute/capabilities", headers={'content-type': 'application/json'}, data=None, auth=None, chunked=None, timeout=120)
await compute.close()
@ -169,7 +169,7 @@ async def test_compute_httpQueryNotConnectedNonGNS3Server(compute):
with asyncio_patch("aiohttp.ClientSession.request", return_value=response) as mock:
with pytest.raises(aiohttp.web.HTTPConflict):
await compute.post("/projects", {"a": "b"})
mock.assert_any_call("GET", "https://example.com:84/v2/compute/capabilities", headers={'content-type': 'application/json'}, data=None, auth=None, chunked=None, timeout=20)
mock.assert_any_call("GET", "https://example.com:84/v2/compute/capabilities", headers={'content-type': 'application/json'}, data=None, auth=None, chunked=None, timeout=120)
await compute.close()
@ -182,7 +182,7 @@ async def test_compute_httpQueryNotConnectedNonGNS3Server2(compute):
with asyncio_patch("aiohttp.ClientSession.request", return_value=response) as mock:
with pytest.raises(aiohttp.web.HTTPConflict):
await compute.post("/projects", {"a": "b"})
mock.assert_any_call("GET", "https://example.com:84/v2/compute/capabilities", headers={'content-type': 'application/json'}, data=None, auth=None, chunked=None, timeout=20)
mock.assert_any_call("GET", "https://example.com:84/v2/compute/capabilities", headers={'content-type': 'application/json'}, data=None, auth=None, chunked=None, timeout=120)
async def test_compute_httpQueryError(compute):
@ -217,7 +217,7 @@ async def test_compute_httpQuery_project(compute):
project = Project(name="Test")
mock_notification.assert_called()
await compute.post("/projects", project)
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=json.dumps(project.__json__()), headers={'content-type': 'application/json'}, auth=None, chunked=None, timeout=20)
mock.assert_called_with("POST", "https://example.com:84/v2/compute/projects", data=json.dumps(project.__json__()), headers={'content-type': 'application/json'}, auth=None, chunked=None, timeout=120)
await compute.close()
# FIXME: https://github.com/aio-libs/aiohttp/issues/2525
@ -424,7 +424,7 @@ async def test_interfaces(compute):
response.status = 200
with asyncio_patch("aiohttp.ClientSession.request", return_value=response) as mock:
assert await compute.interfaces() == res
mock.assert_any_call("GET", "https://example.com:84/v2/compute/network/interfaces", auth=None, chunked=None, data=None, headers={'content-type': 'application/json'}, timeout=20)
mock.assert_any_call("GET", "https://example.com:84/v2/compute/network/interfaces", auth=None, chunked=None, data=None, headers={'content-type': 'application/json'}, timeout=120)
await compute.close()

View File

@ -144,7 +144,7 @@ def fake_image(tmpdir):
path = str(tmpdir / "7200.bin")
with open(path, "wb+") as f:
f.write(b'\x7fELF\x01\x01\x01')
f.write(b'\x7fELF\x01\x02\x01')
os.chmod(path, stat.S_IREAD)
return path
@ -168,7 +168,7 @@ async def test_images(compute_api, tmpdir, fake_image, fake_file):
assert response.json == [{"filename": "7200.bin",
"path": "7200.bin",
"filesize": 7,
"md5sum": "e573e8f5c93c6c00783f20c7a170aa6c"
"md5sum": "b0d5aa897d937aced5a6b1046e8f7e2e"
}]

View File

@ -45,7 +45,7 @@ def fake_qemu_vm(images_dir):
img_dir = os.path.join(images_dir, "QEMU")
bin_path = os.path.join(img_dir, "linux载.img")
with open(bin_path, "w+") as f:
f.write("1")
f.write("1234567")
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
return bin_path
@ -101,7 +101,7 @@ async def test_qemu_create_with_params(compute_api, compute_project, base_params
assert response.json["project_id"] == compute_project.id
assert response.json["ram"] == 1024
assert response.json["hda_disk_image"] == "linux载.img"
assert response.json["hda_disk_image_md5sum"] == "c4ca4238a0b923820dcc509a6f75849b"
assert response.json["hda_disk_image_md5sum"] == "fcea920f7412b5da7be0cf42b8c93759"
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
@ -279,7 +279,7 @@ async def test_images(compute_api, fake_qemu_vm):
response = await compute_api.get("/qemu/images")
assert response.status == 200
assert {"filename": "linux载.img", "path": "linux载.img", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1} in response.json
assert {"filename": "linux载.img", "path": "linux载.img", "md5sum": "fcea920f7412b5da7be0cf42b8c93759", "filesize": 7} in response.json
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Does not work on Windows")

View File

@ -114,66 +114,91 @@ def test_remove_checksum(tmpdir):
def test_list_images(tmpdir):
path1 = tmpdir / "images1" / "IOS" / "test1.image"
path1.write(b'\x7fELF\x01\x01\x01', ensure=True)
path1 = force_unix_path(str(path1))
# IOS image in the images directory
ios_image_1 = tmpdir / "images1" / "IOS" / "ios_image_1.image"
ios_image_1.write(b'\x7fELF\x01\x02\x01', ensure=True)
ios_image_1 = force_unix_path(str(ios_image_1))
path2 = tmpdir / "images2" / "test2.image"
path2.write(b'\x7fELF\x01\x01\x01', ensure=True)
path2 = force_unix_path(str(path2))
# IOS image in an additional images path
ios_image_2 = tmpdir / "images2" / "ios_image_2.image"
ios_image_2.write(b'\x7fELF\x01\x02\x01', ensure=True)
ios_image_2 = force_unix_path(str(ios_image_2))
# Invalid image because not a valid elf file
path = tmpdir / "images2" / "test_invalid.image"
path.write(b'NOTANELF', ensure=True)
# Not a valid elf file
not_elf_file = tmpdir / "images1" / "IOS" / "not_elf.image"
not_elf_file.write(b'NOTANELF', ensure=True)
not_elf_file = force_unix_path(str(not_elf_file))
# Invalid image because it is very small
small_file = tmpdir / "images1" / "too_small.image"
small_file.write(b'1', ensure=True)
if sys.platform.startswith("linux"):
path3 = tmpdir / "images1" / "IOU" / "test3.bin"
path3.write(b'\x7fELF\x02\x01\x01', ensure=True)
path3 = force_unix_path(str(path3))
# 64-bit IOU image
iou_image_1 = tmpdir / "images1" / "IOU" / "iou64.bin"
iou_image_1.write(b'\x7fELF\x02\x01\x01', ensure=True)
iou_image_1 = force_unix_path(str(iou_image_1))
# 32-bit IOU image
iou_image_2 = tmpdir / "images1" / "IOU" / "iou32.bin"
iou_image_2.write(b'\x7fELF\x01\x01\x01', ensure=True) # 32-bit IOU image
iou_image_2 = force_unix_path(str(iou_image_2))
path4 = tmpdir / "images1" / "QEMU" / "test4.qcow2"
path4.write("1", ensure=True)
path4 = force_unix_path(str(path4))
path5 = tmpdir / "images1" / "QEMU" / "test4.qcow2.md5sum"
path5.write("1", ensure=True)
path5 = force_unix_path(str(path5))
# Qemu image
qemu_image_1 = tmpdir / "images1" / "QEMU" / "qemu_image.qcow2"
qemu_image_1.write("1234567", ensure=True)
qemu_image_1 = force_unix_path(str(qemu_image_1))
# ELF file inside the Qemu
elf_file = tmpdir / "images1" / "QEMU" / "elf_file.bin"
elf_file.write(b'\x7fELF\x02\x01\x01', ensure=True) # ELF file
elf_file = force_unix_path(str(elf_file))
md5sum_file = tmpdir / "images1" / "QEMU" / "image.qcow2.md5sum"
md5sum_file.write("1", ensure=True)
md5sum_file = force_unix_path(str(md5sum_file))
with patch("gns3server.config.Config.get_section_config", return_value={
"images_path": str(tmpdir / "images1"),
"additional_images_path": "/tmp/null24564;{}".format(str(tmpdir / "images2")),
"local": False}):
assert list_images("dynamips") == [
assert sorted(list_images("dynamips"), key=lambda k: k['filename']) == [
{
'filename': 'test1.image',
'filename': 'ios_image_1.image',
'filesize': 7,
'md5sum': 'e573e8f5c93c6c00783f20c7a170aa6c',
'path': 'test1.image'
'md5sum': 'b0d5aa897d937aced5a6b1046e8f7e2e',
'path': 'ios_image_1.image'
},
{
'filename': 'test2.image',
'filename': 'ios_image_2.image',
'filesize': 7,
'md5sum': 'e573e8f5c93c6c00783f20c7a170aa6c',
'path': str(path2)
'md5sum': 'b0d5aa897d937aced5a6b1046e8f7e2e',
'path': str(ios_image_2)
}
]
if sys.platform.startswith("linux"):
assert list_images("iou") == [
assert sorted(list_images("iou"), key=lambda k: k['filename']) == [
{
'filename': 'test3.bin',
'filename': 'iou32.bin',
'filesize': 7,
'md5sum': 'e573e8f5c93c6c00783f20c7a170aa6c',
'path': 'iou32.bin'
},
{
'filename': 'iou64.bin',
'filesize': 7,
'md5sum': 'c73626d23469519894d58bc98bee9655',
'path': 'test3.bin'
}
'path': 'iou64.bin'
},
]
assert list_images("qemu") == [
assert sorted(list_images("qemu"), key=lambda k: k['filename']) == [
{
'filename': 'test4.qcow2',
'filesize': 1,
'md5sum': 'c4ca4238a0b923820dcc509a6f75849b',
'path': 'test4.qcow2'
'filename': 'qemu_image.qcow2',
'filesize': 7,
'md5sum': 'fcea920f7412b5da7be0cf42b8c93759',
'path': 'qemu_image.qcow2'
}
]