Compare commits

..

5670 Commits

Author SHA1 Message Date
b2db8896ea Release v3.0.0rc2 2024-11-20 14:00:49 +10:00
a22f7ac3d2 Bundle web-ui v3.0.0rc2 2024-11-20 13:51:15 +10:00
e19af851c1 Sync appliances 2024-11-20 12:39:39 +10:00
a00f53fbaa Fix error 500 on PUT for cloud, nat, vmware and vpcs nodes. Fixes #2426 2024-11-19 12:21:35 +10:00
8db81de153 Merge pull request #2445 from GNS3/bugfix/2426
Fix issue with asyncio.Queue
2024-11-18 14:00:20 +10:00
fa0d7d7529 Use call_soon_threadsafe() in notification manager 2024-11-18 12:13:41 +10:00
bd813b0a53 Merge branch '2.2' into 3.0
# Conflicts:
#	requirements.txt
#	setup.py
2024-11-18 11:46:42 +10:00
b37db57bb9 Fix tests 2024-11-17 15:00:13 +10:00
31a2cb998d Fix issue with asyncio.Queue which is not thread safe. 2024-11-17 14:39:22 +10:00
e83e12b51a Add a duplicated project in the same resource pools as the original project if it is in any 2024-11-17 14:03:47 +10:00
a7da814b85 Upgrade FastAPI to v0.115.5 2024-11-13 12:10:04 +10:00
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
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
db1fb29c63 Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy 2024-11-08 12:46:55 +10:00
ec9dbd20b8 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/crash_report.py
#	gns3server/version.py
2024-11-07 23:18:42 +10:00
a5f0dba5cf Development on 2.2.52.dev1 2024-11-07 23:13:31 +10:00
754680d8e9 Release v2.2.51 2024-11-07 15:08:27 +10:00
05773ce189 Sync appliances 2024-11-07 15:06:06 +10:00
aeae9deb01 Merge remote-tracking branch 'origin/2.2' into 2.2 2024-11-07 14:53:23 +10:00
f3749e83ec Catch error when cannot resize Docker container TTY. 2024-11-07 14:52:59 +10:00
c2db4e8542 Merge pull request #2439 from GNS3/bugfix/2438
Fix disk interface is being overriden when set to none
2024-11-07 14:52:08 +10:00
52a7696618 Fix tests 2024-11-07 14:48:57 +10:00
7bf17392dd Do not use "ide" if there is a disk image and no interface type has been explicitly configured. 2024-11-07 14:37:26 +10:00
2718224dde Increase SQLite timeout. Ref #2422 2024-10-31 21:31:03 +10:00
0122070b29 Merge pull request #2435 from GNS3/upgrade-dependencies
Upgrade dependencies
2024-10-31 20:56:30 +10:00
345ecb7630 Upgrade dev dependencies 2024-10-31 20:49:12 +10:00
ae538dd11d Fix test user with wrong creds 2024-10-31 19:31:17 +10:00
ce4dd17409 Upgrade fastapi and fix tests 2024-10-31 19:23:28 +10:00
8c7c17b889 Upgrade dependencies and fix Pydantic warnings 2024-10-31 17:09:52 +10:00
1530bdfc2b Disable Python 3.13 testing 2024-10-31 13:53:25 +10:00
74d07173c1 Upgrade aiohttp to v3.10.10. Fixes #2411 2024-10-31 13:48:22 +10:00
ec300d19d4 Replace aiohttp.web.HTTPConflict() 2024-10-31 13:11:01 +10:00
fb06eb3c0c Remove old debug message 2024-10-31 13:07:09 +10:00
7e902726bf Fix issues after merge 2024-10-31 13:06:17 +10:00
c4fcb43e78 Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	README.md
#	dev-requirements.txt
#	gns3server/compute/docker/docker_vm.py
#	gns3server/controller/export_project.py
#	gns3server/controller/import_project.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.df8c319a3da6fb0e3629.js
#	gns3server/version.py
#	requirements.txt
#	setup.py
#	tests/compute/docker/test_docker_vm.py
#	tests/controller/test_import_project.py
2024-10-31 12:54:35 +10:00
753135a80d Merge branch 'master' into 2.2 2024-10-28 17:32:34 +10:00
c05e1cb8e7 Use @locking when sending uBridge commands. Ref https://github.com/GNS3/gns3-gui/issues/3651 2024-10-28 13:02:04 +10:00
48b7e6ca50 Fix run Docker containers with user namespaces enabled. Fixes #2414 2024-10-26 19:03:05 +10:00
dbe2b8a5fb Python 3.13 support 2024-10-26 18:38:07 +10:00
80487eb62d Upgrade dependencies 2024-10-26 18:22:40 +10:00
6e66b26b88 Fix errors in init.sh. Fixes #2431 2024-10-22 12:18:28 +10:00
9990666076 Development on 2.2.51.dev1 2024-10-21 13:24:14 +10:00
97e5a5edc3 Merge pull request #2430 from GNS3/2.2
Release v2.2.50
2024-10-21 13:21:24 +10:00
2b5c6ce8fb Release v2.2.50 2024-10-21 12:14:18 +10:00
0aac62d03a Bundle web-ui v2.2.50 2024-10-21 12:08:42 +10:00
4058abf16e Sync appliances 2024-10-21 11:54:02 +10:00
4357410b10 Do not run tests on Windows (temporarily) 2024-10-19 17:13:13 +10:00
734365b216 Fix win10pcap installation in tests 2024-10-19 17:04:10 +10:00
abb7cc2075 Install win10pcap in tests 2024-10-19 17:00:32 +10:00
c273a78560 Upgrade pytest to v8.3.3 2024-10-19 16:33:54 +10:00
718269e5b3 Fix syntax error in testing.yml 2024-10-19 16:23:46 +10:00
19fd7d2193 Install Windows dependencies in GH Actions 2024-10-19 16:22:29 +10:00
e62ffb1b87 Fix testing on Windows with GH Actions 2024-10-19 16:12:06 +10:00
42808161bf Replace AppVeyor testing with GH Actions 2024-10-19 16:07:53 +10:00
45ee662c56 Merge pull request #2428 from GNS3/bugfix/2427
Symbolic links support for project export/import
2024-10-19 15:54:41 +10:00
24bfc205db Symbolic links support for project export/import 2024-10-19 15:49:23 +10:00
cb46c0fbcc Merge remote-tracking branch 'origin/2.2' into 2.2 2024-10-14 17:48:42 +10:00
35256901b5 Add comment to indicate sentry-sdk is optional. Ref https://github.com/GNS3/gns3-server/issues/2423 2024-10-14 17:46:53 +10:00
6933c3d938 Merge pull request #2420 from GNS3/bugfix/2419
Fix issues with recent busybox versions
2024-10-01 17:37:44 +07:00
8af71ee291 Formatting 2024-10-01 17:35:11 +07:00
c0be6875c2 Fix issues with recent busybox versions
* `busybox --install` does not exist
* `sleep` does not take float values (e.g. 0.5).
2024-10-01 17:31:29 +07:00
a1922ef067 Merge pull request #2413 from z5241248/master
Duplicate faster
2024-09-29 19:44:49 +07:00
cafdb2522b Add / update docstrings 2024-09-29 19:42:06 +07:00
f7996d5e98 Fix tests 2024-09-27 20:05:06 +07:00
996dad2f5c Support to reset MAC addresses for Docker nodes and some adjustments for fast duplication. 2024-09-26 18:41:23 +07:00
1332e940fd Merge branch '2.2' into master 2024-09-26 16:26:56 +07:00
19bd953d31 Update README.md to change the minimum required Python version. 2024-09-26 16:25:26 +07:00
3a896b6964 Duplicate faster - 2 2024-09-26 08:26:08 +08:00
441f0fb1b5 Merge remote-tracking branch 'z5241248/master' into fork/z5241248/master 2024-09-25 19:45:44 +07:00
a02b57698a Add missing imports 2024-09-25 19:45:14 +07:00
7582107ae5 Merge branch '2.2' into master 2024-09-25 19:41:40 +07:00
2dbde5df22 Copying project files directly, rather than copying them in an import-export fashion, can make copying projects many times faster 2024-09-25 20:27:46 +08:00
a7b56739a9 Fixes after merging 2024-09-23 14:08:24 +07:00
8ce0cbf7f7 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/dynamips/nodes/c1700.py
#	gns3server/compute/dynamips/nodes/c2600.py
#	gns3server/compute/dynamips/nodes/c2691.py
#	gns3server/compute/dynamips/nodes/c3600.py
#	gns3server/compute/dynamips/nodes/c3725.py
#	gns3server/compute/dynamips/nodes/c3745.py
#	gns3server/compute/dynamips/nodes/c7200.py
#	gns3server/compute/dynamips/nodes/router.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/node.py
#	gns3server/controller/topology.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/schemas/docker.py
#	gns3server/schemas/docker_template.py
#	gns3server/schemas/dynamips_template.py
#	gns3server/schemas/dynamips_vm.py
#	gns3server/schemas/node.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
2024-09-23 13:28:56 +07:00
7b5d123ad8 Improve error message when a project cannot be parsed. 2024-09-23 13:23:03 +07:00
d1a7474ef6 Merge pull request #2418 from GNS3/revert-2417-backport-aux-console-support
Revert "Backport auxiliary console support for Qemu, Docker and Dynamips nodes"
2024-09-23 13:15:34 +07:00
af6f34b2ca Revert "Backport auxiliary console support for Qemu, Docker and Dynamips nodes" 2024-09-23 13:10:58 +07:00
d3138daa23 Fix Docker tests 2024-09-22 22:12:40 +07:00
967c7d066d Delete old code after merging 2024-09-22 22:02:14 +07:00
7619080a50 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/dynamips/nodes/c1700.py
#	gns3server/compute/dynamips/nodes/c2600.py
#	gns3server/compute/dynamips/nodes/c2691.py
#	gns3server/compute/dynamips/nodes/c3600.py
#	gns3server/compute/dynamips/nodes/c3725.py
#	gns3server/compute/dynamips/nodes/c3745.py
#	gns3server/compute/dynamips/nodes/c7200.py
#	gns3server/compute/dynamips/nodes/router.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/node.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/schemas/docker.py
#	gns3server/schemas/docker_template.py
#	gns3server/schemas/dynamips_template.py
#	gns3server/schemas/dynamips_vm.py
#	gns3server/schemas/node.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
2024-09-22 22:01:06 +07:00
f1294cf267 Merge pull request #2417 from GNS3/backport-aux-console-support
Backport auxiliary console support for Qemu, Docker and Dynamips nodes
2024-09-22 21:44:31 +07:00
74782d413f Change method to allocate AUX console for existing Dynamips nodes 2024-09-22 21:41:10 +07:00
c41c11eb34 Backport auxiliary console support for Qemu, Docker and Dynamips nodes 2024-09-22 18:29:04 +07:00
1f09a3e6bc Merge pull request #2416 from GNS3/bugfix/2414
Run Docker containers with user namespaces enabled
2024-09-19 11:01:11 +07:00
22f022cc22 Fix for running Docker containers with user namespaces enabled 2024-09-19 10:40:22 +07:00
8429494280 Test base MAC address for Docker VMs 2024-09-19 10:19:07 +07:00
a1666dd247 Fix MAC address support for Docker containers 2024-09-18 18:02:35 +07:00
3214f52e9e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/schemas/docker.py
#	gns3server/schemas/docker_template.py
#	tests/compute/docker/test_docker_vm.py
2024-09-18 17:29:06 +07:00
ddd6235acd Merge branch 'master' into 2.2 2024-09-18 17:14:21 +07:00
bcc148bbd2 Merge pull request #2415 from GNS3/docker-mac-address
Support for custom MAC addresses in Docker containers
2024-09-18 04:05:18 -06:00
3792901dc7 Support for configuring MAC address in Docker containers 2024-09-18 16:30:22 +07:00
5ffe5fd9b3 Copying project files directly, rather than copying them in an import-export fashion, can make copying projects many times faster 2024-08-23 14:31:21 +08:00
9bcf26b943 Release v3.0.0rc1 2024-08-11 11:35:19 -06:00
b80e1f3a22 Downgrade aiohttp to v3.9.5 2024-08-11 11:22:20 -06:00
ba13b0b078 Bundle web-ui v3.0.0rc1 2024-08-11 11:09:27 -06:00
90c69d95ad Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.99a70a8d013fc974361c.js
#	gns3server/version.py
#	requirements.txt
2024-08-10 18:58:43 -06:00
69a5b16bad Upgrade aiohttp to v3.10.3 2024-08-11 01:34:30 +02:00
21a5c5d3f2 Development on 2.2.50.dev1 2024-08-06 20:33:54 +02:00
225779bc11 Merge pull request #2409 from GNS3/2.2
Release v2.2.49
2024-08-06 20:32:41 +02:00
b1209155f5 Release v2.2.49 2024-08-06 12:55:15 +02:00
7cebb9472a Bundle web-ui v2.2.49 2024-08-06 12:41:06 +02:00
00c3b1abc1 Merge remote-tracking branch 'origin/master' into 2.2 2024-08-06 12:37:55 +02:00
b1c1c0520c Sync appliances 2024-08-06 12:34:07 +02:00
2bb26075f0 Forbid -nic and -nicdev in Qemu additional options. Fixes https://github.com/GNS3/gns3-server/issues/2397 2024-08-05 17:51:46 +02:00
54e436394f Upgrade packages in requirements.txt 2024-08-03 16:35:17 +02:00
9046c60811 Fix tests by downgrading pytest-asyncio 2024-08-03 13:15:36 +02:00
24cace8122 Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	dev-requirements.txt
#	requirements.txt
#	setup.py
2024-08-03 12:58:19 +02:00
6746ef39be Upgrade development packages 2024-08-03 12:32:43 +02:00
8889eaa439 Upgrade jsonschema and sentry-sdk packages 2024-08-03 12:32:06 +02:00
95a4c284bc Update IOU base configs to use "no ip domain lookup". Fixes #2404 2024-07-22 19:07:17 +02:00
9a3bd2ee0c Merge pull request #2406 from GNS3/feature/convert-invalid-node-names
Convert node hostnames for topologies
2024-07-20 18:01:50 +02:00
2416069a6e Update _convert_2.2.0() with correct comments 2024-07-20 17:55:38 +02:00
eefb3d87b2 Fix tests and add conversion test 2024-07-20 17:47:25 +02:00
999f41b03e Convert topologies < 3.0 to have valid node hostnames 2024-07-20 17:22:24 +02:00
ea339af1e9 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.a1204c9aa64b1cc15d28.js
2024-07-13 17:19:03 +02:00
6951137a25 Development on 2.2.49.dev1 2024-07-13 16:32:13 +02:00
cccbca3d5e Merge pull request #2401 from GNS3/release/v2.2.48.1
Release v2.2.48.1
2024-07-13 14:43:53 +02:00
8659439829 Release v2.2.48.1 2024-07-12 18:26:16 +02:00
677bc389a5 Bundle web-ui v2.2.48.1 2024-07-11 23:44:24 +02:00
3f7f5a3cda Fix to access resources_path and install_builtin_appliances settings 2024-07-09 12:28:39 +02:00
59ad5c55ec Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/config_samples/gns3_server.conf
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.b65e52314df938ebe652.js
#	gns3server/version.py
2024-07-09 12:14:44 +02:00
4a58ede550 Development on 2.2.49.dev1 2024-07-09 00:32:44 +02:00
3f5b0bb514 Merge pull request #2395 from GNS3/2.2
Release v2.2.48
2024-07-09 00:30:55 +02:00
6e8e0764c1 Release v2.2.48 2024-07-08 18:44:09 +02:00
eaa18ad624 Bundle web-ui v2.2.48 2024-07-08 18:24:02 +02:00
0a32be276e Sync appliances 2024-07-08 18:18:25 +02:00
271c958381 Merge pull request #2394 from GNS3/bugfix/2226
New path settings for the server config
2024-07-08 18:16:27 +02:00
ca1d99b112 Add 'install_builtin_appliances' and 'resources_path' settings in the server config 2024-07-08 18:06:33 +02:00
6b14abc06f Add allow_unsafe_options for Qemu settings 2024-07-07 19:08:12 +02:00
6ed18c561f Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/config_samples/gns3_server.conf
#	gns3server/controller/export_project.py
#	gns3server/controller/project.py
#	gns3server/controller/snapshot.py
#	gns3server/handlers/api/controller/project_handler.py
#	tests/controller/test_export_project.py
#	tests/controller/test_import_project.py
#	tests/controller/test_snapshot.py
2024-07-07 19:04:50 +02:00
90dce03da2 Merge pull request #2392 from GNS3/bugfix/2385
Forbid unsafe Qemu additional options
2024-07-06 17:18:59 +02:00
b48bd92da3 Merge pull request #2393 from GNS3/feature/keep-compute-ids
Option to keep the compute IDs unchanged when exporting a project
2024-07-06 17:12:38 +02:00
d54c9db8c3 Option to keep the compute IDs unchanged when exporting a project 2024-07-06 17:08:16 +02:00
b194e48649 Forbid unsafe Qemu additional options 2024-07-06 12:24:22 +02:00
29f848d833 Merge pull request #2391 from GNS3/bugfix/2388
Fix issues with invalid snapshot filenames
2024-07-05 12:49:59 +02:00
08154e43aa Fix error when snapshot exists with an underscore in the name 2024-07-05 12:04:53 +02:00
45a0644371 Upgrade request and sqlalchemy packages 2024-07-03 19:05:05 +02:00
3a4ffb8786 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/utils/__init__.py
#	requirements.txt
2024-07-03 19:00:44 +02:00
84efc55d02 Upgrade sentry-sdk, psutil and aiofiles packages 2024-07-03 18:53:14 +02:00
fec0220b55 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2024-07-01 18:53:21 +02:00
a58fb320ac Merge pull request #2387 from GNS3/bugfix/3588
Fix check to test if IPv6 is enabled on host
2024-06-17 16:54:20 +02:00
39057bd781 Fix check for IPv6 enabled on host 2024-06-17 16:41:40 +02:00
0f3b96f134 Development on 2.2.48.dev1 2024-05-23 12:19:15 +07:00
df210386dd Development on 3.0.0.dev14 2024-05-19 20:57:11 +07:00
3e512e650a Release v3.0.0b3 2024-05-19 17:23:16 +07:00
e50e2c90bd Bundle web-ui v3.0.0b3 2024-05-19 17:16:52 +07:00
c1f9f1111d Sync appliances 2024-05-19 17:13:07 +07:00
8c1dbf0084 Fix to allow duplicating IOS routers 2024-05-19 00:33:55 +07:00
6f2b12c218 Fix to allow changing the auxiliary console for IOS router nodes. 2024-05-18 23:43:50 +07:00
4b1068e02f Replace deprecated method datetime.utcnow() 2024-05-18 23:33:26 +07:00
d56acc5844 Upgrade FastAPI to v0.111.0 2024-05-18 23:31:22 +07:00
d477eb8366 Fix reset console for non running IOU devices 2024-05-18 23:30:58 +07:00
35f94b0c73 Merge pull request #2382 from GNS3/update-ga-workflows
Update GitHub Action workflows
2024-05-17 12:22:43 +07:00
b82b9a64e6 Rename codeql.yml back to codeql-analysis.yml 2024-05-17 12:19:38 +07:00
901652aaeb Update GitHub Action workflows 2024-05-17 12:14:47 +07:00
990dabb7e4 Do not allow to create a builtin template using the API. 2024-05-17 00:05:25 +07:00
3ab74b8094 Development on 3.0.0.dev13 2024-05-16 19:18:53 +07:00
5cd540d94d Remove old files 2024-05-16 17:57:51 +07:00
d3860ba84b Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	dev-requirements.txt
#	gns3server/compute/qemu/__init__.py
#	gns3server/compute/vmware/__init__.py
#	gns3server/controller/snapshot.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/compute/atm_switch_handler.py
#	gns3server/run.py
#	gns3server/static/web-ui/26.77d4bfd104f37c42e028.js
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/runtime.415291667f70565cd8ef.js
#	gns3server/utils/__init__.py
#	gns3server/utils/images.py
#	gns3server/utils/interfaces.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	pytest.ini
#	requirements.txt
#	scripts/update-bundled-web-ui.sh
#	setup.py
#	tests/api/routes/compute/test_dynamips_nodes.py
#	tests/compute/builtin/nodes/test_cloud.py
#	tests/compute/docker/test_docker.py
#	tests/compute/docker/test_docker_vm.py
#	tests/compute/dynamips/test_dynamips_manager.py
#	tests/compute/dynamips/test_dynamips_router.py
#	tests/compute/iou/test_iou_vm.py
#	tests/compute/qemu/test_qcow2.py
#	tests/compute/qemu/test_qemu_manager.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/compute/test_base_node.py
#	tests/compute/test_manager.py
#	tests/compute/test_project.py
#	tests/compute/traceng/test_traceng_vm.py
#	tests/compute/virtualbox/test_virtualbox_manager.py
#	tests/compute/virtualbox/test_virtualbox_vm.py
#	tests/compute/vmware/test_vmware_manager.py
#	tests/compute/vmware/test_vmware_vm.py
#	tests/compute/vpcs/test_vpcs_vm.py
#	tests/conftest.py
#	tests/controller/gns3vm/test_remote_gns3_vm.py
#	tests/controller/gns3vm/test_virtualbox_gns3_vm.py
#	tests/controller/gns3vm/test_vmware_gns3_vm.py
#	tests/controller/test_export_project.py
#	tests/controller/test_gns3vm.py
#	tests/controller/test_import_project.py
#	tests/test_config.py
#	tests/utils/test_asyncio.py
#	tests/utils/test_images.py
#	tests/web/test_response.py
2024-05-16 17:53:39 +07:00
3e133eda44 Bundle web-ui v3.0.0b3 2024-05-16 17:30:12 +07:00
e01256980c Sync appliances 2024-05-16 17:27:38 +07:00
aabfe9eadc Use cryptography backend for python-jose. Ref #2372 2024-05-16 15:01:05 +07:00
6c9a3b634b Merge pull request #2381 from GNS3/release/v2.2.47
Release v2.2.47
2024-05-15 17:06:53 +07:00
0561aba927 Release v2.2.47 2024-05-15 12:14:48 +07:00
86a78f53cb Fix update-bundled-web-ui.sh script 2024-05-15 12:05:43 +07:00
f0bc74ff6e Bundle web-ui v2.2.47 2024-05-15 12:04:34 +07:00
f81128f717 Bundle web-ui v2.2.47 2024-05-15 11:55:47 +07:00
9ce505cad3 Sync appliances 2024-05-15 11:43:04 +07:00
314e01d2b4 Ensure Python >= 3.8 is used in pyproject.toml 2024-05-12 16:44:09 +07:00
6b8635f7d5 Merge pull request #2380 from GNS3/drop-python3.7
Drop Python 3.7
2024-05-09 19:10:04 +07:00
388ffe9f00 Change sentry-sdk version 2024-05-09 19:03:08 +07:00
d01129a3cf Upgrade aiohttp, sentry-sdk and truststore 2024-05-09 18:58:37 +07:00
535ea0ad9f Upgrade jsonschema and aiohttp 2024-05-09 18:37:40 +07:00
ccb5de6df1 Drop Python 3.7 2024-05-09 18:23:58 +07:00
cdcfc652db Merge pull request #2379 from GNS3/fix-warnings-in-tests
Fix warnings in tests
2024-05-09 18:13:13 +07:00
7030dadbcb Remove dev requirements for Python 3.6 2024-05-09 18:04:19 +07:00
46a9fdb61d Remove event_loop 2024-05-09 17:53:02 +07:00
9958b876cf Do not run Docker VM tests on Windows 2024-05-09 17:36:58 +07:00
259d3a0155 Fix cannot import UTC 2024-05-09 17:23:32 +07:00
33499be425 Fix warnings in tests 2024-05-09 17:11:12 +07:00
3fd44f5260 Do not wait for the server to close when shutting down. 2024-05-09 16:37:45 +07:00
c076275bd0 Fix test create image with not supported characters by filesystem. Fixes #2375 2024-05-09 16:01:55 +07:00
081447ba2e Fix tests. Ref #2376 2024-05-09 15:37:42 +07:00
3df7af12e1 Allow listing x86_64 IOU images. Fixes #2376 2024-05-09 15:21:05 +07:00
d9e4ce5639 Upgrade Jinja2 to version 3.1.4. Fixes #2378 2024-05-08 18:08:00 +07:00
689d476b71 Fix tests 2024-04-28 18:03:06 +07:00
f1701e3f09 Upgrade fastapi and platformdirs 2024-04-27 23:21:58 +07:00
38df4bea2e Do not return an error if an image has already been uploaded 2024-04-26 19:02:50 +07:00
35b75f0f7f Fix link capture for ATM switch. Fixes https://github.com/GNS3/gns3-gui/issues/3570 2024-04-23 18:35:36 +07:00
2609849507 Fix tests after updating error message when busybox is not installed. 2024-04-23 18:00:37 +07:00
448b94f701 Add more details to error message when busybox is not installed. Fixes https://github.com/GNS3/gns3-gui/issues/3569 2024-04-23 17:54:06 +07:00
18002a7580 Fix invalid escape sequences 2024-04-23 16:52:28 +07:00
644e659729 Use NAT symbol for builtin NAT template 2024-04-22 19:11:58 +07:00
1c37e8bd32 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/symbol_themes.py
#	gns3server/controller/template_manager.py
2024-04-22 19:08:45 +07:00
1414bdcadf Merge pull request #2369 from GNS3/feature/nat-symbols
NAT symbols
2024-04-22 19:00:19 +07:00
b6e68ba1a8 Add NAT symbols 2024-04-22 18:51:29 +07:00
19142d97bb Merge pull request #2366 from GNS3/bugfix/block-iou-call
Block IOU phone home call using IPtable
2024-04-20 15:53:39 +07:00
faf7e09ebb Only use iptable to block xml.cisco.com on Ubuntu Focal. 2024-04-20 15:45:28 +07:00
84f7337cb1 Release v3.0.0b2 2024-04-07 18:52:24 +07:00
e11621467b Remove old files 2024-04-07 18:28:00 +07:00
123123d767 Bundle web-ui v3.0.0b2 2024-04-07 18:23:59 +07:00
b3bdeb611e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2024-04-07 12:44:01 +07:00
7a229e33f9 Sync appliances 2024-04-07 12:43:15 +07:00
4959a51ce7 Block IOU phone home call using IPtable 2024-04-06 13:04:20 +07:00
5b1ba5a57c Fix cannot stop Docker VM while console connection is still active. 2024-04-04 22:57:33 +07:00
bc1a8c99d1 Fix cannot stop Docker VM while console connection is still active. 2024-04-04 22:17:21 +07:00
ae64f15386 Merge pull request #2365 from GNS3/feature/custom-qemu-path
Support for custom Qemu paths
2024-04-03 21:24:13 +07:00
123b5d0800 Support for custom Qemu path in templates and nodes 2024-04-03 21:16:40 +07:00
e1d3ee12b9 Merge pull request #2364 from GNS3/bugfix/3572
Fix CPUs limitation for Docker containers does not allow fractional values
2024-04-03 17:37:07 +07:00
998898a471 Fix CPU fractional values for Docker VMs. 2024-04-03 17:15:10 +07:00
9b66d939d2 Support for cooperative signal handling of uvicorn v0.29.0 2024-04-03 15:58:10 +07:00
fd60bda2c2 Downgrade pytest-asyncio to v0.21.1 2024-04-02 13:28:18 +07:00
c5f4e25756 Upgrade uvicorn, fastapi and sqlalchemy packages 2024-04-02 13:18:22 +07:00
16bad6e0b5 Downgrade httpx_ws to v0.4.2 2024-03-24 18:37:31 +01:00
8e661df981 Upgrade dev packages 2024-03-24 18:31:56 +01:00
31c7fe88f1 Remove websocket.close() 2024-03-16 16:00:27 +01:00
03b491f7b1 Merge pull request #2362 from GNS3/feature/use-bcrypt
Use bcrypt direcrtly instead of passlib
2024-03-08 01:33:41 +08:00
fa41d9ba75 Use bcrypt directly instead of passlib 2024-03-07 18:17:17 +01:00
a80aed5420 Development on 2.2.47.dev1 2024-03-05 01:07:16 +08:00
e9827653ae Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/version.py
#	tests/compute/docker/test_docker_vm.py
2024-03-05 01:05:46 +08:00
9da8d1ec0f Upgrade uvicorn, fastapi, python-multipart, sqlalchemy, aiosqlite and email-validator dependencies 2024-03-05 01:03:59 +08:00
a53fd2e8b1 Upgrade sentry-sdk to version 1.40.6 2024-03-05 00:45:26 +08:00
5bab4131e1 Merge pull request #2361 from GNS3/release/v2.2.46
Release v2.2.46
2024-02-26 17:51:46 +08:00
e8a7e80456 Release v2.2.46 2024-02-26 16:55:12 +08:00
ab05784c33 Sync appliances 2024-02-26 16:45:37 +08:00
6983e686ca Bundle web-ui v2.2.46 2024-02-26 16:42:46 +08:00
3631202ce5 Merge remote-tracking branch 'origin/2.2' into 2.2 2024-02-26 16:36:21 +08:00
8d8a3247c4 Bundle web-ui v2.2.46 2024-02-26 16:35:47 +08:00
d100a132d6 Merge pull request #2360 from GNS3/bugfix/3555
Fix export project
2024-02-26 16:27:39 +08:00
52638a9a8d Merge branch '2.2' into bugfix/3555 2024-02-26 16:22:15 +08:00
9a5af82a28 Save empty directories when exporting a project 2024-02-24 19:02:16 +08:00
14a618766d Merge pull request #2359 from GNS3/bugfix/2357
Fix Docker VM hasn't access to all resources
2024-02-22 19:37:55 +08:00
0137688ba7 Test busybox is installed 2024-02-22 13:05:48 +08:00
84db3b9996 Fix not all Docker resources are copied to a writable location 2024-02-22 12:59:44 +08:00
800920e3df Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/run.py
#	requirements.txt
#	setup.py
#	tests/compute/docker/test_docker_vm.py
2024-02-21 12:24:30 +08:00
14917580ac Downgrade to alembic v1.12.1 2024-02-15 18:42:05 +08:00
4c65426e97 Revert "Downgrade platformdirs to v4.0.0"
This reverts commit fd85e49220.
2024-02-15 15:22:28 +08:00
fd85e49220 Downgrade platformdirs to v4.0.0 2024-02-15 15:17:25 +08:00
0a08031d85 Merge pull request #2355 from GNS3/refactor/busybox
Install Docker resources in writable location
2024-02-14 16:18:25 +08:00
1a53c9aabf Backport from v3: install Docker resources in a writable location at runtime. 2024-02-14 16:13:45 +08:00
1f5085608c Use Docker API v1.24 to get version. 2024-02-14 15:40:19 +08:00
16f72b4d3d Merge pull request #2347 from SpikefishSolutions/DeadTelnetConsoleFix
Address the telnet console death bug.
2024-02-09 20:33:16 +11:00
3ced41633f Upgrade dependencies 2024-02-09 17:07:35 +11:00
4fa10be5aa Merge pull request #2353 from GNS3/feature/drop-python-3.6
Drop Python 3.6 support
2024-02-09 17:01:40 +11:00
f050fc7e00 Change runtime checks for Python version 2024-02-09 16:49:58 +11:00
c93aafc9af Fix aiohttp dependency for Python 3.7 2024-02-09 16:45:46 +11:00
93520b4d6c Do not test with Python 3.6 2024-02-09 16:34:44 +11:00
1fb0260ae6 Drop support for Python 3.6 2024-02-09 16:28:23 +11:00
91fd543321 Upgrade dependencies 2024-02-09 16:15:19 +11:00
763ef24108 Address the telnet console bug. Add wait_for for drain() call. If we're stuck on drain then the buffer isn't getting emptied. 5 seconds after drain() blocks, exception will be thrown and client will be removed from connection table and will no longer be a problem. 2024-02-02 22:09:31 -05:00
17aabd6cda Merge branch 'master' into 2.2 2024-01-28 20:04:19 +11:00
d94adf4c8f Merge remote-tracking branch 'origin/master' 2024-01-28 19:56:40 +11:00
4dd9cf2da2 Merge pull request #2340 from spikefishjohn/patch-3
Update telnet_server.py
2024-01-28 19:56:26 +11:00
d6f8069739 Remove files from 2.2 doc 2024-01-28 13:03:06 +11:00
0037f31553 Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	docs/api/notifications/link.updated.json
#	docs/api/notifications/log.warning.json
#	docs/api/v2/compute/ethernet_switch/projectsprojectidethernetswitchnodes.rst
#	docs/api/v2/compute/ethernet_switch/projectsprojectidethernetswitchnodesnodeid.rst
#	docs/api/v2/compute/iou/projectsprojectidiounodes.rst
#	docs/api/v2/compute/project/projects.rst
#	docs/api/v2/compute/qemu/projectsprojectidqemunodes.rst
#	docs/api/v2/compute/qemu/projectsprojectidqemunodesnodeid.rst
#	docs/api/v2/compute/qemu/projectsprojectidqemunodesnodeidstart.rst
#	docs/api/v2/controller/link/projectsprojectidlinks.rst
#	docs/api/v2/controller/link/projectsprojectidlinkslinkid.rst
#	docs/api/v2/controller/link/projectsprojectidlinkslinkidstartcapture.rst
#	docs/api/v2/controller/project/projects.rst
#	docs/api/v2/controller/project/projectsprojectidduplicate.rst
#	docs/controller_notifications.rst
#	docs/curl.rst
#	docs/gns3_file.json
#	docs/project_notifications.rst
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/schemas/ethernet_hub.py
#	gns3server/schemas/ethernet_switch.py
#	gns3server/static/web-ui/3rdpartylicenses.txt
#	gns3server/static/web-ui/index.html
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
#	tests/controller/test_project.py
#	tests/controller/test_topology.py
#	tests/handlers/api/controller/test_project.py
2024-01-28 12:30:43 +11:00
e2a3d391d8 Merge remote-tracking branch 'origin/2.2' into 2.2 2024-01-28 12:14:28 +11:00
6c5f54fe57 Update telnet_server.py
Maybe use the correct object name this time for the socket objects.
2024-01-28 12:14:07 +11:00
082fbee1bd Update telnet_server.py
Set tcp keepalive timers to 60 seconds. Seems to default to 2 hours on ubuntu 22. Most firewalls will age out an idle tcp session at 1 hour.

Will not address telnet console failing after a tcp session has failed (TimeoutError).
2024-01-28 12:14:07 +11:00
6d97feaced Fixed updating system and GNS3. 2024-01-28 12:14:01 +11:00
8d35089661 Update welcome.py
Fixed an issue where the shell option in dialog failed to drop you back to bash.
2024-01-28 12:13:55 +11:00
6455f62447 Update remote-install.sh
Removed an extra slash at the end when setting the user home directory. This was causing unexpected behavior for other scrips as ~ was aliased to /opt/gns3/ instead of the expected  /opt/gns3.

This caused an extra / to appear in commands unexpectedly.
2024-01-28 12:13:55 +11:00
2fb3b1ebab Use Python 3.8 to publish API doc 2024-01-28 12:13:46 +11:00
58399a9fa8 Upgrade sentry-sdk, psutil and distro dependencies 2024-01-28 12:13:12 +11:00
907b305ecf Development on 2.2.46.dev1 2024-01-28 12:13:12 +11:00
57f92db124 Release v2.2.45 2024-01-28 12:13:12 +11:00
0f6f943a83 Bundle web-ui v2.2.45 2024-01-28 12:13:12 +11:00
2cb76b2274 Remove old web-ui files 2024-01-28 12:13:11 +11:00
2d2db52a8b Bundle web-ui v2.2.45 2024-01-28 12:13:11 +11:00
a8d0818e07 Sync appliances 2024-01-28 12:13:11 +11:00
f7eb2492d9 Fix mouse offset issues with VNC in Qemu. Fixes #2335 2024-01-28 12:13:11 +11:00
218522b08c Fix issues when generating docs 2024-01-28 12:13:10 +11:00
470f13f448 Update readthedocs.yml to use Python 3.12 2024-01-28 12:13:10 +11:00
317aa669ac Update readthedocs.yml 2024-01-28 12:13:10 +11:00
8d160ad5ed Update documentation 2024-01-28 12:13:10 +11:00
e3493870b2 Add project.created, project.opened and project.deleted controller notification stream.
Move project.updated and project.closed from project notification to controller notification stream.
2024-01-28 12:13:09 +11:00
d466c85385 Do not stop searching for Qemu binaries if one binary cannot be executed. Ref #2306 2024-01-28 12:13:09 +11:00
35d4391fc0 Fix Ethernet switch and Ethernet hub port validations. Fixes #2334 2024-01-28 12:13:09 +11:00
eea0ab69bd Bundle dev version of the web-ui 2024-01-28 12:13:09 +11:00
22ade94118 Update CORS policy 2024-01-28 12:13:08 +11:00
08ee40548f Add custom executable paths on Windows 2024-01-28 12:13:08 +11:00
7f05a06766 Upgrade sentry-sdk and aiohttp 2024-01-28 12:13:08 +11:00
9fd2f58ef7 Development in 2.2.45.dev3 2024-01-28 12:13:08 +11:00
b9b802ebab Release v2.2.44.1 2024-01-28 12:13:08 +11:00
1d86e322e9 Do not compute checksums on macOS 2024-01-28 12:13:07 +11:00
8eb5f10971 Add multiprocessing.set_start_method() 2024-01-28 12:13:07 +11:00
cc4783ab98 Bump version to v2.2.45.dev2 2024-01-28 12:13:07 +11:00
19792f328d Have freeze support for macOS as well 2024-01-28 12:13:07 +11:00
596d1274a3 Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228 2024-01-28 12:13:07 +11:00
2f765747b8 Add freeze_support() for multiprocessing 2024-01-28 12:13:06 +11:00
4fe57b6a15 Development on 2.2.45.dev1 2024-01-28 12:13:06 +11:00
1177626a53 Release v2.2.44 2024-01-28 12:13:06 +11:00
c4cc346864 Sync appliances 2024-01-28 12:13:06 +11:00
8915dfffa5 Bundle web-ui v2.2.44 2024-01-28 12:13:05 +11:00
ff027ebd17 Upgrade sentry-sdk 2024-01-28 12:13:05 +11:00
27d5ac537f Non-blocking checksums computation when server starts. Fixes #2228 2024-01-28 12:13:05 +11:00
fe246cd413 Fix timeout issue when creating Qemu disk image. Fixes https://github.com/GNS3/gns3-server/issues/2313 2024-01-28 12:13:05 +11:00
2bbb560b8e Support for web socket console over HTTPS 2024-01-28 12:13:04 +11:00
1624c7d6ad Add back script create_cert.sh 2024-01-28 12:13:04 +11:00
2a3bb81076 Bundle web-ui 2024-01-28 12:13:04 +11:00
e0a0dd83d7 Use Python 3.8 in appveyor.yml 2024-01-28 12:13:04 +11:00
16ea395618 Upgrade sentry-sdk, psutil and distro dependencies 2024-01-27 17:04:02 +11:00
9dd8da4f6e Merge pull request #2340 from spikefishjohn/patch-3
Update telnet_server.py
2024-01-26 17:55:11 +11:00
54abf85523 Update telnet_server.py
Maybe use the correct object name this time for the socket objects.
2024-01-25 01:41:57 -05:00
385fffec56 Merge pull request #2339 from spikefishjohn/patch-2
Update telnet_server.py
2024-01-24 11:53:59 +11:00
ac86717bc0 Update telnet_server.py
Set tcp keepalive timers to 60 seconds. Seems to default to 2 hours on ubuntu 22. Most firewalls will age out an idle tcp session at 1 hour.

Will not address telnet console failing after a tcp session has failed (TimeoutError).
2024-01-23 13:15:17 -05:00
7b7af33920 Development on 2.2.46.dev1 2024-01-14 23:45:35 +11:00
85fd3ef4a4 Merge pull request #2338 from GNS3/2.2
Release v2.2.45
2024-01-14 22:02:14 +11:00
fbd8f6ce28 Release v2.2.45 2024-01-12 21:38:26 +11:00
195da24910 Bundle web-ui v2.2.45 2024-01-12 21:34:11 +11:00
b4c7609aeb Remove old web-ui files 2024-01-12 21:29:04 +11:00
cd9c4c84b6 Bundle web-ui v2.2.45 2024-01-12 21:21:18 +11:00
2566de0f5a Sync appliances 2024-01-12 21:13:52 +11:00
6a069d0af6 Fix mouse offset issues with VNC in Qemu. Fixes #2335 2024-01-12 16:18:32 +11:00
2789b3802a Fix issues when generating docs 2024-01-12 16:14:01 +11:00
9e1a1337d4 Update readthedocs.yml to use Python 3.12 2024-01-12 15:27:41 +11:00
466eb8128e Merge pull request #2336 from GNS3/fix/2319
Refactor project notifications
2024-01-12 13:38:51 +11:00
e41227b5bd Update readthedocs.yml 2024-01-12 13:32:15 +11:00
78a3b8e824 Update documentation 2024-01-12 13:21:34 +11:00
4c149e1614 Add project.created, project.opened and project.deleted controller notification stream.
Move project.updated and project.closed from project notification to controller notification stream.
2024-01-12 13:16:55 +11:00
473fa98eda Do not stop searching for Qemu binaries if one binary cannot be executed. Ref #2306 2024-01-11 23:11:56 +11:00
13d9afd8bc Fix Ethernet switch and Ethernet hub port validations. Fixes #2334 2024-01-11 22:40:38 +11:00
b4edbbbaa7 Bundle dev version of the web-ui 2023-12-07 12:34:52 +10:00
02e19800fb Update CORS policy 2023-12-06 22:33:55 +10:00
bc1016474e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
2023-12-05 22:15:50 +10:00
24bb0ca419 Add custom executable paths on Windows 2023-12-05 21:24:40 +10:00
42f668ffc4 Development on 3.0.0.dev12 2023-11-27 11:33:22 +10:00
646f0fd837 Release v3.0.0b1 2023-11-27 11:13:39 +10:00
3d383b25f0 Bundle web-ui v3.0.0b1 2023-11-27 11:10:37 +10:00
8d28178e56 Upgrade sentry-sdk to v1.37.1 2023-11-27 11:05:20 +10:00
0d63bf5128 Upgrade aiohttp to v3.9.1 2023-11-27 10:49:45 +10:00
37f720ac73 Fix bug when listing endpoints for opened project 2023-11-23 15:38:42 +10:00
9509d3a713 Make images executable after importing a project 2023-11-23 11:30:46 +10:00
061ee1491d Disable IOS hostname check for Dynamips ghost instances 2023-11-22 18:47:05 +10:00
c8245e81be Upgrade sentry-sdk 2023-11-22 12:44:56 +10:00
ff7e10fa7f Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/crash_report.py
#	gns3server/main.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
2023-11-22 12:42:04 +10:00
6c5f75bf43 Upgrade sentry-sdk and aiohttp 2023-11-22 10:32:50 +10:00
24d958d9ec Release v3.0.0a6 2023-11-15 12:07:48 +10:00
48dab4af61 Bundle web-ui v3.0.0a6 2023-11-15 12:03:04 +10:00
67be4259ff Fix tests 2023-11-15 11:57:14 +10:00
4e9bc190a4 Upgrade to aiohttp v3.9.0rc0 2023-11-15 11:47:48 +10:00
261dd1d6d5 Upgrade dependencies 2023-11-15 10:30:15 +10:00
e80e80a080 Merge pull request #2326 from GNS3/fix/2325
Install Docker resources in writable location
2023-11-13 11:28:56 +10:00
09ff807055 Install Docker resources in writable location 2023-11-13 11:23:26 +10:00
303cbf3642 Fix tests 2023-11-12 18:11:41 +10:00
e367b3a148 Default compute username is "gns3" 2023-11-12 18:02:19 +10:00
7afdcbb3d3 Development in 2.2.45.dev3 2023-11-07 19:11:57 +10:00
de27a57a00 Merge pull request #2322 from GNS3/release-v2.2.44.1
Release v2.2.44.1
2023-11-07 18:35:29 +10:00
c88f76b740 Release v2.2.44.1 2023-11-07 14:59:28 +10:00
b81cc14cef Do not compute checksums on macOS 2023-11-07 14:30:39 +10:00
aa133c3b8a Add multiprocessing.set_start_method() 2023-11-07 13:33:43 +10:00
7449064ea2 Bump version to v2.2.45.dev2 2023-11-07 12:21:39 +10:00
db315e3c3c Have freeze support for macOS as well 2023-11-07 11:17:48 +10:00
c437482e85 Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228 2023-11-07 11:08:47 +10:00
46d9ada6d8 Merge pull request #2321 from Xatrekak/master
Fixed updating system and GNS3 via welcome.py.
2023-11-07 10:49:00 +10:00
aac6fbfc31 Add freeze_support() for multiprocessing 2023-11-07 10:42:53 +10:00
76bd5921c5 Fixed updating system and GNS3. 2023-11-06 19:02:29 -05:00
8a208dbf04 Merge branch '2.2' into 3.0
# Conflicts:
#	CHANGELOG
#	gns3server/compute/qemu/__init__.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.383fdade2fd9dbccffbc.js
#	gns3server/version.py
#	gns3server/web/web_server.py
#	requirements.txt
2023-11-06 17:09:34 +10:00
af3a618306 Merge pull request #2316 from GNS3/release-v2.2.44
Release v2.2.44
2023-11-06 17:05:54 +10:00
3c4b5db1ca Development on 2.2.45.dev1 2023-11-06 17:00:17 +10:00
5c8abdc6fd Release v2.2.44 2023-11-06 16:02:23 +10:00
f80f41b5b3 Sync appliances 2023-11-06 15:58:21 +10:00
503373a6e9 Bundle web-ui v2.2.44 2023-11-06 15:53:51 +10:00
8236c85b5f Upgrade sentry-sdk 2023-11-06 15:44:30 +10:00
531499bbfb Merge pull request #2314 from Xatrekak/master
[Fix] an issue where the shell option in dialog failed to drop you back to bash.
2023-11-06 13:01:35 +10:00
ae825b0080 Non-blocking checksums computation when server starts. Fixes #2228 2023-11-06 12:32:23 +10:00
7ad3afbdef Update welcome.py
Fixed an issue where the shell option in dialog failed to drop you back to bash.
2023-11-05 13:35:06 -05:00
191feed669 Fix timeout issue when creating Qemu disk image. Fixes https://github.com/GNS3/gns3-server/issues/2313 2023-11-05 15:41:46 +10:00
cd785e0d17 Fix broken link to Web UI in 3.0 branch. Fixes #2312 2023-11-03 20:56:31 +10:00
e1bd4638c8 Fix sample config: VMware section declared twice. Fixes #2311 2023-11-03 20:46:36 +10:00
61dede72f9 Fix ws console and packet capture over SSL 2023-11-03 15:35:49 +10:00
13630179b2 Merge branch '2.2' into 3.0
# Conflicts:
#	appveyor.yml
#	gns3server/compute/project_manager.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.febf2f1259a67875a3e3.js
2023-11-03 14:56:55 +10:00
3b22bcfe96 Support for web socket console over HTTPS 2023-11-03 14:40:40 +10:00
0f07b9e019 Add back script create_cert.sh 2023-11-03 12:31:34 +10:00
8676a3dccf Bundle web-ui 2023-11-02 17:40:47 +10:00
b0dbf59ac4 Use Python 3.8 in appveyor.yml 2023-10-31 14:48:08 +10:00
0e18762b36 Merge pull request #2308 from Xatrekak/master
Update remote-install.sh
2023-10-31 09:19:55 +10:00
cbc7e59d3f Update remote-install.sh
Removed an extra slash at the end when setting the user home directory. This was causing unexpected behavior for other scrips as ~ was aliased to /opt/gns3/ instead of the expected  /opt/gns3.

This caused an extra / to appear in commands unexpectedly.
2023-10-30 11:00:45 -04:00
14fd165f2a Merge pull request #2307 from GNS3/fix/3521
Allow disabling hardware virtualization check
2023-10-30 15:03:50 +10:00
7c49a9160c Allow disabling hardware virtualization check 2023-10-30 14:57:11 +10:00
5a6e945db2 Merge pull request #2304 from GNS3/upgrade-python-api-doc
Upgrade to Python 3.8 for API doc publishing
2023-10-27 14:46:52 +10:00
86c0b90951 Use Python 3.8 to publish API doc 2023-10-27 14:42:22 +10:00
23b1c7a989 Development on 3.0.0.dev10 2023-10-27 14:12:23 +10:00
399e925f2e Release v3.0.0a5 2023-10-27 13:38:14 +10:00
ac11c984cb Bundle web-ui v3.0.0a5 2023-10-27 13:32:31 +10:00
0e8e4fd2f7 Merge branch '2.2' into 3.0 2023-10-27 13:28:32 +10:00
ed99a98fe1 Sync appliances 2023-10-27 13:20:15 +10:00
19edc193f9 Merge pull request #2303 from GNS3/fix/1484
Fix L2IOU "failed code signing checks"
2023-10-26 15:13:12 +10:00
3f50319990 Fix L2IOU "failed code signing checks" when IOU base file name is >= 63 characters 2023-10-26 15:05:10 +10:00
fb6d29aeff Python 3.12 support 2023-10-24 18:37:13 +10:00
5475eedce7 Add igb Qemu adapter 2023-10-24 18:33:26 +10:00
d680bbbc77 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/schemas/qemu_template.py
#	requirements.txt
#	tests/compute/qemu/test_qemu_vm.py
#	tests/handlers/api/compute/test_qemu.py
2023-10-24 18:31:51 +10:00
248737c34b Merge pull request #2296 from ventaquil/feature/add-qemu-igb-nic
Add Qemu IGB network device
2023-10-24 17:23:00 +10:00
240708112c Merge branch '2.2' into feature/add-qemu-igb-nic 2023-10-24 17:14:27 +10:00
c759c4e3f6 Upgrade to actions/checkout@v3 and actions/setup-python@v3 2023-10-23 16:17:31 +10:00
34ee75e1f1 Fix tests running on Python 3.12 2023-10-23 16:12:12 +10:00
4af5edbc03 Install aiohttp 3.9.0b0 when running on Python 3.12 2023-10-23 15:21:06 +10:00
0d15f40930 Change "ip cef" to "no ip cef" in IOU default configs. Fixes #2298 2023-10-23 15:16:49 +10:00
f3ad97c398 Merge pull request #2300 from GNS3/fix/1468
Fix compute authentication for websocket endpoints
2023-10-22 16:03:21 +10:00
a55e1cbc99 Update dev-requirements.txt 2023-10-22 15:47:21 +10:00
9c369a2597 Merge branch '3.0' into fix/1468 2023-10-22 15:44:25 +10:00
4dcb0dce57 Merge pull request #2301 from GNS3/drop-python-3.7
Drop Pyhton 3.7 support (end-of-life)
2023-10-22 15:43:26 +10:00
0f0412158d Drop support for Python 3.7 and upgrade dependencies 2023-10-22 15:37:00 +10:00
2f3689588e Fix httpx-ws dependency on Python 3.7 2023-10-22 12:53:47 +10:00
44c066ac68 Fix compute authentication for websocket endpoints 2023-10-22 12:44:39 +10:00
ffc49ea954 Development on 3.0.0.dev9 2023-10-18 20:15:11 +10:00
d610c933fb Release v3.0.0a4 2023-10-18 19:01:13 +10:00
8f35b871d5 Downgrade watchfiles to v0.20.0 2023-10-18 18:35:02 +10:00
29c9d2c2e9 Revert "Temporary support for Python 3.12"
This reverts commit 9911b5199b.
2023-10-18 18:31:44 +10:00
5ad7761337 Upgrade FastAPI, watchfiles and platformdirs dependencies 2023-10-18 18:01:59 +10:00
9911b5199b Temporary support for Python 3.12 2023-10-18 17:58:24 +10:00
edcc69f617 Remove old web-ui files 2023-10-18 17:58:11 +10:00
fe8b61373c Bundle web-ui v3.0.0a4 2023-10-18 17:51:41 +10:00
87960f1ff0 Merge branch '2.2' into 3.0
# Conflicts:
#	README.md
2023-10-18 17:48:09 +10:00
3b0d89be5a Merge branch 'master' into 2.2 2023-10-18 17:46:51 +10:00
5ff3043fb4 Sync appliances 2023-10-18 17:45:17 +10:00
47d3f3f349 Do not enforce Compute.Audit and Template.Audit privileges due to current web-ui limitations 2023-10-18 15:51:43 +10:00
109feeb647 Revert to aiohttp v3.8.6 2023-10-18 15:00:42 +10:00
56839413fa Remove testing with Python 3.6 (not supported) 2023-10-18 14:58:19 +10:00
18012dc18a Upgrade aiohttp and sqlalchemy dependencies 2023-10-18 14:56:19 +10:00
46c02ad2f3 Merge branch '2.2' into 3.0
# Conflicts:
#	requirements.txt
2023-10-18 14:54:39 +10:00
08ac80e451 Upgrade sentry and psutil dependencies 2023-10-18 14:53:25 +10:00
6ca15cbcff Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	requirements.txt
#	setup.py
2023-10-18 14:49:49 +10:00
722512d851 Remove model validator. Fixes https://github.com/GNS3/gns3-gui/issues/3522
Default port name and port segment size are already set in the code when a new node is created.
2023-10-15 11:16:05 +10:00
737664a3d4 Add Qemu IGB network device 2023-10-12 11:35:53 +02:00
29f4b238b0 Add Python 3.12 support. Fixes https://github.com/GNS3/gns3-server/issues/2273 2023-10-09 16:54:47 +10:00
b6127af067 Merge pull request #2294 from GNS3/list-items-closed-project
[API] Allow listing items from a closed project
2023-10-09 13:28:58 +10:00
5092bd2fdf List elements when a project is closed 2023-10-09 13:16:12 +10:00
a27db6b4eb Fix deleting resource from resource pool. Ref #2293 2023-09-28 18:38:38 +10:00
66b66cc3e1 Bump version to 3.0.0.dev8 2023-09-25 21:38:20 +10:00
7215b150dd Merge pull request #2292 from GNS3/fix/3422
Support to create empty disk images on the controller
2023-09-25 21:29:24 +10:00
674381f1be Fix tests 2023-09-25 21:08:23 +10:00
1ae6d13022 Support to create empty disk images on the controller 2023-09-25 17:51:14 +10:00
6886f1f566 Merge pull request #2290 from GNS3/fix/2147
Fix issue when using importlib.resources.files()
2023-09-23 20:54:57 +10:00
999a47f747 Fix issue with importlib.resources.files() and Python 3.9 2023-09-23 20:44:00 +10:00
c1507b4155 Upgrade sqlalchemy 2023-09-23 15:56:42 +10:00
d9214a3c67 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/virtualbox/__init__.py
#	gns3server/controller/gns3vm/virtualbox_gns3_vm.py
#	gns3server/crash_report.py
#	gns3server/version.py
#	requirements.txt
2023-09-23 15:54:54 +10:00
f675f24ba7 Revert "Install importlib-resources only with Python < '3.9'. Ref #2147"
This reverts commit dc1eed42da.
2023-09-23 14:48:04 +10:00
dc1eed42da Install importlib-resources only with Python < '3.9'. Ref #2147 2023-09-23 14:35:50 +10:00
2c5a9ef9b7 Merge pull request #2288 from Quanterm/master
Update README.md
2023-09-21 11:44:36 +10:00
e75d151611 Update README.md
The release cycle of NixOs is around every half of the year. 
On the unstable channel you have the latest gns3-server version. 
Do not worry to use unstable because it mostly just the latest stable version. You can also do overlays to keep your other systems pkgs on the regular release version.
2023-09-20 11:41:05 +00:00
d87cff7fd5 Merge pull request #2287 from munahaf/Inappropriate_Logic-5node.py11635999804432162276.diff
Update a test expression to remove a logical short circuit
2023-09-20 14:31:04 +07:00
ffb58a4ed2 Merge branch 'master' into Inappropriate_Logic-5node.py11635999804432162276.diff 2023-09-20 14:17:58 +07:00
4d7b3fb9d6 Comment: Updated a test expression to remove a logical short circuit. 2023-09-20 06:51:41 +00:00
94abdfc9f0 Development on 2.2.44.dev1 2023-09-19 21:08:24 +07:00
6f345bb1ec Merge pull request #2286 from GNS3/release-v2.2.43
Release v2.2.43
2023-09-19 21:04:52 +07:00
89ec458f5c Release v2.2.43 2023-09-19 20:16:52 +07:00
80bc1a726b Sync appliances 2023-09-19 20:12:32 +07:00
6265d3d55f Upgrade sentry-sdk and truststore 2023-09-19 20:07:57 +07:00
a96a82821c Merge branch 'master' into 2.2 2023-09-19 20:04:15 +07:00
ad47ffbe29 Force English output for VBoxManage. Fixes #2266 2023-09-19 18:14:05 +07:00
eca1243fc0 Merge pull request #2285 from Orange-OpenSource/3.0
rbac fix: cannot add multiple time same privilege to a role
2023-09-18 18:41:01 +07:00
0d834ee2a0 rbac fix: cannot add multiple time same privilege to a role 2023-09-18 13:34:46 +02:00
e1c5c05492 Merge pull request #2280 from GNS3/resource-pools
Resource pools support
2023-09-14 22:47:02 +07:00
7534718a1c Remove privileges endpoint from roles 2023-09-14 22:41:08 +07:00
63c1defd9a Merge branch '3.0' into resource-pools 2023-09-14 22:38:52 +07:00
1f90bb14b6 Require users to be logged in for privilege API endpoints 2023-09-14 22:36:21 +07:00
ae00dd422f Merge pull request #2283 from Orange-OpenSource/3.0
API: add endpoint to expose availables privileges to web UI
2023-09-13 22:51:05 +07:00
10eeefc1f5 API: add endpoint to expose availables privileges to web UI 2023-09-12 15:24:54 +02:00
702fea89fb Automatically add vboxnet and DHCP server if not present for VirtualBox GNS3 VM. Ref #2266 2023-09-12 16:14:44 +07:00
a95dda0d1d Complete resource pool support for projects 2023-09-11 18:15:03 +07:00
d53ef175f8 DB and API for resource pools 2023-09-07 17:31:11 +07:00
f7d287242f Upgrade platformdirs 2023-09-07 16:32:04 +07:00
c11b3c3911 Fix tests after merge 2023-09-06 23:42:50 +07:00
1ec056c1a6 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/web/route.py
#	requirements.txt
#	tests/compute/docker/test_docker_vm.py
2023-09-06 23:30:00 +07:00
285b19d97f Merge pull request #2272 from GNS3/fix/2271
Correctly install built-in appliances
2023-09-06 23:16:34 +07:00
709aa46074 Fix issue with controller config saved before checking current version with previous one 2023-09-06 16:48:24 +07:00
0c12849d0d Use controller vars file to store version and appliance etag 2023-09-06 16:28:46 +07:00
8aa9d1aae6 Upgrade dependencies and fix user group tests 2023-09-03 17:58:51 +07:00
66047b3431 Fix OAuth2PasswordBearer token URL 2023-09-03 17:31:05 +07:00
71d06abaf4 Merge pull request #2278 from GNS3/update-publish-api-doc
Update publish api doc with GitHub Actions
2023-09-03 17:00:13 +07:00
05ef9f2a7c No need for dev dependencies 2023-09-03 16:59:48 +07:00
476658b829 Update publish-api-documentation.yml 2023-09-03 16:52:30 +07:00
6ec97a704f Put user, groups, roles and ACL under /access 2023-09-02 19:10:02 +07:00
a358369606 Move notifications under controller router 2023-09-02 18:57:53 +07:00
5155aea923 Upgrade dependencies 2023-09-02 18:49:16 +07:00
b0c4fc17ad Merge pull request #2275 from GNS3/rbac-new-implementation
New RBAC implementation
2023-09-02 18:47:35 +07:00
e72b07bf5c Prepare resource pools table for future development 2023-09-02 18:42:40 +07:00
170f476733 Add more built-in roles 2023-09-02 18:15:00 +07:00
0077fd98aa Add required privileges to all endpoints 2023-09-02 17:54:24 +07:00
f3a4ad49f4 Check for group ACEs to find user privileges 2023-08-28 18:14:34 +10:00
3e0592520b Handle ACE propagate and allowed 2023-08-28 12:06:01 +10:00
d3d0cc039d Merge pull request #2277 from GNS3/fix/2276
Prevent X11 socket file to be modified by Docker container
2023-08-27 19:53:50 +10:00
c2783d355f Fix test_create_vnc test 2023-08-27 18:41:25 +10:00
d6e1ee5dbb Prevent X11 socket file to be modified by Docker container 2023-08-27 18:30:37 +10:00
57197c3d1c Comment unused code 2023-08-27 18:23:10 +10:00
60ce1172e0 Use an ACL table to check for privileges 2023-08-27 18:20:42 +10:00
6bd855b3c5 New database schema for better RBAC 2023-08-21 21:32:23 +10:00
74cb3be910 Merge remote-tracking branch 'origin/3.0' into 3.0 2023-08-19 12:29:53 +10:00
425ad845fc Speed up tests 2023-08-19 12:29:25 +10:00
1ce0c13fc9 Better mocking in Docker tests 2023-08-18 12:20:54 +10:00
e9e2dc2ca7 Fix validation issues and improve exceptions logs 2023-08-17 17:36:50 +10:00
e61ada69bb Merge pull request #2274 from lethedata/openwrt-18.06.5-18.06.2-hashfix
Hash Update openwrt.gns3a
2023-08-17 10:00:14 +10:00
a6b0f32b57 Hash Update openwrt.gns3a
Update hashes for openwrt-18.06.5 and openwrt-18.06.2 based hashes from download links.
2023-08-16 18:37:55 -05:00
a69feb3682 Use an older version of platformdirs 2023-08-12 19:15:29 +10:00
090d1c8c84 Only use platformdirs with Python >= '3.7' 2023-08-12 19:04:14 +10:00
df2f96828e Use the user data dir to store built-in appliances 2023-08-12 18:48:43 +10:00
6a614fbd78 Downgrade jsonschema 2023-08-12 17:51:24 +10:00
2d7438446c Upgrade dependencies 2023-08-12 17:47:48 +10:00
77d4eabadc Catch ConnectionResetError exception when client disconnects 2023-08-12 17:31:58 +10:00
ca48efa5be Upgrade SQLAlchemy to v2.0.18 and fix async_timeout warning 2023-08-11 22:52:29 +10:00
b0657b39ef Upgrade dependencies 2023-08-11 18:54:05 +10:00
cefa459721 Fix command line issue with certfile and certkey 2023-08-11 18:34:16 +10:00
66dd8bdadb Merge branch '2.2' into 3.0 2023-08-11 18:14:16 +10:00
bbb0a407e0 Upgrade to PyQt 5.15.9 and pywin32 2023-08-11 18:13:41 +10:00
96ce5eac8d Merge pull request #2270 from GNS3/packaging-migration
Packaging migration
2023-08-11 18:09:31 +10:00
2f2aabeb5a Fix tests when running Python 3.7 2023-08-11 17:58:00 +10:00
d9eb61efc4 Fix tests with asyncio_patch 2023-08-11 17:37:11 +10:00
1fd8444d22 Add tests for install_busybox() 2023-08-11 17:32:05 +10:00
f3b6825e40 Test if busybox is not dynamically linked 2023-08-11 14:10:25 +10:00
719458764f Fix tests 2023-08-10 23:23:11 +10:00
483db91851 Use dev for optional development dependencies 2023-08-10 23:16:57 +10:00
f3d43aeb39 Fix testing.yml 2023-08-10 22:52:35 +10:00
1cb433c5bc New packaging relying only pyproject.toml 2023-08-10 22:44:37 +10:00
17f71f970e Add truststore inject_into_ssl 2023-08-10 15:01:49 +10:00
fe90d2b146 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/crash_report.py
#	gns3server/run.py
#	gns3server/static/web-ui/index.html
#	gns3server/utils/images.py
#	gns3server/version.py
#	requirements.txt
#	scripts/update-bundled-web-ui.sh
2023-08-10 15:00:22 +10:00
35e1519073 Development on v2.2.43.dev1 2023-08-09 22:15:15 +10:00
9f5aece8b6 Merge pull request #2267 from GNS3/release-v2.2.42
Release v2.2.42
2023-08-09 22:09:29 +10:00
08139ebdd1 Release v2.2.42 2023-08-09 21:11:57 +10:00
cd87ac4474 Bundle web-ui v2.2.42 2023-08-09 21:03:40 +10:00
77744cc31d Handle API version key in VirtualBox 7. Fixes #2266 2023-08-09 20:51:53 +10:00
df9d642a56 Sync appliances 2023-08-08 19:07:04 +10:00
fad28c766a Enable system certificate store later in the code and bump version to 2.2.42.dev4 2023-08-08 17:22:27 +10:00
21d9d968c4 Revert "Use truststore in appliance_manager.py instead"
This reverts commit a2628042e8.
2023-08-07 20:44:37 +10:00
945a2c98cd Revert "Use finer-grained control for truststore"
This reverts commit 5e1792ff4d.
2023-08-07 20:44:33 +10:00
5e1792ff4d Use finer-grained control for truststore 2023-08-07 19:15:14 +10:00
a2628042e8 Use truststore in appliance_manager.py instead 2023-08-07 19:04:55 +10:00
e616b09028 Use truststore 2023-08-07 18:40:03 +10:00
958865e919 Upgrade dependencies 2023-08-06 20:39:27 +10:00
7f595b089b Use certifi to get SSL root certificates 2023-08-06 20:37:10 +10:00
a76d7576c6 Bump version to 2.2.42.dev3 2023-08-06 18:14:21 +10:00
533c4544ea Use certifi on Windows and macOS 2023-08-06 18:09:56 +10:00
04a302a389 Merge pull request #2265 from GNS3/use-bundled-cacert
Use bundled cacert file for frozen app
2023-08-05 22:37:06 +10:00
5da742394e Use bundled cacert file on Windows and macOS 2023-08-05 22:21:08 +10:00
962c5eed8e Add log message for comparing controller version with config version. Ref https://github.com/GNS3/gns3-gui/issues/3486 2023-08-05 20:24:11 +10:00
f4dab1482f Bump version to 2.2.42.dev2 2023-08-05 20:16:30 +10:00
05d594f3cf Upgrade FastAPI version to 0.101.0 2023-08-05 20:13:30 +10:00
d44f6eb2f1 Merge pull request #2262 from GNS3/fix/2257
Support for Pydantic v2
2023-08-04 18:27:18 +10:00
9c456532d0 Pydantic v2 migration 2023-08-04 18:20:06 +10:00
7ef9b7600c Use DEFAULT_BUFFER_SIZE for md5sum 2023-08-03 12:09:24 +10:00
11f51b3809 Allow connection to ws console over IPv6 2023-08-02 18:29:01 +10:00
1d59afa9fb Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/utils/images.py
2023-08-02 18:26:50 +10:00
c51d71a4fa Fix version check when installing appliances. Ref https://github.com/GNS3/gns3-gui/issues/3486 2023-08-02 17:58:53 +10:00
af83adfdf6 Add debug message when calculating MD5 checksum 2023-08-02 17:41:51 +10:00
658bfb7624 Allow connection to ws console over IPv6. Fixes https://github.com/GNS3/gns3-web-ui/issues/1400 2023-08-02 15:28:32 +10:00
88a1cef21f Revert "Support for Python 3.12"
This reverts commit 1ced862c08.
2023-07-30 17:50:25 +10:00
1ced862c08 Support for Python 3.12 2023-07-30 17:48:30 +10:00
6097166055 Remove import urllib3 and let sentry_sdk import and patch it. Fixes https://github.com/GNS3/gns3-gui/issues/3498 2023-07-30 17:42:52 +10:00
46b8ee3279 Downgrade sqlalchemy 2023-07-23 12:56:30 +10:00
d82a07600b Downgrade uvicorn 2023-07-23 12:50:29 +10:00
2991899d50 Upgrade dependencies 2023-07-23 12:47:34 +10:00
9238c52f97 Merge branch '2.2' into 3.0 2023-07-23 12:36:35 +10:00
38ee79c15f Merge remote-tracking branch 'origin/master' into 2.2 2023-07-23 12:35:46 +10:00
3f691b60c9 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/crash_report.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.1379a5647e8bc6d3e401.js
#	gns3server/version.py
#	tests/compute/qemu/test_qemu_vm.py
2023-07-13 10:09:26 +10:00
a6ca7c4e36 Development on 2.2.42.dev1 2023-07-12 18:26:26 +10:00
b76d2c2150 Merge pull request #2258 from GNS3/release-v2.2.41
Release v2.2.41
2023-07-12 18:24:40 +10:00
d2a0632ec4 Release v2.2.41 2023-07-12 17:07:39 +10:00
fde5f5cbe2 Merge remote-tracking branch 'origin/master' into 2.2 2023-07-12 17:04:12 +10:00
7dc5628845 Bundle web-ui v2.2.41 2023-07-12 16:31:54 +10:00
723b519e8f Sync appliance files 2023-07-12 16:20:29 +10:00
9c653f7dbf Bump version to 2.2.41.dev3 2023-07-12 13:26:22 +10:00
c226b2a9ef Catch urllib3 exceptions when sending crash report. Ref https://github.com/GNS3/gns3-gui/issues/3483 2023-07-06 17:16:05 +10:00
c5c4e1ad56 Merge pull request #2255 from GNS3/fix/2243
Only add speed/duplex params when using Qemu >= v2.12
2023-07-06 16:43:54 +10:00
8e2989d747 Fix issue with tests and Qemu version on Windows 2023-07-06 16:36:36 +10:00
c181df6935 Only fetch Qemu version once when starting Qemu + only add speed/duplex for virtio-net-pci with Qemu version >= 2.12 2023-07-06 16:29:55 +10:00
24c03406e7 Merge pull request #2253 from GNS3/uefi-boot-mode
Bundle recent OVMF firmware and improve UEFI boot mode
2023-07-04 13:38:47 +10:00
6c8c5c1787 Ignore uefi test on Windows 2023-07-04 13:31:21 +10:00
f541c03b94 Fix uefi test on Windows 2023-07-04 13:22:18 +10:00
0a14a08d54 Use recent OVMF firmware (stable-202305) and use flash drives to configure Qemu command line 2023-07-04 13:06:34 +10:00
9357ac6035 Add builtin field in Appliance model 2023-07-03 21:02:17 +10:00
785eff869d Fix issue with appliance API returning unset data 2023-07-03 18:55:19 +10:00
24db2a039d Upgrade FastAPI to v0.99.1 2023-07-03 17:12:46 +10:00
bfb317a302 Upgrade dependencies 2023-06-30 17:47:55 +10:00
29b4e89d21 Merge pull request #2252 from Raizo62/rights_empty8G.qcow2
- remove executable permissions to empty8G.qcow2
2023-06-28 19:55:56 +09:30
bbb68cb148 - remove the useless executable permissions to the file gns3server/disks/empty8G.qcow2
https://github.com/GNS3/gns3-gui/issues/3491
2023-06-28 08:30:13 +02:00
427bbc40b9 Fix websocket authentication after upgrade to FastAPI 0.97.0 + tests 2023-06-24 14:55:43 +09:30
4b791d4924 Fix websocket compute notifications after upgrade to FastAPI 0.97.0 2023-06-23 23:26:08 +09:30
6f132a2e09 Merge pull request #2248 from GNS3/backport-uefi-boot-mode
Backport UEFI boot mode support for Qemu VMs
2023-06-23 11:31:52 +09:30
d5cfb85de5 Backport UEFI boot mode support for Qemu VMs 2023-06-23 11:18:25 +09:30
d366d77ff7 Merge pull request #2247 from GNS3/dynamic-compute-allocation
Allow computes to be dynamically or manually allocated
2023-06-21 22:41:56 +09:30
21049d73a5 Allow computes to be dynamically or manually allocated 2023-06-21 22:28:09 +09:30
c290d75eec Merge pull request #2246 from GNS3/add-uefi-boot-mode
Add UEFI boot mode option for Qemu VMs
2023-06-21 18:12:31 +09:30
40c265152b Add UEFI boot mode option for Qemu VMs 2023-06-21 17:56:34 +09:30
e5eeab662e Check if server config file is readable 2023-06-20 21:26:21 +09:30
a7a946c067 Upgrade dev dependencies 2023-06-20 16:17:13 +09:30
b762d1e60d Upgrade dependencies 2023-06-20 16:13:35 +09:30
1ff23348d3 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/compute.py
#	gns3server/controller/gns3vm/virtualbox_gns3_vm.py
#	gns3server/controller/node.py
#	gns3server/controller/project.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/template_handler.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.8448c96e4facbe79a613.js
#	gns3server/version.py
#	tests/compute/iou/test_iou_vm.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/handlers/api/controller/test_template.py
2023-06-20 16:06:53 +09:30
3dbc714f37 Developement on v2.2.41.dev2 2023-06-10 21:40:39 +09:30
682af449f8 Merge pull request #2240 from GNS3/release-v2.2.40.1
Release v2.2.40.1
2023-06-10 21:36:51 +09:30
60f1d76eab Release v2.2.40.1 2023-06-10 20:06:40 +09:30
16b619066a Merge branch 'master' into 2.2 2023-06-10 17:22:33 +09:30
d44038305f Add missing web-ui files. Fixes #2239 2023-06-10 15:50:28 +09:30
3641742930 Development on v2.2.41.dev1 2023-06-06 12:43:20 +09:30
4bf7838543 Merge pull request #2238 from GNS3/release-v2.2.40
Release v2.2.40
2023-06-06 12:41:40 +09:30
998fe6d8a4 Merge branch 'master' into release-v2.2.40 2023-06-06 12:28:30 +09:30
aa79f4cb25 Release v2.2.40 2023-06-06 10:23:42 +09:30
2602602193 Merge branch 'master' into 2.2 2023-06-06 10:20:07 +09:30
8d969349c8 Bundle web-ui v2.2.40 2023-06-06 10:18:18 +09:30
bf67fec242 Sync appliances 2023-06-06 10:07:50 +09:30
a070a72f66 Merge pull request #2235 from Raizo62/virtio-net-pci
qemu : with "virtio-net-pci", fix the speed and duplex
2023-06-03 21:03:04 +09:30
71d1aefb65 Test Qemu command with virtio-net-pci adapter 2023-06-03 20:57:23 +09:30
0b6436d2cb qemu : with network adapter_type equal to "virtio-net-pci", fix the speed to 10000 and duplex to full.
The values are actually fake.
	(https://github.com/GNS3/gns3-gui/issues/3476)
2023-06-03 11:48:55 +02:00
77f5044aec Merge pull request #2234 from GNS3/fix-tests
Fix tests
2023-06-02 20:32:25 +09:30
088ae699de Merge pull request #2223 from GNS3/fix/2214
Use proc.communicate() when checking for subprocess output
2023-06-02 20:29:40 +09:30
21dc2a8dbc Fix tests 2023-06-02 20:25:33 +09:30
aae7bf9865 Merge pull request #2231 from GNS3/fix/3452
Fix Docker + VNC issues
2023-06-02 20:24:55 +09:30
4338afab7f Fix tests 2023-06-02 20:16:06 +09:30
ef62eba4e8 Merge pull request #2233
Fix unexpected indent
2023-06-02 20:08:55 +09:30
cc4ead40e2 Fix unexpected indent 2023-06-02 20:08:21 +09:30
67943c4727 Merge pull request #2232 from Mlastawi/master
Parse name for request to node creation from template
2023-06-02 18:16:29 +09:30
045c0c4c14 Add missing comma 2023-06-02 10:38:42 +02:00
a0943b0b5a Parse name for request to node creation from template 2023-06-02 09:39:08 +02:00
84c886b058 Remove left over Xvfb related code 2023-05-31 21:33:39 +09:30
e59b5fb95b Remove Xvfb + x11vnc support 2023-05-31 21:28:06 +09:30
cc4d6759e3 Merge pull request #2229 from GNS3/fix/3472
Fix support for the GNS3 VM on macOS with VirtualBox 7
2023-05-31 20:46:39 +09:30
e45467af57 Use the correct VirtualBox host-only type 2023-05-31 20:39:25 +09:30
c6d6fcfe66 Search for correct VirtualBox network type 2023-05-31 20:19:13 +09:30
73bcd019cc Require a Host-Only Network to start the VirtualBox GNS3 VM on macOS with VirtualBox 7 2023-05-30 21:22:57 +09:30
2361e138ec Properly catch aiohttp client exception. Ref #2228 2023-05-30 16:17:12 +09:30
0f02cff5f2 Catch ConnectionResetError when waiting for the wrap console 2023-05-25 18:29:19 +08:00
72af145a23 Fix open IPv6 address for HTTP consoles on controller. Fixes https://github.com/GNS3/gns3-gui/issues/3448 2023-05-22 19:42:01 +08:00
8cc0244c5a Upgrade dependencies 2023-05-22 15:21:57 +08:00
b3dfb87622 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.96be36058f5df0ca7e7f.js
#	gns3server/utils/images.py
#	gns3server/version.py
#	requirements.txt
#	tests/compute/docker/test_docker_vm.py
#	tests/controller/test_controller.py
2023-05-22 15:11:17 +08:00
d03e7ac9c5 Fix tests 2023-05-14 14:20:45 +08:00
af2fc8c111 Use proc.communicate() when checking for subprocess output
As recommended in https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.subprocess.Process.stderr
2023-05-14 13:58:50 +08:00
25c03b7823 Merge pull request #2220 from GNS3/release-v2.2.39
Release v2.2.39
2023-05-08 20:27:28 +08:00
b4bfb24a80 Development on v2.2.40.dev1 2023-05-08 20:26:40 +08:00
d6ea546ff7 Release v2.2.39 2023-05-08 19:17:02 +08:00
68f9c55f3d Install web-ui v2.2.39 2023-05-08 19:10:22 +08:00
9868c28bc6 Merge pull request #2219 from GNS3/install-qemu-empty-disks
Install empty Qemu disks
2023-05-08 16:58:26 +08:00
f3f7921525 Add generic function to install resource files 2023-05-07 21:57:44 +08:00
65cc12c850 Sync appliance files 2023-05-05 22:46:42 +08:00
161f62d083 Install empty Qemu disks on first start 2023-05-05 22:40:58 +08:00
af2b5c3448 Upgrade dependencies 2023-04-30 23:17:01 -10:00
1591ca114d Upgrade dependencies 2023-04-23 05:33:12 -10:00
d6141d4652 Fix checking for ":" in project dir on Windows for Docker containers 2023-03-23 22:17:29 -10:00
8bf5eb2754 Upgrade sentry-sdk 2023-03-23 21:41:50 -10:00
ce220e5ae4 Merge pull request #2211 from eantowne/master
remote-install.sh: added variable declaration
2023-03-24 03:03:12 +08:00
791ce6a56e Added declaration for in remote-install.sh to resolve 'unary operator operator expected' error 2023-03-23 07:59:20 -04:00
66157a335d Merge pull request #2207 from GNS3/pyproject-migration
Support for pyproject.toml
2023-03-21 18:00:13 +08:00
513bc0fb16 Do not use setup.py directly 2023-03-21 18:56:00 +10:00
ffe35b6559 Migrate to pyproject.toml 2023-03-21 17:41:01 +10:00
f08ce9d3f1 Check for colon in project name. Fixes #2203 2023-03-19 18:26:26 +10:00
2bb71838ac Merge pull request #2204 from GNS3/fix/2203
Allow ':' in project name when using Docker containers
2023-03-19 16:00:04 +08:00
f347e21100 Fix Docker tests 2023-03-19 17:56:07 +10:00
3fb138b9a1 Allow ':' in project name when Docker containers are used 2023-03-19 17:29:29 +10:00
9de847fc45 Upgrade Fastapi to v0.95.0 2023-03-19 11:18:58 +10:00
ea550508f6 Fix uvicorn dependency version 2023-03-17 17:48:14 +10:00
267c4cbbbb Merge branch '2.2' into 3.0
# Conflicts:
#	README.md
#	gns3server/compute/base_node.py
#	gns3server/compute/dynamips/__init__.py
#	gns3server/compute/dynamips/hypervisor.py
#	gns3server/compute/qemu/__init__.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/controller/__init__.py
#	gns3server/crash_report.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/schemas/qemu_template.py
#	gns3server/static/web-ui/index.html
#	gns3server/static/web-ui/main.11410ae4eaf4d4c08cd0.js
#	gns3server/version.py
#	requirements.txt
2023-03-17 17:44:32 +10:00
c33a13fd45 Upgrade dependencies 2023-03-17 16:23:48 +10:00
ceb8208002 Upgrade distro and aiohttp dependencies 2023-03-01 18:03:28 +10:00
42767eff56 Development on 2.2.39.dev1 2023-02-28 17:09:39 +10:00
0406083991 Merge pull request #2192 from GNS3/2.2
Release v2.2.38
2023-02-28 14:41:03 +08:00
91dba66800 Release v2.2.38 2023-02-28 15:35:17 +10:00
69b741a01e Sync appliance files 2023-02-28 15:31:02 +10:00
8903ab8a47 Bundle web-ui v2.2.38 2023-02-28 15:29:17 +10:00
4d62c6943b Merge branch 'master' into 2.2 2023-02-28 15:07:48 +10:00
2a66f67b5f Merge remote-tracking branch 'origin/2.2' into 2.2 2023-02-27 22:59:08 +10:00
8ef59c7832 Fix c7200_i0_log.txt is created in the current directory. Fixes #2191 2023-02-27 22:58:52 +10:00
cbdab1f0d7 Merge pull request #2190 from GNS3/check_tpm
Check swtpm version and start it before qemu
2023-02-26 18:59:08 +08:00
7968ee7ff2 Check swtpm version and start swtpm before qemu 2023-02-26 20:51:24 +10:00
be557abba9 Merge pull request #2185 from Xatrekak/master
Update remote-install.sh and add welcome.py
2023-02-19 13:02:54 +08:00
3040e87a7d Merge pull request #2189 from GNS3/fix/2188
Fix broken websocket console with Python 3.11
2023-02-18 15:44:06 +08:00
1f85abb036 Fix broken websocket console with Python 3.11 2023-02-18 15:32:57 +08:00
d867e1f1c1 Fix tests 2023-02-17 21:25:19 +08:00
1490e458b6 Upgrade fastapi to v0.92.0. Fixes #2186 2023-02-17 18:52:18 +08:00
30c85703c8 Attempt to fix "cannot reopen console". Ref #2182 2023-02-13 19:32:44 +08:00
4bdd405bc5 Merge branch 'final_stacked_merge'
This updates the script to assume that welcome.py has been merged into the GNS3 master repo
2023-02-12 18:46:38 -05:00
229168367b Merge branch 'remote_install_changes'
Changes to remote-install to make it compatible with the latest versions of ubuntu server. Also adds an option to install the welcome dialog from gns3vm
2023-02-12 18:44:12 -05:00
e257fb425e This commit is stacked and assumes welcome.py has already been merged into the GNS3 master repo 2023-02-12 18:30:01 -05:00
fac224ac48 Updated to latest welcome.py commit. Raw cache still bugged 2023-02-12 17:26:53 -05:00
62c2ca9be1 Added Web UI to Dialog 2023-02-12 17:20:25 -05:00
f98a60fc74 added an OS update to end when using welcome option 2023-02-12 14:42:53 -05:00
42a5f1956e Changed mechanism used to set gns3 user password that works on all shells. 2023-02-12 14:21:01 -05:00
13df828ca7 switched to a direct link to the latest commit instead of the branch alias to bypass github raw caching issues. 2023-02-12 13:12:20 -05:00
19a8d1caed Update welcome.py 2023-02-12 12:59:06 -05:00
290df5290a fixed transcription 2023-02-12 02:48:17 -05:00
fbe10360c2 Finished gns3 user setup 2023-02-12 02:44:15 -05:00
ac042b02c4 changes self.d to self.display so it would be more intuitive. 2023-02-12 02:30:28 -05:00
e44999f588 Refactored welcome.py to use a class so its functions would be callable by remote-install.sh. This ensure the setup uses the same IP address that will be displayed by Dialog. 2023-02-12 02:07:18 -05:00
952b4e7249 fixed some shell bugs 2023-02-11 23:24:23 -05:00
3b0336bd7e fixed typo 2023-02-11 22:23:45 -05:00
7689b7841f switched to modifed welcome by and full path to it 2023-02-11 21:00:37 -05:00
bf5970b904 Update install and welcome to support running it 2023-02-11 19:57:54 -05:00
2eca92e34d The legacy get_ip function no longer worked on new versions of ubuntu LTS. 2023-02-11 18:05:03 -05:00
70d3f991ed Add welcome.py script from GNS3vm 2023-02-11 17:57:12 -05:00
77b6ef1a1b Merge pull request #2179 from GNS3/vmware-virtualbox-deprecated
Mark VMware and VirtualBox support as deprecated
2023-02-06 06:26:28 +05:45
aaa6ca9445 Mark VMware and VirtualBox support as deprecated 2023-02-05 10:09:55 +08:00
2b6bec1b93 Merge pull request #2178 from GNS3/fix/2177
Fix Qemu binary not set when adding appliance from template
2023-02-04 10:12:30 +05:45
0f49911432 Fix Qemu binary not set when adding appliance from template 2023-02-04 12:18:52 +08:00
9c158848bd Make port name for custom adapters optional. Fixes https://github.com/GNS3/gns3-web-ui/issues/1430 2023-02-01 16:19:39 +08:00
3a6ff9b44f Add long description content type in setup.py 2023-02-01 09:56:02 +08:00
83cb8693e6 Automatically add new issues to GNS3 project 2023-01-31 09:31:52 +08:00
e5ecdd270d Development 2.2.38.dev1 2023-01-25 18:36:39 +08:00
260ac44e87 Release v2.2.37 2023-01-25 15:06:12 +08:00
1fa4632b55 Merge branch 'master' into 2.2 2023-01-25 14:44:54 +08:00
a0cf711634 Bump version to 2.2.37.dev3 2023-01-25 14:13:07 +08:00
b83645c531 Add web-ui v2.2.37 2023-01-24 15:06:21 +08:00
a7daae1c6a Sync appliances 2023-01-24 14:57:58 +08:00
a7d19fd89a Fix StreamWriter doesn't have the wait_closed() method in Python3.6. Fixes #2170 2023-01-20 13:14:57 +08:00
3c2ae5363c Install built-in appliances when no previous version has been detected. Fixes #2168 2023-01-17 13:39:01 +08:00
24d1aeee32 Bump version to 2.2.37.dev2 2023-01-17 13:30:09 +08:00
8d56b7b18c Fix sync_appliances.sh 2023-01-17 13:11:56 +08:00
90d7478679 Sync appliances 2023-01-17 13:11:18 +08:00
fb4c04ac41 Update documentation to install gns3-server. Fixes #2124 2023-01-17 09:45:14 +08:00
dc1b98a1d0 Merge pull request #2166 from GNS3/fix/2165
Find Dynamips version before hypervisor is started
2023-01-17 07:15:33 +05:45
c57b0cbb53 Find Dynamips version before hypervisor launch and do not require Dynamips v0.2.23 2023-01-16 18:04:46 +08:00
ab1f9a4385 Handle Alembic CommandError exceptions 2023-01-13 12:52:31 +08:00
ce3bf9930c Merge pull request #2160 from GNS3/db-migrations
Support for database schema migrations
2023-01-11 08:21:44 +05:45
a033080418 Support for database schema migrations using alembic 2023-01-11 10:15:04 +08:00
af9b883c08 Fix and adjustments after merge 2023-01-10 12:09:36 +08:00
f09594ae4c Merge branch '2.2' into 3.0
# Conflicts:
#	README.md
#	README.rst
#	tests/handlers/api/compute/test_nat.py
2023-01-10 11:52:58 +08:00
5a3b502024 Fix NIO update UDP test 2023-01-10 11:39:18 +08:00
997e0ad6ee Fix more tests 2023-01-10 11:22:12 +08:00
eb3fc1bb3a Fix more tests 2023-01-10 11:09:27 +08:00
e9c95ff299 Fix tests 2023-01-10 10:07:26 +08:00
78c301653f Convert README to Markdown 2023-01-10 08:23:06 +08:00
2a392ef991 Merge branch '2.2' into 3.0 2023-01-06 20:09:41 +08:00
535f89e29e Give udhcpc executable right. Fixes #2159 2023-01-06 20:09:17 +08:00
72e3d8f0c1 Fix tests after merge 2023-01-05 12:57:00 +08:00
27d9063e56 Merge 2.2 2023-01-05 12:38:00 +08:00
f8f5d7ec07 Development on 2.2.37.dev1 2023-01-05 09:13:30 +08:00
d0141c351b Merge branch '2.2' 2023-01-05 09:12:11 +08:00
8e2992fbc7 Release v2.2.36 2023-01-04 19:46:30 +08:00
8986f10506 Install web-ui v2.2.36 2023-01-04 19:05:24 +08:00
10f3adcb60 Sync appliance files 2023-01-04 18:28:14 +08:00
5459543eb5 Fix issue when detecting Dynamips version (version is not set until after Dynamips has started) 2023-01-04 18:21:17 +08:00
e15c36f05c Merge remote-tracking branch 'origin/2.2' into 2.2 2023-01-04 15:12:26 +08:00
da7c7d16e4 Fix starting Dynamips on Windows 2023-01-04 15:12:09 +08:00
8d69f7f792 Merge pull request #2157 from GNS3/qemu-tpm-support
Trusted Platform Module (TPM) support for Qemu VMs
2023-01-04 10:55:52 +05:45
297ada529c Prevent TPM to run on Windows 2023-01-04 12:57:48 +08:00
ae200d9add Add Trusted Platform Module (TPM) support for Qemu VMs 2023-01-04 12:13:19 +08:00
eb1b70456f Merge pull request #2155 from GNS3/fix/2143
Binding address for console
2023-01-04 07:00:33 +05:45
9132002b80 Fix typos 2023-01-04 09:08:40 +08:00
771a9a5ddb Require Dynamips 0.2.23 and bind Dynamips hypervisor on 127.0.0.1 2023-01-02 15:26:59 +08:00
04ba3b6549 Merge pull request #2154 from GNS3/fix/2069
Use a stock BusyBox for the Docker integration
2023-01-01 16:18:37 +05:45
8f9800f444 Update README.rst about static busybox 2023-01-01 18:24:42 +08:00
90c971ed74 Merge pull request #2152 from GNS3/fix/2151
Install built-in appliance files at the first start of a newer version of the server
2023-01-01 15:40:48 +05:45
d2ad9dc5e2 Delete the built-in appliance directory before installing updated files 2023-01-01 17:49:00 +08:00
e5c8ae4bde Use a stock BusyBox for the Docker integration 2023-01-01 17:04:48 +08:00
5bccf4841d Overwrite built-in appliance files when starting a more recent version of the server 2023-01-01 15:57:41 +08:00
b3a6b9173b Fix reset console. Fixes #1619 2022-12-31 09:43:17 +08:00
2d6b260188 Revert "Install importlib-resources==1.3 with Python < 3.9"
This reverts commit 343022c63b.
2022-12-30 21:13:59 +08:00
c814245426 Revert "Change importlib-resources dependency to v1.4.0"
This reverts commit d787f38c21.
2022-12-30 21:13:49 +08:00
d787f38c21 Change importlib-resources dependency to v1.4.0 2022-12-30 21:09:54 +08:00
343022c63b Install importlib-resources==1.3 with Python < 3.9 2022-12-30 21:05:18 +08:00
1148dbc48e Fix issue when calling reset_console with running VPCS and Qemu nodes. Ref #1619 2022-12-30 20:54:37 +08:00
85679aaa94 Try importlib-resources for Python 3.9 2022-12-30 11:44:29 +08:00
5bcc247881 Make gns3server.appliances a package 2022-12-30 11:37:34 +08:00
b8d595928b Try to fix tests 2022-12-30 10:35:29 +08:00
3804249d89 Fix tests 2022-12-30 10:01:43 +08:00
c56a8ef8f7 Only use importlib_resources for Python < 3.9. Fixes #2147 2022-12-30 09:15:40 +08:00
076e85ddb3 Update sentry-sdk dependency 2022-12-28 15:13:26 +08:00
2550fb3495 Support when the user field defined in Docker container is an ID. Fixes #2134 2022-12-28 11:05:22 +08:00
f837912ebc Development on 3.0.0.dev7 2022-12-28 08:29:26 +08:00
830cc108d0 Release v3.0.0a3 2022-12-27 15:22:16 +08:00
36ffe2bb59 Sync appliances 2022-12-27 13:40:07 +08:00
f8739eb5e1 Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	gns3server/crash_report.py
#	gns3server/version.py
#	requirements.txt
2022-12-27 13:28:11 +08:00
5bc030688e Sync web-ui v3.0.0a3 2022-12-27 13:17:12 +08:00
9f75a49e0a Fix syntax error in .whitesource 2022-12-27 12:27:26 +08:00
7f440f43d8 Add more base branches for Mend to scan 2022-12-27 12:25:49 +08:00
3e29ae4276 Add config option to change the server name. Ref #2149 2022-12-27 10:05:13 +08:00
91b50eb5f2 Merge pull request #2146 from GNS3/fix/2126
Improve image discovery process
2022-12-26 10:23:57 +05:45
c6e31d98db Option to disable image discovery and do not scan parent directory 2022-12-26 12:32:40 +08:00
9a7b3bed25 Allow raw images by default. Fixes https://github.com/GNS3/gns3-server/issues/2097 2022-12-26 11:28:51 +08:00
8ad7b3f613 Fix bug when creating Dynamips router with chassis setting 2022-12-24 18:03:00 +08:00
00691390eb Merge pull request #2145 from GNS3/fix/2144
Stricter checks to create/update an Ethernet switch and add tests
2022-12-24 06:16:18 +05:45
17e0b2e259 Stricter checks to create/update an Ethernet switch and add tests 2022-12-24 08:20:51 +08:00
5666b43ee0 Fix schema for removing WICs from Cisco routers. Fixes #3392 2022-12-22 20:02:28 +08:00
84f256dd88 Downgrade to flake8 v5.0.4 2022-12-22 09:46:11 +08:00
1bbecf1ceb Update dependencies 2022-12-22 09:42:14 +08:00
72a4d0df4e Update GH actions checkout and setup-python 2022-12-22 09:35:45 +08:00
93449c942f Fix tests 2022-12-22 09:24:17 +08:00
649173b293 Merge remote-tracking branch 'origin/master' 2022-12-21 17:14:00 +08:00
1c183e660f Downgrade Ubuntu to 20.04 to fix missing Python 3.6 2022-12-21 17:12:09 +08:00
634e6a3549 Update SECURITY.md 2022-12-20 21:28:46 +08:00
a91ed34f43 Downgrade Ubuntu to 20.04 to fix missing Python 3.6 2022-12-18 14:24:50 +08:00
5209009df9 Upgrade dependencies 2022-12-18 14:14:56 +08:00
5ba526e175 Development on v2.2.36.dev2 2022-11-11 00:36:47 +08:00
d17c243b13 Release v2.2.35.1 2022-11-10 22:21:13 +08:00
9e4ae6bc24 Sync appliance files 2022-11-10 22:10:21 +08:00
4b410cfa42 Merge branch 'master' into 2.2 2022-11-10 22:06:09 +08:00
b9e415b6fe Push missing file for Web-Ui v2.2.35 2022-11-10 13:09:10 +08:00
d2d327cc76 Re-release Web-Ui v2.2.35 2022-11-10 12:38:33 +08:00
7643185fa2 Add missing importlib_resources 2022-11-09 23:14:38 +08:00
263febecbc Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	appveyor.yml
#	dev-requirements.txt
#	gns3server/compute/base_node.py
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/crash_report.py
#	gns3server/static/web-ui/index.html
#	gns3server/utils/get_resource.py
#	gns3server/version.py
#	gns3server/web/route.py
#	requirements.txt
#	tests/handlers/api/compute/test_qemu.py
#	win-requirements.txt
2022-11-09 20:30:28 +08:00
0a046e43d7 Development on 2.2.36.dev1 2022-11-09 20:02:20 +08:00
a7036d14d5 Merge branch '2.2' 2022-11-09 20:00:48 +08:00
1aca7dbe04 Release v2.2.35 2022-11-08 23:40:25 +08:00
338128ca3e Upgrade pywin32 to v305 2022-11-08 23:39:10 +08:00
e165cc48e3 Use Visual Studio 2022 in appveyor.yml 2022-11-08 23:09:23 +08:00
c80a55b18c Install appliances and configs without importlib_resources for Windows only 2022-11-08 23:07:45 +08:00
284a4b62fb Fix copying appliances and configs when app is frozen 2022-11-08 22:50:59 +08:00
d33fefa183 Merge branch 'master' into 2.2 2022-11-08 19:29:39 +08:00
dfb48c884b Release web-ui v2.2.35 2022-11-08 19:29:21 +08:00
18ba60d1a3 Downgrade psutil to v5.9.2 2022-11-08 19:18:07 +08:00
521132726e Upgrade psutil to v5.9.4 2022-11-08 18:49:31 +08:00
f80aca7633 Sync appliance files 2022-11-08 18:40:27 +08:00
84914ecfa4 Add debug messages to fix VMnet interface list refresh. Ref https://github.com/GNS3/gns3-gui/issues/3381 2022-11-08 12:54:47 +08:00
5696d1ccb7 Fix issues with VMnet interface on macOS >= 11.0. Ref #3381 2022-11-07 23:59:33 +08:00
18b0863ba8 Merge remote-tracking branch 'origin/2.2' into 2.2
# Conflicts:
#	requirements.txt
2022-11-07 21:50:59 +08:00
ece47dc279 Upgrade dependencies 2022-11-07 21:48:45 +08:00
6e1d49d8ca Merge pull request #2133 from GNS3/use-importlib-resources
Migrate to importlib_resources
2022-11-07 21:24:35 +08:00
2e550d839e Fix tests 2022-11-07 20:33:02 +08:00
a4b24eaceb Use importlib_resources instead of pkg_resources and install built-in appliances in config dir. 2022-11-07 20:12:03 +08:00
f04702d607 Fix console vnc don't use configured ports in some case. Fixes #2111 2022-11-06 19:36:31 +08:00
6f11df6189 Add missing VMware settings in gns3_server.conf 2022-11-06 19:30:24 +08:00
9cf2e4f5a6 Make version PEP 440 compliant 2022-11-06 17:51:31 +08:00
9316876f97 Merge pull request #2123 from blueneekone/patch-1
Update gns3.service.systemd
2022-11-04 23:01:57 +08:00
f3b8f43689 Fix creating asyncio task in Python 3.6 2022-10-30 22:21:28 +08:00
2d74d1ad94 Fix tests for Python 3.11 2022-10-30 22:07:44 +08:00
ec50cc7c0d Support for Python 3.11 2022-10-30 19:04:54 +08:00
f8ee3b3d50 Upgrade pywin32 to v304 2022-10-19 18:31:17 +08:00
bbf9c04d20 Upgrade pywin32 to v304 2022-10-19 18:30:28 +08:00
67e42f9353 Merge pull request #2128 from GNS3/fix/3393
Update requirements.txt
2022-10-18 22:31:56 +08:00
31a490211b Merge branch '2.2' into fix/3393 2022-10-18 22:31:04 +08:00
c7df8331ed Upgrade to Visual Studio 2022 in appveyor.yml 2022-10-18 21:47:10 +08:00
de1654a50f Upgrade pip and setuptools in appveyor.yml 2022-10-18 21:40:08 +08:00
a6959de1f8 Upgrade pytest. Fixes #2130 2022-10-18 21:14:53 +08:00
8cfedce468 Use jsonschema v3.2.0 for Python 3.6 2022-10-12 22:13:34 +08:00
77dd772314 Allow for more dependency versions at patch level 2022-10-12 22:07:37 +08:00
9ff302592c Upgrade to aiohttp 3.8.3 2022-10-12 21:40:23 +08:00
6b3d4feab8 Replace deprecated distro.linux_distribution() call 2022-10-11 23:28:11 +08:00
78b2b93540 Update dev-requirements.txt 2022-10-11 23:23:15 +08:00
0303e21059 Update requirements.txt 2022-10-11 23:01:24 +08:00
e20d1adb0e Downgrade aiohttp to v3.8.1 2022-10-10 16:30:28 +08:00
e5bee8ff52 Downgrade Jinja2 to support Python 3.6 2022-10-10 15:52:36 +08:00
58471ea7f4 Downgrade aiofiles to support Python 3.6 2022-10-10 15:50:35 +08:00
9fb0ba5a71 Upgrade dependencies 2022-10-10 14:29:04 +08:00
3d738e83f5 Update gns3.service.systemd
In reference to bug #1918, the gns3.service.systemd file references ExecPath /usr/bin/gns3server which needs to be changed to /usr/local/bin/gns3server for the daemon/service to run without failure.

Please see the change I made to the service above.
2022-10-02 23:25:58 -06:00
19de2732f2 Upgrade to FastAPI 0.85.0 and check embedded web-ui index.html can be found. 2022-09-29 15:11:15 +02:00
40c22e389e Merge branch 'master' into 2.2 2022-09-29 14:56:35 +02:00
0419c081fe Merge pull request #2083 from a60814billy/fix/binding-on-wrong-interface-in-windows
fix: binding to wrong interface in windows
2022-09-28 17:36:31 +02:00
dced70a565 Merge branch 'master' into 2.2 2022-09-27 11:55:53 +02:00
9a7222b83e Upgrade FastAPI to v0.84.0 2022-09-14 21:09:29 +02:00
b0e646b97d Fix some issues with HTTP notification streams 2022-09-13 22:10:01 +02:00
e8973b9c44 Development on 3.0.0dev5 2022-09-07 01:16:14 +02:00
317e2b164c Release v3.0.0a2 2022-09-07 01:05:41 +02:00
8976a751fa Add web-ui v3.0.0a2 2022-09-07 00:57:08 +02:00
bcac7874c1 Upgrade FastAPI to v0.82.0 2022-09-04 22:09:48 +02:00
0f4c98c7e4 Merge pull request #2110 from GNS3/locked-project
API endpoint to get the locked status of a project
2022-09-03 23:13:06 +02:00
2976e220dc Return a boolean directly from API endpoint for project locked status 2022-09-03 23:08:13 +02:00
27debfff8d API endpoint to get the locked status of a project 2022-09-03 22:58:44 +02:00
3014bd0216 Merge pull request #2108 from GNS3/project-lock-unlock
Global project lock and unlock
2022-08-30 22:54:47 +02:00
ca3bf592d6 Global project lock and unlock 2022-08-30 22:49:47 +02:00
43e60c31c7 Remove empty files after merge 2022-08-30 12:21:05 +02:00
426c16e296 Merge branch '2.2' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	CHANGELOG
#	appveyor.yml
#	dev-requirements.txt
#	gns3server/controller/compute.py
#	gns3server/crash_report.py
#	gns3server/version.py
#	gns3server/web/route.py
#	pytest.ini
#	requirements.txt
#	tests/compute/dynamips/test_dynamips_router.py
#	tests/compute/test_base_node.py
#	tests/compute/vmware/test_vmware_manager.py
#	tests/compute/vmware/test_vmware_vm.py
#	tests/controller/gns3vm/test_virtualbox_gns3_vm.py
2022-08-30 11:53:12 +02:00
0d0a06799d Development on 2.2.35dev1 2022-08-29 11:14:44 +02:00
eeae27ae0d Merge branch '2.2' 2022-08-29 11:11:29 +02:00
8d4df08150 Release v2.2.34 2022-08-28 23:28:12 +02:00
fd1d8d9d86 Update appliance files 2022-08-28 22:51:26 +02:00
4ddce880ea Merge remote-tracking branch 'origin/2.2' into 2.2 2022-08-28 22:32:49 +02:00
e0209a0491 Downgrade Jinja2 to v3.0.3 2022-08-28 22:32:42 +02:00
829eb42c7f Revert "Downgrade Jinja2 to v3.0.3"
This reverts commit ad3d73a7f1.
2022-08-28 22:31:28 +02:00
ad3d73a7f1 Downgrade Jinja2 to v3.0.3 2022-08-28 22:30:47 +02:00
e96d8ae497 Merge pull request #2089 from SpikefishSolutions/spikefishjohn-patch-3
Update compute.py
2022-08-28 22:09:44 +02:00
d996a87246 Require name for custom adapters. Fixes #2098 2022-08-28 17:33:33 +02:00
b58a54ae7c Allow empty adapter slots for Dynamips templates. Ref https://github.com/GNS3/gns3-gui/issues/3373 2022-08-28 17:05:28 +02:00
129f0a631c Use original $PATH in init.sh for Docker containers. Ref #2069 2022-08-28 12:06:56 +02:00
ad1f1cdb96 Merge remote-tracking branch 'origin/2.2' into 2.2 2022-08-28 00:03:03 +02:00
ab6c6535c6 Upgrade Sentry dependency 2022-08-28 00:02:54 +02:00
3444615253 Merge pull request #2101 from GNS3/upgrade-dev-dependencies
Upgrade dev dependencies
2022-08-28 00:01:53 +02:00
028f977823 Revert "Don't install nmap"
This reverts commit b6cf3aabca.
2022-08-28 00:01:26 +02:00
b6cf3aabca Don't install nmap 2022-08-27 23:55:42 +02:00
6546407e5d Upgrade to Python 3.7 for Windows tests 2022-08-27 23:52:59 +02:00
46b022f726 Restore missing loop 2022-08-27 23:45:30 +02:00
8f296e54f4 Add back loop 2022-08-27 23:41:52 +02:00
fc7d5be736 Use pytest-asyncio auto mode 2022-08-27 21:10:17 +02:00
600c18f04b Remove pytest.ini from tests dir 2022-08-27 21:00:31 +02:00
852de03d43 Install latest dev dependencies for Python >= 3.7 2022-08-27 20:40:35 +02:00
470e6cb901 Add pytest-asyncio 0.19.0 2022-08-27 19:41:46 +02:00
e8273fb19e Downgrade to pytest-aiohttp v0.3.0 2022-08-27 19:39:02 +02:00
4b3d6572d4 Downgrade to pytest v7.0.1 (last version to support 2022-08-27 19:35:36 +02:00
fad3df453d Run tests on 2.2 branch 2022-08-27 19:31:24 +02:00
d1c8f33fc5 Upgrade dev dependencies and fix issues after upgrading to pytest-aiohttp v1.0.4 2022-08-27 19:16:02 +02:00
94c617ef1c Upgrade dependencies 2022-08-26 21:41:49 +02:00
c4b10ac4da Merge pull request #2099 from GNS3/strict-pytest-asyncio
Support for pytest-asyncio strict mode
2022-08-24 21:11:55 +02:00
86c44cd6e7 Upgrade dev dependencies and fix tests to support pytest-asyncio strict mode 2022-08-24 21:03:16 +02:00
2e91eac1eb Upgrade dependencies 2022-08-23 22:12:01 +02:00
3634cc8307 Merge pull request #2094 from mm1ke/master
gns3.service.openrc: make openrc script posix compliant
2022-08-08 19:29:30 +02:00
3b108563a0 gns3.service.openrc: make openrc script posix compliant 2022-08-08 19:23:29 +02:00
6fa3f85b83 Custom adapters should not be in node (compute) properties returned to clients. Fixes https://github.com/GNS3/gns3-gui/issues/3366 2022-08-06 12:37:05 +02:00
3948637a46 Fix typo in requirements.txt 2022-08-06 12:21:27 +02:00
93b71f806e Development on v3.0.0dev4 2022-08-04 12:29:49 +02:00
3ddbd0de64 Release v3.0.0a1 2022-08-04 11:38:17 +02:00
541e9702bf Bundle gns3-web-ui v3.0.0a1 2022-08-04 11:12:42 +02:00
f4b44e072d Merge remote-tracking branch 'origin/3.0' into 3.0 2022-08-04 11:08:13 +02:00
64c6000470 Update appliance files 2022-08-04 11:08:00 +02:00
33087a6c21 Do not use build-optimizer when bundling web-ui. Ref https://github.com/GNS3/gns3-web-ui/issues/1366 2022-08-04 11:04:33 +02:00
8670377e3b Do not use build-optimizer when bundling web-ui. Ref https://github.com/GNS3/gns3-web-ui/issues/1366 2022-07-31 12:39:42 +02:00
31ae70894e Fix enum use in schemas 2022-07-26 23:17:39 +02:00
bd9af3fe90 Merge pull request #2091 from GNS3/use-themed-symbols
Let the controller allocate symbols
2022-07-25 20:45:04 +02:00
6d0c375323 Use default symbol theme if none is provided when loading appliances 2022-07-25 20:39:03 +02:00
72eb13d941 Allow default symbol theme to be configured 2022-07-25 20:22:12 +02:00
bfbac2e93a Use generic symbol names 2022-07-25 12:33:40 +02:00
b7f4a4cbda Fix VMware VM addition 2022-07-25 11:10:01 +02:00
e693edc7c1 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2022-07-23 12:55:03 +02:00
5824f0797a Update web-ui bundled script to use master-3.0 2022-07-23 12:18:50 +02:00
725942157e Optionally allow Qemu raw images 2022-07-22 12:39:52 +02:00
d08a052f94 Merge pull request #2086 from GNS3/iou-user-loader-libraries
Support user defined loader/libraries to run IOU
2022-07-20 17:03:18 +02:00
da626d334f Merge branch '3.0' into iou-user-loader-libraries 2022-07-20 16:44:48 +02:00
7f5ad8e225 Ignore image detection for IOU user libraries in image directory 2022-07-20 16:39:24 +02:00
037c659f9b Don't show optional token param in API docs 2022-07-20 00:29:42 +02:00
7277d526e3 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.
2022-07-18 18:43:57 -04:00
d022b211dc Fix check for 32-bit in ELF header 2022-07-17 23:55:34 +02:00
5d4645b2c1 Merge pull request #2087 from GNS3/enhancement/2076
Checks for valid hostname on server side for Dynamips, IOU, Qemu and Docker nodes
2022-07-17 11:59:09 +02:00
80f5ca0c3f Checks for valid hostname on server side for Dynamips, IOU, Qemu and Docker nodes 2022-07-17 11:51:29 +02:00
86368a1177 Sync appliance files 2022-07-17 00:04:55 +02:00
e9f4fad0bd Merge remote-tracking branch 'origin/3.0' into 3.0 2022-07-16 12:11:41 +02:00
b2ba561c0d Only check files (not directories) when looking for new images on file system. 2022-07-16 12:11:26 +02:00
83ea96c08d Merge pull request #2085 from GNS3/remove-explicit-204-responses
Remove explicit Response for endpoints returning HTTP 204 status code
2022-07-16 12:07:36 +02:00
f5e1956dfa Support user defined loader/libraries to run IOU 2022-07-16 11:38:51 +02:00
9462bca124 Remove explicit Response for VPCS endpoints returning HTTP 204 status code 2022-07-16 00:14:31 +02:00
fc6aeb715a Remove explicit Response for endpoints returning HTTP 204 status code 2022-07-16 00:12:18 +02:00
5b478fc331 Upgrade dependencies 2022-07-15 11:32:18 +02:00
4a1da00601 Make 'vendor_url' and 'maintainer_email' optional for template validation. 2022-07-12 11:55:18 +02:00
56734b171b Merge pull request #2084 from GNS3/token-as-a-param
Allow JWT token to be passed as a URL param
2022-07-11 14:27:37 +02:00
f4b67f2e59 Allow auth token to be passed as a URL param 2022-07-11 14:19:47 +02:00
790bf4521d fix: use exact match to find interface in windows to avoid get wrong interface 2022-07-06 14:22:11 +08:00
dd6ca38035 Merge pull request #2082 from GNS3/import-project
Project importation
2022-07-05 23:08:15 +02:00
149d086fd8 Reactivate project importation 2022-07-05 23:01:44 +02:00
9e5ca50302 Bump version to v2.2.34dev2 2022-06-23 10:55:19 +02:00
c5f441e1d3 Remove wrong reset_console() method 2022-06-21 17:22:47 +02:00
410f062721 Fix config option to disable built-in templates. 2022-06-21 17:17:44 +02:00
d8b928f1c1 Fix tests. 2022-06-21 16:52:25 +02:00
d303d13045 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/iou/iou_vm.py
#	gns3server/controller/template_manager.py
#	gns3server/handlers/api/compute/docker_handler.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/iou_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/compute/virtualbox_handler.py
#	gns3server/handlers/api/compute/vmware_handler.py
#	gns3server/handlers/api/compute/vpcs_handler.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/version.py
#	requirements.txt
#	tests/controller/test_controller.py
#	tests/controller/test_project.py
#	tests/handlers/api/controller/test_node.py
2022-06-21 16:45:25 +02:00
35ec8bed6e Back to development on v2.2.34dev2 2022-06-21 11:52:58 +02:00
0433065b8b Revert "Development on v2.2.34dev2"
This reverts commit 7c5a5a9001.
2022-06-21 11:51:01 +02:00
7c5a5a9001 Development on v2.2.34dev2 2022-06-21 11:38:09 +02:00
1b32ef7854 Release v2.2.33.1 2022-06-21 10:48:02 +02:00
f5b1920f8c Add missing web-ui file 2022-06-21 10:24:19 +02:00
4341db0ff3 Development on v2.2.34dev1 2022-06-20 21:47:42 +02:00
162a8baf7b Release v2.2.33 2022-06-20 20:53:21 +02:00
4280655b3a Merge branch 'master' into 2.2 2022-06-20 20:49:51 +02:00
d47e546fce Release web-ui v2.2.33 2022-06-20 20:37:51 +02:00
2b4d623f13 Upgrade sentry-sdk and psutil 2022-06-20 20:05:34 +02:00
3c901a84bf Sync appliance files. 2022-06-20 20:02:04 +02:00
ec3c36d6da Fix Docker tests 2022-06-19 21:18:54 +02:00
908911e764 Remove parameter "Name" not useful to create a Docker container 2022-06-18 19:41:20 +02:00
bdd703a0dc Support to reset all console connections. Ref https://github.com/GNS3/gns3-server/issues/1619 2022-06-15 15:30:44 +02:00
4acc457674 Merge pull request #2073 from GNS3/disable-builtin-templates
Config setting to disable builtin templates
2022-06-15 15:08:21 +02:00
67bf14776f Config option to disable built-in templates 2022-06-15 14:48:52 +02:00
2eb64200a4 Add spaces before hostname for Docker network config. Ref #2039 2022-06-12 19:32:34 +08:00
988ca7574c Add hostname entry to sample network config for Docker nodes. Fixes #2039 2022-06-08 01:07:31 +08:00
527d4bb3ea Run Xtigervnc with MIT-SHM extension disabled for Docker VNC console support. Fixes #2071 2022-06-08 00:05:24 +08:00
7d49b80e6b Add controller endpoints to get VirtualBox VMs, VMware VMs and Docker images 2022-06-07 00:38:59 +08:00
3b7dfe5929 Merge pull request #2055 from GNS3/remove-qemu-binaries-requirement
Remove Qemu binary requirement
2022-06-06 14:51:07 +08:00
30f7c0ce74 Fix issues when discovering images 2022-06-03 15:35:33 +07:00
466aaf5c13 Merge pull request #2070 from GNS3/project-export-zstd
zstandard compression support for project export
2022-06-03 11:31:25 +07:00
c98a10dcfd Do not tweak zstd compression params 2022-06-03 11:26:26 +07:00
162af5bb7a Checks for compression levels + tests 2022-06-01 20:26:59 +07:00
015e17338c HTTP middleware create issues when streaming project archive 2022-06-01 15:31:59 +07:00
940d22f2aa Add missing zstandard dependency 2022-05-31 18:12:32 +07:00
8a964390f8 Add zstandard compression support for project export 2022-05-31 18:08:34 +07:00
37c7bc4956 Add missing response() method in ComputeConflictError 2022-05-27 16:03:54 +07:00
85cdd7d9a5 Fix reading response embedded in ComputeConflictError 2022-05-27 15:58:14 +07:00
944a72254c Revert "Sync dev version of web-ui v3"
This reverts commit a9d58e337f.
2022-05-27 14:00:18 +07:00
a9d58e337f Sync dev version of web-ui v3 2022-05-26 19:37:23 +07:00
2d4e9fdd64 Upgrade dependencies 2022-05-26 19:21:37 +07:00
1e4075ec37 Merge pull request #2066 from wowpetr/add-openrc-init
Add OpenRC init script
2022-05-26 19:02:23 +07:00
9d8ddea577 Added OpenRC init script 2022-05-16 07:06:29 +03:00
df50b46952 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/version.py
#	requirements.txt
2022-04-27 22:23:05 +07:00
bccfb64958 Development on 2.2.33dev1 2022-04-27 19:51:24 +07:00
99813b3cfa Release v2.2.32 2022-04-27 18:47:20 +07:00
1837850894 Docker: load custom interface files from /etc/network/interfaces (commented by default). Ref #2052 2022-04-27 18:37:09 +07:00
fe037a5f1c Merge branch 'master' into 2.2 2022-04-27 18:25:31 +07:00
b03ec6e3fe Release web Ui 2.2.32 with correct version displayed 2022-04-27 18:24:36 +07:00
732c5deeff Revert "Release web UI 2.2.32"
This reverts commit db1443dd08.
2022-04-27 18:19:44 +07:00
db1443dd08 Release web UI 2.2.32 2022-04-27 18:11:26 +07:00
54e638f3ea Update appliance files 2022-04-27 17:26:36 +07:00
89c67790ae Make sure that the temporary image file is removed after uploading an image 2022-04-27 16:00:02 +07:00
cd096ac6e6 Backward compatibility for --log argument 2022-04-27 14:15:29 +07:00
f5c20b2549 Require Python >= 3.7 2022-04-26 19:11:37 +07:00
890dbd9f77 Create /etc/network/interfaces.d in Docker container. Fixes #2052 2022-04-20 22:59:51 +07:00
460fe5ed95 Prettify Docker '/etc/network/interfaces' file. Ref #2040 2022-04-20 19:29:56 +07:00
653539d2b0 Use public DSNs for Sentry 2022-04-20 18:41:18 +07:00
56b5c1d237 Fix VMware Fusion VM does not start on macOS >= 11. Fixes #2027 2022-04-20 18:26:45 +07:00
f21d5062fc Upgrade some packages 2022-04-20 17:38:54 +07:00
2535e5508d Remove Qemu binary requirement 2022-04-19 18:21:39 +07:00
2ee9232ac5 Merge pull request #2053 from GNS3/image-md5sum-management
New images detection and checksum handling
2022-04-18 17:22:08 +07:00
8b5558ba94 Fix merge error 2022-04-18 17:18:30 +07:00
b94f01fe4e Merge branch '3.0' into image-md5sum-management 2022-04-18 17:15:21 +07:00
3106c8a6a2 Do not cache to md5sum file in some situations 2022-04-18 17:13:52 +07:00
34233e48d9 Upgrade FastAPI to version 0.75.2 2022-04-18 13:25:29 +07:00
010d7aa49f Upgrade SQLAlchemy version and dispose of db engine 2022-04-17 17:32:44 +07:00
e6c8144210 Detect new images added to the default image directory.
* Images can be present before the server starts or while it is running
* Images are recorded in the database
2022-04-17 16:58:20 +07:00
6af1f2afaa Merge pull request #2049 from GNS3/qemu-disk-images
New implementation to create/resize Qemu disk images
2022-04-14 17:15:55 +07:00
e50bed5bee Support delete Qemu disk image from API
Return the real disk image name in the 'hdx_disk_image_backed' property for Qemu VMs
2022-04-14 17:01:54 +07:00
a1c76ec4f2 Fix ComputeConflictError import 2022-04-07 16:34:48 +08:00
fda2a37b98 Handle creating Qemu disk images and resizing 2022-04-07 16:21:47 +08:00
888c773dc0 Finish to clean up local setting usage. Ref #1460 2022-03-31 12:05:47 +08:00
2cddb2c05a Merge pull request #2047 from GNS3/local-server-param-refactoring
"Local" command line parameter only for one purpose
2022-03-30 18:51:27 +08:00
900d4f79ee "Local" command line parameter is only for stopping
a server that has been started by the desktop GUI
2022-03-30 18:38:34 +08:00
ce6d1e10d8 Include conf file in MANIFEST.in Ref #2044 2022-03-28 14:45:29 +10:30
a0fcb18395 Use Python 3.7 to publish API documentation 2022-03-28 11:27:53 +10:30
611193b25a Merge pull request #2042 from kaivogelgesang/master
Fix typo
2022-03-23 17:43:48 +10:00
73dff4b9c6 Fix typo 2022-03-23 08:38:14 +01:00
8975f63e2f Fix AsyncSession handling after breaking changes in FastAPI 0.74.0
See https://github.com/tiangolo/fastapi/releases/tag/0.74.0 for details.
2022-03-20 16:25:48 +10:00
9b39bfb845 Detect image type instead of requesting it from user 2022-03-20 16:20:17 +10:00
2a5a4b5f77 Use README.md in setup.py 2022-03-16 11:22:28 +10:00
db739775d0 Drop Python 3.6 support and require Python >= 3.7 2022-03-14 15:13:26 +10:30
3edfa53e9e Update README.md 2022-03-14 14:46:29 +10:30
4b4f19c415 Create SECURITY.md 2022-03-14 14:27:32 +10:30
70e36be4fd Create codeql-analysis.yml 2022-03-14 14:21:50 +10:30
e897ab6163 Uvicorn version 0.17.6 does not support Python 3.6 2022-03-13 15:46:38 +10:30
0a10b41418 Convert README to markdown 2022-03-13 15:44:26 +10:30
f8a83e7ff9 Merge branch '2.2' into 3.0
# Conflicts:
#	dev-requirements.txt
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/version.py
#	requirements.txt
2022-03-13 14:50:02 +10:30
1a535371b6 Upgrade dependencies 2022-03-12 16:23:17 +10:30
53f89a7fe5 Development on 2.2.32dev1 2022-02-26 20:39:26 +10:30
22c16e3608 Release v2.2.31 2022-02-26 18:22:29 +10:30
bb26ef2c3d Development on 2.2.31dev1 2022-02-25 15:59:40 +10:30
59e4e694e5 Install setuptools v59.6.0 when using Python 3.6 2022-02-25 15:50:45 +10:30
74018fae7b Release v2.2.30 2022-02-25 14:52:27 +10:30
f963e63d16 Merge branch 'master' into 2.2 2022-02-25 14:45:47 +10:30
7490be6d5e Support GNS3 variables in Docker environment variables. Fixes #2033 2022-02-23 14:33:30 +10:30
fa96c1845c Release web UI 2.2.30 2022-02-16 01:08:59 +01:00
4891dc9eee Set setuptools to v60.6.0 2022-02-06 21:02:43 +10:30
f7cc4e9574 Upgrade dependencies 2022-02-06 17:35:52 +10:30
5e4870b008 Merge pull request #2025 from GNS3/drop-windows-support
Drop Windows support
2022-01-19 22:03:06 +10:00
74c675d5b0 Drop Windows support 2022-01-19 22:28:36 +10:30
4fb0cd9321 Remove unused code 2022-01-18 19:55:36 +10:30
4121aa31ac Merge pull request #2024 from SpikefishSolutions/master
Update qemu_vm.py linked node error
2022-01-18 08:16:00 +10:00
7dcc80ff39 Merge pull request #1 from SpikefishSolutions/spikefishjohn-patch-1
qemu_vm.py Linked node test.
2022-01-17 14:38:02 -05:00
511ac73d4f qemu_vm.py Linked node test.
Include project name in error. This should help identify which project the none linked node is located in.
2022-01-17 14:19:49 -05:00
63b2b205ab Upgrade FastAPI to version 0.72.0 2022-01-17 18:53:27 +10:30
841d3028d6 Upgrade dependencies 2022-01-16 21:31:12 +10:30
03f8ea9a6e Fix dead link in README.rst Fixes #2022 2022-01-15 18:49:24 +10:30
f9312764ba Merge branch 'master' into 3.0
# Conflicts:
#	gns3server/version.py
2022-01-11 22:42:25 +10:30
6544f2e8e4 Development on 2.2.30dev1 2022-01-08 22:53:27 +10:30
aff06572d4 Release v2.2.29 2022-01-08 22:15:15 +10:30
35781e9b39 Sync appliance files 2022-01-08 22:11:32 +10:30
3251badfa5 Merge branch 'master' into 2.2 2022-01-08 22:02:37 +10:30
9559741d1f Release web UI 2.2.29 2022-01-07 21:03:19 +01:00
04287a7100 Merge pull request #2018 from tournemire/patch-1
Add NixOS in list of distributions with a package
2022-01-06 21:02:53 +10:00
31352f9a4c Add NixOS in list of distributions with a package 2022-01-06 11:57:00 +01:00
10fdd8fcf4 Add connect endpoint for computes
Param to connect to compute after creation
Report compute unauthorized HTTP errors to client
2021-12-24 13:05:39 +10:30
36cf43475d Replace CORS origins by origin regex 2021-12-19 18:10:15 +10:30
d1d36ce254 Change default config settings 2021-12-17 12:26:02 +10:30
c5a6cd8d33 Update Docker image for tests 2021-12-17 12:20:46 +10:30
f5301e5f14 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2021-12-16 12:35:11 +10:30
ef36b340b0 Development on 2.2.29dev1 2021-12-15 21:38:06 +10:30
bbcc28bbfc Release v2.2.28 2021-12-15 13:54:14 +10:30
d96d11746e Merge branch 'master' into 2.2
# Conflicts:
#	init/gns3.service.systemd
2021-12-15 13:36:04 +10:30
87c1df1639 Fix compute Docker test. Fixes #2003 2021-12-15 13:30:38 +10:30
b400ae240d Sync appliance files 2021-12-15 13:23:48 +10:30
ff64f86289 Fix calls to static methods in server.py 2021-12-15 13:08:18 +10:30
466584f074 Release web UI 2.2.28 2021-12-13 23:49:42 +01:00
ab4d964d69 Do not require the local server param to open a .gns3 file. Fixes https://github.com/GNS3/gns3-gui/issues/2421 Ref #1460 2021-12-10 15:52:57 +10:30
16fcf6141e Fix tests 2021-12-08 00:43:54 +10:30
05d2579907 Do not automatically install appliance after uploading image 2021-12-08 00:01:25 +10:30
01a9e83f08 Ignore OSError when closing websocket 2021-12-08 00:00:54 +10:30
af9860f965 Fix compute Docker test 2021-12-02 22:15:23 +10:30
296446189f Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/appliances/Simulator.gns3a
#	gns3server/compute/docker/__init__.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/version.py
2021-12-02 19:57:04 +10:30
5797de8f2d Fix tests 2021-12-02 19:14:55 +10:30
8bae921587 Fix packet capture 2021-12-02 18:07:09 +10:30
928966ea5f Upgrade dependencies 2021-11-24 17:48:58 +10:30
25466a9958 Allow empty compute_id. Ref #1657 2021-11-24 17:25:55 +10:30
8995ed37a4 Merge pull request #1990 from GNS3/scalability
Scalability and option to use templates across all computes
2021-11-24 16:38:41 +10:30
0d25727ca6 Simpler Systemd service file. Ref #1996 2021-11-20 16:18:09 +10:30
488146e802 Merge pull request #1999 from GNS3/compute-authentication
Secure controller to compute communication
2021-11-18 18:48:04 +10:30
38388f7ae5 Secure controller to compute communication using HTTP basic authentication 2021-11-18 18:37:10 +10:30
8d5d480077 Development on 2.2.28dev1 2021-11-13 16:31:21 +10:30
950b43a9cf Merge branch '2.2' 2021-11-13 16:29:40 +10:30
2469468c5d Release v2.2.27 2021-11-12 15:33:53 +10:30
0d19a742d0 Merge pull request #1997 from jak-sdk/issue-1996
update /var/run -> /run to meet FHS spec & Systemd best practices
2021-11-12 15:26:16 +10:30
02a19b230f Sync appliance files 2021-11-12 15:12:15 +10:30
c077a15137 Merge branch 'master' into 2.2 2021-11-12 14:46:30 +10:30
ce08b8914f Release web UI 2.2.27 fixed version 2021-11-10 00:14:25 +01:00
f7b7b1e59f Release web UI 2.2.27 2021-11-08 18:13:12 +01:00
jak
6b9511b36a update /var/run -> /run to meet FHS spec & Systemd best practices 2021-11-06 10:00:06 +00:00
b1a62dfdc2 Fix unhandled KeyError exception when starting Docker container. Ref #1991 2021-11-04 16:59:35 +10:30
55e50dae4b Merge pull request #1992 from GNS3/secure-websocket-endpoints
Secure websocket endpoints
2021-11-01 17:10:41 +10:30
717a400a11 Fix tests 2021-11-01 17:05:27 +10:30
741fc4a557 Secure websocket endpoints 2021-11-01 16:45:14 +10:30
7ce5e19a6e Fix issue when updating a template 2021-10-23 16:23:19 +10:30
6165778576 Allocate compute when compute_id is unset 2021-10-22 22:03:51 +10:30
45738f262b Downgrade to fastapi 0.68.2 because of BrokenResourceError exception
Ref https://github.com/tiangolo/fastapi/issues/4041
2021-10-22 16:16:34 +10:30
f2d940497b Merge pull request #1989 from GNS3/controller-ip-from-compute
Return the current controller hostname/IP from any compute
2021-10-21 21:54:52 +10:30
442a23836e Fix version output test 2021-10-21 21:48:53 +10:30
bb15b13a9d Return the current controller hostname/IP from any compute 2021-10-21 21:38:36 +10:30
dddfe7c531 Upgrade dependencies 2021-10-20 16:03:28 +10:30
16ac9358df Merge pull request #1986 from GNS3/remove-qemu-legacy-networking
Remove Qemu legacy networking support
2021-10-20 15:44:31 +10:30
52d4804e03 Merge pull request #1985 from GNS3/appliances-refactoring
Appliance management refactoring
2021-10-20 15:43:09 +10:30
eab4c8c770 Remove Qemu legacy networking support 2021-10-19 15:32:27 +10:30
a31e5615a4 Add a custom version to an appliance 2021-10-19 15:15:10 +10:30
be473aaaf7 Remove from __future__ import annotations 2021-10-18 22:16:57 +10:30
88d98cf02e Fix tests and workaround issue with flake8 2021-10-18 22:12:10 +10:30
01da25a7c7 Fix appliance validation with Pydantic 2021-10-18 21:53:29 +10:30
13ff7df9fa Validate appliance files with Pydantic 2021-10-18 21:46:50 +10:30
04934691df Appliance management refactoring:
* Install an appliance based on selected version
* Each template have unique name and version
* Allow to download an appliance file
2021-10-18 18:04:30 +10:30
8a643cf4a4 Sync appliance files 2021-10-18 16:17:27 +10:30
48745b5996 Update README.rst for Docker support. Ref #1908 2021-10-18 14:04:31 +10:30
7563e4ef29 Update appliance files 2021-10-17 15:09:49 +10:30
9ac6bd1e59 Merge pull request #1908 from GNS3/busybox-docker
Use a stock BusyBox for the Docker Integration
2021-10-16 19:47:24 +10:30
7d626c3be8 Merge pull request #1911 from GNS3/image-management-refactoring
Images management refactoring
2021-10-10 17:40:10 +10:30
bc36d95060 Finalize image management refactoring and auto install appliance if possible 2021-10-10 17:35:11 +10:30
0b200def88 Merge branch 'master' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	Dockerfile
#	gns3server/version.py
2021-10-09 12:16:50 +10:30
1067e60284 Development on 2.2.27dev1 2021-10-08 21:49:11 +10:30
6cb8b9a75e Release v2.2.26 2021-10-08 21:02:04 +10:30
7009459b0c Merge branch 'master' into 2.2 2021-10-08 20:14:09 +10:30
03c94c0bc5 Sync appliance files. 2021-10-08 20:13:32 +10:30
568df7e476 Fix running tests with Python 3.10
https://github.com/actions/setup-python/issues/249#issuecomment-934299359
2021-10-07 15:11:53 +10:30
d485a857a2 Fix running tests with Python 3.10
https://github.com/actions/setup-python/issues/249#issuecomment-934299359
2021-10-07 15:07:36 +10:30
b59b6816c3 Upgrade dependencies and test using Python 3.10 2021-10-07 14:59:53 +10:30
482b46d343 Release web UI 2.2.26 2021-10-06 17:53:00 +02:00
94ee197a6e Tests with Python 3.10 2021-10-06 20:27:57 +10:30
b683659d21 Sqlite doesn't allow BigInteger to be used as an primary key with autoincrement 2021-09-23 11:05:03 +09:30
faddc5a6b1 Upgrade dependencies 2021-09-23 10:39:27 +09:30
c386b2d046 Merge pull request #1978 from SDN-Projects/optimization/pip-no-cache-dir
chore : use --no-cache-dir flag to pip in dockerfiles to save space
2021-09-23 09:58:04 +09:30
de2d72248e chore : use --no-cache-dir flag to pip in dockerfiles to save space
using --no-cache-dir flag in pip install ,make sure downloaded packages
by pip don't cached on system . This is a best practice which make sure
to fetch from repo instead of using local cached one . Further , in case
of Docker Containers , by restricting caching , we can reduce image size.
In term of stats , it depends upon the number of python packages
multiplied by their respective size . e.g for heavy packages with a lot
of dependencies it reduce a lot by don't caching pip packages.

Further , more detail information can be found at

https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2021-09-22 15:17:21 +05:30
5ece48500c Sort symbols by theme. Fixes https://github.com/GNS3/gns3-gui/issues/3230 2021-09-20 20:09:58 +09:30
5eb5658a74 Fix memory percentage left warning. Fixes #1966 2021-09-20 18:08:02 +09:30
3286348a95 Update affinity symbols. Fixes https://github.com/GNS3/gns3-gui/issues/3232 2021-09-20 17:46:19 +09:30
395852f203 Merge pull request #1970 from hb9cwp/patch-1
Fix wrong comment for default admin password in config file
2021-09-20 17:17:53 +09:30
488a3d0d39 Update gns3_server.conf 2021-09-20 17:09:46 +09:30
d8bceaad5d Merge branch '3.0' into image-management-refactoring
# Conflicts:
#	gns3server/api/routes/controller/permissions.py
2021-09-20 17:06:46 +09:30
5807dd068e Revert "No need to add permissions when the super admin creates templates or projects"
This reverts commit 3d1c3303f9.
2021-09-20 10:36:56 +09:30
3d1c3303f9 No need to add permissions when the super admin creates templates or projects 2021-09-18 12:49:54 +09:30
c8ed96d91b Add isolate and unisolate endpoints. Ref https://github.com/GNS3/gns3-gui/issues/3190 2021-09-15 18:04:43 +09:30
898af32cd1 Package websockets 10.0 requires Python >= 3.7 2021-09-15 17:11:24 +09:30
0b4dbf27e0 Upgrade dependencies 2021-09-15 17:04:39 +09:30
541a906f49 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/node.py
#	gns3server/handlers/api/compute/server_handler.py
#	gns3server/version.py
2021-09-15 16:59:56 +09:30
67661616cf Development on v2.2.26dev1 2021-09-14 21:13:04 +09:30
6beab9433b Release v2.2.25 2021-09-14 19:20:10 +09:30
e59e051961 Merge branch 'master' into 2.2 2021-09-14 18:42:39 +09:30
6b3f703f94 Release web UI 2.2.25 2021-09-14 10:35:10 +02:00
d44a6756c1 Sync appliance files 2021-09-12 18:13:21 +09:30
cdc4cf796b Bump version to 3.0.0dev3 2021-09-11 22:18:01 +09:30
4916567ff6 Merge pull request #1971 from hb9cwp/patch-2
REST API example needs additional parameter
2021-09-09 23:03:15 -07:00
6e88d4816f REST API example needs additional parameter
While try this example with GNS3 branch 3.0 on Ubuntu 20.04 LTS, the API call 
```$ curl http://172.17.46.114:3080/v3/users/authenticate -d '{"username": "admin", "password": "admin"}' ```  fails with ```{"detail":[{"loc":["body"],"msg":"value is not a valid dict","type":"type_error.dict"}]}```.

The additional parameter appended to curl fixes this ```{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTYzMTI4NTc4NX0.kT1dAN4v1vHMTBJO2UaI2I7yAFhnSpBU9iqmdDuwtAQ","token_type":"bearer"} ```
Found after googling for the error above in 
FastAPI 0.65.2 POST request fails with "value is not a valid dict" when using the Requests library; 0.65.1 works (with a caveat) #3373
https://github.com/tiangolo/fastapi/issues/3373#issuecomment-886745123
2021-09-09 17:08:26 +02:00
6d10d92af2 Fix images_path -> symbols_path 2021-09-09 16:58:42 +09:30
a8aeb63c91 No need to find the mountpoint first for disk usage. 2021-09-09 16:58:02 +09:30
986010446a Remove empty files after merge 2021-09-09 16:55:00 +09:30
43ca53a089 Fix tests 2021-09-09 16:54:16 +09:30
a324459152 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/compute/server_handler.py
#	gns3server/utils/path.py
#	gns3server/version.py
#	requirements.txt
#	tests/compute/qemu/test_qemu_vm.py
#	tests/compute/test_manager.py
2021-09-09 16:36:17 +09:30
6805a61729 Remove duplicate configuration lines 2021-09-09 08:17:58 +02:00
6f1feed265 Fix issue preventing to use custom nested symbols. Fixes #1969 2021-09-08 15:13:51 +09:30
e026c1e91f Merge pull request #1967 from GNS3/affinity-symbols
Update affinity symbols
2021-09-07 19:30:53 -07:00
40e565d968 Add comment for svgo 2021-09-08 11:33:04 +09:30
5162ef2e22 Updated affinity symbols 2021-09-08 01:08:01 +09:30
1923c37092 Shell script to update affinity symbols 2021-09-08 01:05:56 +09:30
611570a863 Fix qemu-img rebase code to support Qemu 6.1. Ref https://github.com/GNS3/gns3-server/pull/1962 2021-09-05 22:18:46 +09:30
99d7d0c769 Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
2021-09-05 21:53:36 +09:30
e42b8cb97c Merge pull request #1963 from GNS3/run-with-qemu-6.1
Qemu 6.1 support
2021-09-05 05:15:23 -07:00
ed336da304 Qemu 6.1 support
Handle the deprecated use of backing file without explicit backing format issue.
2021-09-05 18:34:37 +09:30
bcf34d0ec8 Merge pull request #1962 from candlerb/candlerb/1955
Reinstate qemu-img rebase
2021-09-04 22:28:52 -07:00
21e9f38437 Reinstate qemu-img rebase
This allows importing portable projects with images and/or snapshots,
regression introduced by #1927.

Fixes #1955
2021-09-04 12:34:22 +01:00
f1ecb02160 Small db tables adjustments 2021-09-04 15:23:25 +09:30
fdc3774fff Add index for "name" field in role table 2021-09-03 15:21:41 +09:30
a55c9a5c6a Return disk usage for partition that contains the default project directory. Fixes #1947 2021-09-03 12:04:10 +09:30
041d2bd2d6 Merge pull request #1953 from GNS3/revert-1951-disk-usage-all-partitions
Revert "List disk usage for all mount points"
2021-09-02 05:29:53 -07:00
51c6f3fa31 Revert "List disk usage for all mount points" 2021-09-02 21:59:09 +09:30
83cbcac01b Merge pull request #1951 from GNS3/disk-usage-all-partitions
List disk usage for all mount points
2021-09-01 23:21:19 -07:00
b1224ce9f6 Update schema description for disk_usage_percent. 2021-09-02 15:48:13 +09:30
a2367d3c04 List disk usage for all mount points. 2021-09-02 15:43:38 +09:30
45e0cbeca2 Merge branch 'master' into 2.2 2021-09-02 14:44:39 +09:30
1eaabd6b25 Merge remote-tracking branch 'origin/master' 2021-09-01 19:31:46 +09:30
4eb8491cfa Fix tests. Fixes #1950 2021-09-01 19:31:37 +09:30
d606553e20 Allow images to be stored in subdirs and used by templates. 2021-08-30 16:53:41 +09:30
b843f94068 Merge pull request #1880 from hrnciar/setuptools
Explicitly require setuptools, utils/get_resource.py imports pkg_resources
2021-08-29 22:06:35 -07:00
f71e7aac9f Merge branch 'master' into setuptools 2021-08-29 22:01:30 -07:00
75bb06563a Fix tests 2021-08-30 13:04:24 +09:30
afdda427d2 Merge branch 'master' into 3.0
# Conflicts:
#	.github/workflows/testing.yml
#	gns3server/compute/builtin/nodes/nat.py
#	gns3server/compute/qemu/__init__.py
#	gns3server/controller/link.py
#	gns3server/utils/asyncio/embed_shell.py
#	gns3server/utils/asyncio/raw_command_server.py
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2021-08-29 19:23:51 +09:30
945e3e3e8e Development on 2.2.25dev1 2021-08-25 21:23:19 +09:30
59a89c5f88 Release v2.2.24 2021-08-25 20:31:25 +09:30
78c2ded2aa Merge branch 'master' into 2.2 2021-08-25 20:08:26 +09:30
6ba40bd5fb Release web UI 2.2.24 2021-08-25 11:57:52 +02:00
6005e89181 Fix issue when searching for image with relative path. Fixes #1925 2021-08-25 17:23:21 +09:30
27bcb60580 Sync appliance files. 2021-08-24 21:21:18 +09:30
93711fe060 Update dependencies 2021-08-24 21:12:27 +09:30
363fdb7d10 Fix wrong error when NAT interface is not allowed. Fixes #1943 2021-08-24 20:40:06 +09:30
92150fba71 Fix incorrect Qemu binary selected when importing template. Fixes https://github.com/GNS3/gns3-gui/issues/3216 2021-08-24 17:26:06 +09:30
c4c71cc838 Fix error when updating a link style. Fixes https://github.com/GNS3/gns3-gui/issues/2461 2021-08-24 11:35:33 +09:30
332fa47b50 Option to prune images when deleting template. 2021-08-23 10:27:10 +09:30
bf9a3aee20 Associate images when creating or updating a template. 2021-08-22 15:16:02 +09:30
4d9e4e1059 Add prune images endpoint.
Use many-to-many relationship between images and templates.
2021-08-20 15:58:41 +09:30
8f30b466e0 Merge remote-tracking branch 'origin/3.0' into 3.0 2021-08-19 14:48:29 +09:30
07d4892faf Check if user has the right to add a permission 2021-08-19 14:47:48 +09:30
1a5fb1abcc Only use the necessary HTTP methods for default permissions 2021-08-17 23:47:32 +09:30
4c6135fe88 Add /permissions/prune to delete orphaned permissions 2021-08-17 21:55:59 +09:30
9df586d5d5 Check a permission matches an existing route before it is allowed to be created. 2021-08-17 16:14:15 +09:30
8aada49414 Some fixes for early support for Python3.10
The loop parameter has been removed from most of asyncio‘s high-level API following deprecation in Python 3.8.
2021-08-15 15:25:33 +09:30
496170b4e5 Early support for Python3.10 Fixes #1940 2021-08-15 15:09:48 +09:30
183033dad8 Upgrade unicorn dependency to version 0.15.0 2021-08-15 14:54:35 +09:30
75c934f30a Bump version to 3.0.0dev3 2021-08-12 16:05:19 +09:30
cfaafedb09 Merge branch '3.0' into busybox-docker 2021-08-11 18:36:30 +09:30
d0a9425392 Remove busybox and copy system busybox in setup.py 2021-08-11 17:27:47 +09:30
078c42f185 Save image size + start to automatic template creation based on image checksum. 2021-08-11 16:58:23 +09:30
a970d4c4d8 Upgrade dependencies 2021-08-10 23:08:14 +09:30
f13b4e89b7 Merge branch '3.0' into image-management-refactoring 2021-08-10 05:46:22 -07:00
ce55ec73a4 Fix exception with endpoints returning HTTP status code 204. Fixes #1891 2021-08-10 21:53:21 +09:30
36b9f8bdfd Fix tests 2021-08-10 15:58:13 +09:30
3ae7783360 Fix "-machine accel=tcg" check 2021-08-10 15:41:05 +09:30
c5c95979c2 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/compute/qemu/utils/qcow2.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/server_handler.py
#	gns3server/version.py
2021-08-10 15:38:49 +09:30
731152c75a Merge pull request #1938 from GNS3/dependabot/pip/pywin32-301
Bump pywin32 from 300 to 301
2021-08-09 17:59:35 -07:00
2897325f36 Bump pywin32 from 300 to 301
Bumps [pywin32](https://github.com/mhammond/pywin32) from 300 to 301.
- [Release notes](https://github.com/mhammond/pywin32/releases)
- [Changelog](https://github.com/mhammond/pywin32/blob/master/CHANGES.txt)
- [Commits](https://github.com/mhammond/pywin32/commits)

---
updated-dependencies:
- dependency-name: pywin32
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 20:45:46 +00:00
6dd0f4d4d3 Allow logged in user to change some of its data. Administrators can lock users using the is_active field. 2021-08-09 16:36:18 +09:30
8c0899d086 Development on 2.2.24dev1 2021-08-05 21:16:10 +09:30
d5c73f4ba4 Release v2.2.23 2021-08-05 15:58:54 +09:30
77487e4fc3 Merge branch 'master' into 2.2 2021-08-05 15:54:16 +09:30
754f55b01b Sync appliance files. 2021-08-05 15:53:12 +09:30
b68f7a78a7 Merge pull request #1927 from candlerb/candlerb/1921
Support cloning of encrypted qcow2 base image files
2021-08-04 23:19:23 -07:00
6c36beb97f Release web UI 2.2.23 2021-08-04 10:59:50 +02:00
c231ae77e5 Merge pull request #1935 from rarylson/detect-kms-support
Update `remote-install.sh` with flag for KMS support and fix hostname inconsistencies
2021-08-01 15:28:42 -07:00
e5a76fcf44 Fix hostname inconsistencies during script execution
When `--with-iou` and `--with-openvpn` are both enabled, hostname
were updated in `/etc/hostname` but not on the running system (only
changed after reboot). So the old hostname were used in MOTD and
client OpenVPN config URL.
2021-08-01 17:49:27 -03:00
d926a713b9 Add option --without-kvm
Some cloud providers (example, AWS EC2 for non-metal instances) do not
support nested virtualization, as well as some hypervisors (example,
VirtualBox prior to 6.x, Hyper-V on AMD). Option `--without-kvm` can
be used to disable hardware acceleration in these scenarios. Otherwise,
user will receive error when trying to start Qemu-based devices.

Commit also: replace `enable_kvm` and `require_kvm` with newer config
options (`enable_hardware_acceleration` and
`require_hardware_acceleration`); and do some code refactors.

One can argue that, instead of prividing option `--without-kvm`, we
should check if system supports KVM and enable/disable hardware
acceleration accordingly. However, there is the case when the
hypervisor supports nested virtualization, but feature is just disabled.
The chosen approach for this case is to keep KVM enabled and let user
known (user will eventually receive an error) so user can fix it.
Otherwise, user might never know and suffer from performance
degradation.
2021-08-01 17:47:28 -03:00
1a24ebfc19 Add a reload server endpoint. Fixes #1926 2021-08-01 16:20:30 +09:30
6cf268ca93 Merge pull request #1934 from GNS3/handle_no-kvm_deprecated
Handle -no-kvm param deprecated in Qemu >= v5.2
2021-07-27 17:37:41 +09:30
214bef9d06 Merge pull request #1932 from GNS3/mac-address-generation
Change how to generate random MAC addresses
2021-07-27 16:51:29 +09:30
4646ce684f Handle -no-kvm param deprecated in Qemu >= v5.2 2021-07-27 16:34:51 +09:30
d2534d6fa0 Merge pull request #1933 from akrpic77/ak-fix-binary-websocket
Fix binary websocket access to the console
2021-07-26 20:42:54 +09:30
3b7dc21ef0 Fix binary websocket access to the console
telnet_writer.write is not an async method - drain() is.
Remove async keyword so the call is the same as for the text websocket.
2021-07-26 12:58:35 +02:00
0ecea8ffbb Change how to generate random MAC addresses 2021-07-25 16:03:54 +09:30
6741d6d7a9 Merge pull request #1930 from mm1ke/fix_tests-gwaqIATV
setup.py: prevent installing tests directory
2021-07-13 08:20:13 +08:00
feace0c7dc setup.py: prevent installing tests directory 2021-07-12 19:04:30 +02:00
1ee3e14bd3 Support cloning of encrypted qcow2 base image files
Fixes #1921
2021-07-09 10:53:02 +01:00
1f0ceb6f74 Symbols endpoints (except upload) don't require authentication. 2021-06-16 20:22:49 +09:30
c13f5c6627 Update to the udhcpc wrapper script. Ref #1890 2021-06-14 19:28:40 +09:30
cdedd53339 Fix VMware VM support on Linux and Windows. Fixes #1919 2021-06-14 13:16:11 +09:30
91a6384a59 Upgrade dependencies. Fixes #1917 2021-06-12 15:30:26 +09:30
229a04e2fa Fix link style merge 2021-06-12 15:26:35 +09:30
e78b5fa6d6 Fix typo 2021-06-12 15:20:55 +09:30
6ec028ea4e Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/builtin/nodes/cloud.py
#	gns3server/compute/vmware/vmware_vm.py
#	gns3server/controller/link.py
#	gns3server/controller/snapshot.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/iou_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/link_handler.py
#	gns3server/schemas/link.py
#	gns3server/utils/path.py
#	gns3server/version.py
#	requirements.txt
2021-06-12 14:36:32 +09:30
3524e22761 Development on 2.2.23dev1 2021-06-10 16:20:09 +09:30
10daab21a3 Release v2.2.22 2021-06-10 15:41:58 +09:30
22eb6f7d8c Sync appliance files. 2021-06-10 12:42:43 +09:30
d556c08def Revert "Skip test"
This reverts commit 8acb2fe3
2021-06-08 12:27:20 +09:30
8acb2fe37e Skip test 2021-06-08 12:18:27 +09:30
94acf60aef Merge pull request #1913 from GNS3/vmware-bigsur
Fix VMware VM support on macOS BigSur
2021-06-07 19:38:19 -07:00
c892cf371b Fix VMware support on macOS BigSur 2021-06-08 11:56:33 +09:30
bfd30f3547 Sync appliance files. 2021-06-07 15:01:45 +09:30
095a022033 Fix tests. Ref https://github.com/GNS3/gns3-gui/issues/2461 2021-06-07 14:23:52 +09:30
4e34ab8e4f Link style support. Fixes https://github.com/GNS3/gns3-gui/issues/2461 2021-06-07 14:08:21 +09:30
8825831106 Upgrade dependencies 2021-06-07 13:46:06 +09:30
5da5cbd6d8 Merge branch 'master' into 2.2 2021-06-07 13:34:25 +09:30
515bd50261 Start refactoring for images management 2021-06-06 16:52:47 +09:30
08f540f417 Release web UI 2.2.22 2021-06-05 10:32:12 +02:00
1db1a892b4 Merge pull request #1910 from fabaff/patch-1
Set py-cpuinfo to 8.0.0
2021-06-04 04:49:26 -07:00
7ff72879dd Set py-cpuinfo to 8.0.0 2021-06-04 13:36:21 +02:00
48d0c6b183 Merge pull request #1905 from candlerb/candlerb/1904
Preserve auto_start/auto_open/auto_close when restoring snapshot
2021-06-04 02:06:38 -07:00
f64b5cd9b6 Allow controller to be reloaded using the API. Fixes #1743 2021-06-04 17:01:07 +09:30
6a726d0344 Fix formatting issue. 2021-06-03 19:32:00 +09:30
dc914eb0f9 Fix tests. 2021-06-03 19:11:11 +09:30
9b0e3a77ed Use a stock BusyBox for the Docker Integration 2021-06-03 18:38:08 +09:30
8be015cd86 Move "/{project_id}/templates/{template_id}" endpoint. 2021-06-03 18:18:34 +09:30
6fb6a27859 Add last login info for users. 2021-06-03 16:57:16 +09:30
4e33d29af8 Change RBAC field names from builtin to is_builtin 2021-06-03 16:24:38 +09:30
4dd3bc6a98 Merge pull request #1906 from GNS3/rbac
RBAC support
2021-06-02 23:16:07 -07:00
d65b49acaa Add user permissions + RBAC tests. 2021-06-03 15:40:12 +09:30
36a27c0c19 Force refresh of updated_at value for RBAC db models. 2021-06-01 16:12:06 +09:30
a6d2f48df1 Merge remote-tracking branch 'origin/3.0' into rbac 2021-06-01 16:11:22 +09:30
0113ca6673 Force refresh of updated_at value in db models. 2021-06-01 16:09:29 +09:30
74d820fd0a Use synchronize_session="fetch" when updating values. 2021-06-01 15:55:50 +09:30
e9b9884ee3 Merge remote-tracking branch 'origin/3.0' into rbac 2021-06-01 15:50:14 +09:30
a6c2a3e47f Use synchronize_session="fetch" when updating values. 2021-06-01 13:02:03 +09:30
91b0534182 Upgrade dependencies 2021-06-01 12:56:51 +09:30
2e2e31337a Add description for user permission. 2021-06-01 12:55:16 +09:30
fbc47598d9 Basic functional RBAC support. 2021-05-27 17:28:44 +09:30
6d4da98b8e Base API and tables for RBAC support. 2021-05-25 18:34:59 +09:30
c051367d4b Preserve auto_start/auto_open/auto_close when restoring snapshot
Fixes #1904
2021-05-24 17:31:04 +01:00
eb0f8c6174 Save/restore appliances Etag. 2021-05-17 00:37:15 +09:30
f416d64042 Allow to set the initial super admin username / password in server config file. Ref #1857 2021-05-16 20:01:05 +09:30
fffbb08a8e Catch SQLAlchemyError exception. 2021-05-16 18:37:17 +09:30
150526b1ff Update setup.py
Fixes #1897
2021-05-16 17:44:13 +09:30
d759564e20 Require authentication for get_user_memberships endpoint. 2021-05-16 17:06:23 +09:30
971e86d254 Fix uBridge errors for cloud nodes not visible in logs. Fixes #1895 2021-05-16 14:59:02 +09:30
6847e19847 Change method to prevent forbidden directory traversal. Fixes #1894 2021-05-16 14:44:38 +09:30
2bf16f1e5f Change method to prevent forbidden directory traversal. Ref #1894 2021-05-16 14:29:56 +09:30
f3d81fa450 Clean files and catch file path escape. Ref #1894 2021-05-15 22:35:44 +09:30
09ac7fd7fb Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_manager.py
#	gns3server/handlers/api/compute/dynamips_vm_handler.py
#	gns3server/handlers/api/compute/iou_handler.py
#	gns3server/handlers/api/compute/project_handler.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/node_handler.py
#	gns3server/handlers/api/controller/project_handler.py
#	gns3server/handlers/index_handler.py
#	tests/handlers/api/compute/test_project.py
#	tests/handlers/api/compute/test_qemu.py
#	tests/handlers/api/controller/test_node.py
#	tests/handlers/api/controller/test_project.py
2021-05-15 20:46:34 +09:30
3a479d7ea6 Merge pull request #1900 from GNS3/prevent-directory-traversal
Prevent directory traversal
2021-05-15 04:09:04 -07:00
e86d8f96ca Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2021-05-15 20:12:21 +09:30
9a6978902d Fix tests. 2021-05-15 19:43:36 +09:30
6294ad9e76 Prevent directory traversal 2021-05-15 17:35:32 +09:30
8810249d36 Add user groups support. 2021-05-15 15:10:02 +09:30
2c938b2c19 Development on 2.2.22dev1 2021-05-10 23:44:40 +09:30
03b7d9191b Release v2.2.21 2021-05-10 22:42:46 +09:30
87c87ca3cb Sync appliance files. 2021-05-10 22:39:03 +09:30
dfba40fee2 Merge branch 'master' into 2.2 2021-05-10 22:34:59 +09:30
956b9056c1 Fix issues with latest version of sqlalchemy 2021-05-08 15:37:51 +09:30
4727708c85 Upgrade dependencies 2021-05-08 14:32:26 +09:30
0a77f0035b Add delete cascade on foreign keys for appliance table 2021-05-06 17:25:32 +09:30
10164e262d Enable SQL foreign key support for SQLite 2021-05-06 17:21:45 +09:30
a1f3f6472a Upgrade dependencies 2021-05-06 16:56:07 +09:30
912fb2ed29 Fix add node from template. Fixes https://github.com/GNS3/gns3-web-ui/issues/1122 2021-05-06 16:22:16 +09:30
60701b63ac Update README to use python virtual env 2021-05-06 15:56:26 +09:30
f576bedfaf Release web UI 2.2.21 2021-04-30 14:01:53 +02:00
a795e0d7c1 Add missing CORS origins. 2021-04-28 21:20:05 +09:30
d8968cbee8 Merge remote-tracking branch 'origin/3.0' into 3.0 2021-04-28 15:57:39 +09:30
ad7d8e2e7d Fix tests. 2021-04-28 15:56:11 +09:30
41ba215e32 Show topology path when check topology schema fails. 2021-04-27 22:48:55 -07:00
b1b3338e3c Fix bug when binding on address already in use. 2021-04-28 15:13:31 +09:30
edb20482c7 Fix bug when no server config file is present. 2021-04-28 14:44:34 +09:30
7b3351bba6 Upgrade dependencies. 2021-04-28 14:43:52 +09:30
d3ace8ff17 Fix user delete endpoint. 2021-04-26 16:21:16 +09:30
49be4146d6 Protect controlle notification endpoints. Ref #1888
(WebSocket endpoint is not secured, it takes an optional token).
2021-04-26 16:18:18 +09:30
a02aede1b0 Use uuid5 to create new compute_id. Fixes #1641 #1887 2021-04-21 13:47:32 +09:30
dff1ec9bc6 Fix /users/me endpoint. 2021-04-20 19:54:55 +09:30
0465cb87f6 Protect the API and add alternative authentication endpoint. 2021-04-20 11:59:02 +09:30
e28452f09a Secure users API and handle manual password recovery. 2021-04-19 09:40:04 +09:30
c03226e368 Add default super admin account in controller db. 2021-04-18 17:39:47 +09:30
9404c00411 Complete type annotations for API endpoints. 2021-04-18 15:40:38 +09:30
cefab8d362 Rename __json__() to asdict() 2021-04-17 23:34:28 +09:30
44074ff7c9 Some cleaning. 2021-04-17 18:36:32 +09:30
bad3ef7003 Detect the app is exiting and avoid reconnecting to computes. 2021-04-17 18:33:20 +09:30
6b8ce8219c Fix tests. 2021-04-15 18:30:22 +09:30
9c850e0f2b Move schemas between compute and controller subpackages 2021-04-15 18:12:08 +09:30
c59fc375f2 Remove traceng code. 2021-04-13 19:03:23 +09:30
fbd5e12e7b Update GitHub Actions badge 2021-04-13 18:53:39 +09:30
c021e21309 Use black with -l 120 param. 2021-04-13 18:46:50 +09:30
f928738bd5 Use pyupgrade with --py36-plus param. 2021-04-13 18:37:58 +09:30
a9eb035b7d Move error responses to API routers. 2021-04-13 16:19:56 +09:30
6b0d0de1bc Wait for local compute to be started.
Don't reconnect to local compute when server is being stopped.
2021-04-13 15:41:59 +09:30
71725aade6 Rename ssl and auth configuration file settings.
Add enable SSL config validator.
Strict configuration file validation: any error will prevent the server to start.
Core server logic moved to a Server class.
2021-04-12 23:26:42 +09:30
1b5a5de4bc Generate new config for each test. Fixes tests. 2021-04-12 19:37:59 +09:30
30ebae207f Use Pydantic to validate the server config file. 2021-04-12 17:02:23 +09:30
478119b40d Comment out problematic test 2021-04-10 13:13:28 +09:30
fa4c9a91ca Add symbol dimensions endpoint and SSL support for packet capture with remote HTTPS server. 2021-04-10 13:01:23 +09:30
802959f9ab Merge branch 'master' into 3.0
# Conflicts:
#	dev-requirements.txt
#	gns3server/controller/__init__.py
#	gns3server/controller/appliance_manager.py
#	gns3server/controller/compute.py
#	gns3server/controller/topology.py
#	gns3server/handlers/api/compute/ethernet_switch_handler.py
#	gns3server/handlers/api/controller/link_handler.py
#	gns3server/handlers/api/controller/symbol_handler.py
#	gns3server/version.py
#	requirements.txt
#	tests/controller/test_export_project.py
#	tests/handlers/api/compute/test_qemu.py
#	tests/web/test_response.py
#	win-requirements.txt
2021-04-10 12:46:40 +09:30
4e61cc811e Improvements for get symbol dimensions endpoint. Ref #1885 2021-04-10 12:28:50 +09:30
c9c6a5a762 Merge pull request #1885 from GNS3/Create-endpoint-in-symbols-handler-to-get-symbol-dimensions
Create endpoint in symbols handler to get symbol dimensions #1884
2021-04-09 04:59:57 -07:00
e797ad1b9f Development on 2.2.21dev1 2021-04-09 13:50:20 +09:30
a50141fcbf Release v2.2.20 2021-04-09 12:14:38 +09:30
852151f836 Merge branch 'master' into 2.2 2021-04-09 12:06:01 +09:30
e5807e5a8c Sync appliance files. 2021-04-09 12:04:20 +09:30
87a26d5da0 Fix tests and comment problematic ones that rely on AsyncioMagicMock 2021-04-09 11:57:29 +09:30
30cbfe2154 Update picture.py 2021-04-08 23:29:46 +02:00
4bbf7c2ed2 Update symbol_handler.py 2021-04-08 21:27:05 +02:00
7a8c1e8f5d Release web UI 2.2.20 2021-04-08 13:30:59 +02:00
7bb5202bdb Sync appliance files. 2021-04-07 20:58:55 +09:30
082206a7db Fix packet capture with HTTPS remote server. Fixes #1882 2021-04-07 12:40:15 +09:30
360a819e91 Set PyQt5 version to 5.15.2 on Windows 2021-04-06 22:12:34 +09:30
adbef787c3 Fix typo 2021-04-06 18:21:59 +09:30
685963b85d Sync appliance files and remove old ones after sync with online repo. Fixes #1876 2021-04-06 17:38:11 +09:30
31a1fdba68 Update setup.py for Python 3.9 2021-04-06 15:56:46 +09:30
e614ed79f4 Upgrade dependencies 2021-04-06 13:57:00 +09:30
170e83e589 Fix tests and update requirements 2021-04-05 17:43:35 +09:30
5217dbf3a3 Fix tests 2021-04-05 14:39:50 +09:30
566e326b57 Save computes to database 2021-04-05 14:21:41 +09:30
e607793e74 Generate a new list in template schema defaults. 2021-04-02 17:45:16 +10:30
3b30d51972 Sync appliance files. 2021-04-02 17:43:38 +10:30
c1784b7684 Workaround to run tests with Python 3.6 2021-04-01 08:49:32 +10:30
bb47cc87e7 Explicitly require setuptools, utils/get_resource.py imports pkg_resources 2021-03-31 11:58:49 +02:00
b8e81ad9bc Upgrade dependencies 2021-03-31 16:01:11 +10:30
91920e5a5b Fix issue with tests + some cleaning. 2021-03-31 09:58:52 +10:30
fd844c309e Revert "Install contextvars for python_version < "3.7""
This reverts commit f9127e19
2021-03-28 21:33:16 +10:30
f9127e199e Install contextvars for python_version < "3.7" 2021-03-28 21:25:13 +10:30
0fea3f969e Use aiosqlite and add service for templates 2021-03-28 21:17:29 +10:30
d730c591b3 Refactor template management to use database. 2021-03-28 11:15:08 +10:30
b417bc4dec Revert "Upgrade to sqlalchemy version 1.4.2"
This reverts commit 9defc3c4

Ref https://github.com/talkpython/web-applications-with-fastapi-course/issues/4
2021-03-24 14:55:00 +10:30
9defc3c4e8 Upgrade to sqlalchemy version 1.4.2 2021-03-24 14:42:30 +10:30
6120736c91 Fix export for missing files 2021-03-24 13:16:00 +10:30
7542b28793 Revert "Fix tests"
This reverts commit 4d0cb32b
2021-03-24 13:05:50 +10:30
4d0cb32bd0 Fix tests 2021-03-24 12:39:22 +10:30
055a78bade Fix issue when trying to export temporary Dynamips files. 2021-03-24 12:06:10 +10:30
fad52ea2fc Development on 2.2.20dev1 2021-03-05 16:48:09 +10:30
d8054c7cb4 Release v2.2.19 2021-03-05 14:51:03 +10:30
91570f475f Launch projects marked for auto open after SIGHUP is received 2021-03-05 14:47:20 +10:30
42cda3af2b Sync appliance files. 2021-03-05 14:46:20 +10:30
e6be6bc958 Merge branch 'master' into 2.2 2021-03-02 17:18:24 +10:30
b7f8fb283b Sync appliance files. 2021-03-02 17:09:28 +10:30
72d5b5e7cc Release web UI 2.2.19 2021-03-02 00:31:54 +01:00
8cce0eedee Fix console type error when creating Ethernet switch node. Fixes #1873 2021-03-01 13:55:52 +10:30
11c53c128e Sync Juniper vSRX appliance file. 2021-02-24 14:28:12 +10:30
17b56ac7cb Sync appliance files. 2021-02-24 14:08:13 +10:30
62b1fa8dc4 Upgrae to uvicorn 0.13.3. Fixes #1840 2021-02-18 18:32:53 +10:30
c17a86e814 Add missing async 2021-02-18 18:14:35 +10:30
aca7344212 Upgrade Jinja to version 2.11.3. Fixes #1865 2021-02-17 17:23:04 +10:30
1add223891 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/controller/server_handler.py
#	gns3server/schemas/project.py
#	gns3server/schemas/qemu.py
#	gns3server/schemas/qemu_template.py
#	gns3server/version.py
#	tests/handlers/api/compute/test_qemu.py
2021-02-16 21:11:40 +10:30
3c5bbe04dc Development on 2.2.19dev1 2021-02-16 20:44:58 +10:30
c213cae500 Release v2.2.18 2021-02-16 19:09:46 +10:30
1043be02a6 Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
2021-02-16 19:02:12 +10:30
56c25727b6 SIGHUP: remove projects with an empty project directory. 2021-02-16 17:00:59 +10:30
0b854ffceb Bump version to 2.2.18dev2 2021-02-16 16:35:26 +10:30
366e904698 Release web UI 2.2.18 2021-02-15 23:55:14 +01:00
16c84e23a9 Catch OSError exception in psutil. Fixes https://github.com/GNS3/gns3-gui/issues/3127 2021-02-15 15:57:24 +10:30
64f172fe20 Expose 'auto_open' and 'auto_start' properties in API when creating project. Fixes https://github.com/GNS3/gns3-gui/issues/3119 2021-02-15 15:16:19 +10:30
bb0206d7d2 Add mtools package information. Ref https://github.com/GNS3/gns3-gui/issues/3076 2021-02-14 14:55:37 +10:30
9de61cd671 Fix warning: 'ide-drive' is deprecated when using recent version of Qemu. Fixes https://github.com/GNS3/gns3-gui/issues/3101 2021-02-14 14:39:02 +10:30
9e6ccc3f61 Fix bug when starting of vpcs stopped with "quit". Fixes https://github.com/GNS3/gns3-gui/issues/3110 2021-02-14 13:50:10 +10:30
4c339eade1 Fix WinError 0 handling 2021-01-27 21:47:14 +10:30
128e494134 Stop uBridge if VPCS node has been terminated. Ref https://github.com/GNS3/gns3-gui/issues/3110 2021-01-27 21:03:19 +10:30
0e6b97b27b Merge pull request #1856 from BrentBaccala/master
Allow cloned QEMU disk images to be resized before the node starts
2021-01-10 16:57:10 +10:00
235a127111 Allow cloned QEMU disk images to be resized before the node starts,
by cloning the disk image in response to a resize request instead
of waiting until the node starts.
2020-12-30 15:36:38 -05:00
bb51146e80 Merge pull request #1852 from joyme123/update-python-version
fix(readme): update python version from 3.5.3 to 3.6
2020-12-23 14:39:08 +10:30
e6944276a6 fix(readme): update python version from 3.5.3 to 3.6 2020-12-23 11:33:20 +08:00
58c1b01439 Add default JWT secret key and fix tests. 2020-12-18 16:51:54 +10:30
bde706d19a Generate JWT secret key if none is configured in the config file.
Change location of the database.
2020-12-16 18:24:21 +10:30
704858fd8d Merge pull request #1847 from b-ehlers/QemuConfig
Add Qemu config disk
2020-12-14 14:22:25 +10:30
509e762cda Fix slow tests. 2020-12-07 18:53:40 +10:30
6aefb5d32b Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/base_node.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2020-12-07 18:00:33 +10:30
62d9ecf2aa Do not build on Windows and add missing packages for Python 3.6 2020-12-07 17:03:34 +10:30
d47dcb0d6f User authentication with tests. 2020-12-07 16:52:36 +10:30
87ede50827 Development on 2.2.18dev1 2020-12-04 18:10:11 +10:30
24fe67f82b Release v2.2.17 2020-12-04 16:26:56 +10:30
18c878429f Merge branch 'master' into 2.2 2020-12-04 16:22:04 +10:30
6c3a070733 Close and remove projects deleted from disks after SIGHUP signal is received. 2020-12-04 16:17:28 +10:30
a157ef5a8a Release web UI 2.2.17 2020-12-04 02:59:13 +01:00
5244ae6d4c New config file options to configure the VNC console port range. 2020-12-03 18:04:42 +10:30
bf7cf862af Refactor tests and start work on database integration. 2020-12-02 18:39:08 +10:30
ae55c0ec9c Fix tests. 2020-11-19 15:27:33 +10:30
c043830e3f Move endpoints to routes & preparations to use a database. 2020-11-19 15:21:03 +10:30
db47615d43 Merge pull request #1843 from tirkarthi/fix-asyncio-all-tasks-2.2
Use asyncio.all_tasks instead of deprecated method for Python 3.9 compatibility
2020-11-17 20:05:13 +10:30
603683e2c5 Use asyncio.all_tasks instead of deprecated method for Python 3.9 compatibility. 2020-11-17 06:30:47 +00:00
d58407c735 Fix tests. 2020-11-13 15:32:25 +10:30
95ea1fa636 Providing the path to create a project is now deprecated. 2020-11-13 15:17:54 +10:30
7837081eba Fix running tests with Python 3.9 2020-11-11 17:38:06 +10:30
acc5c7ebfa Update package versions.
Do not use Path in schemas (causes issues with empty paths).
Change how notifications are handled.
Run tests with Python 3.9
2020-11-11 17:18:41 +10:30
bf19da1dc2 Upgrade packages to latest versions 2020-11-08 21:35:54 +10:30
e45bc5aec1 Fix mcopy error messages 2020-11-05 15:00:44 +01:00
e13c84bada Fix tests 2020-11-05 18:47:59 +10:30
841b013223 SSL support. 2020-11-05 18:24:50 +10:30
a5d89b428a Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/compute.py
#	gns3server/schemas/gns3vm.py
#	gns3server/utils/application_id.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2020-11-05 17:15:25 +10:30
a3ee1d9ee6 Development on 2.2.17dev1 2020-11-05 16:59:58 +10:30
0e95e7e023 Release v2.2.16 2020-11-05 15:38:19 +10:30
1748250179 Sync appliance files. 2020-11-05 15:30:21 +10:30
c8ea22c651 Merge branch 'master' into 2.2 2020-11-05 15:05:05 +10:30
d16cb5ef89 Option to allocate or not the vCPUs and RAM settings for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/3069 2020-11-05 11:13:57 +10:30
004acdc271 Release web UI 2.2.16 2020-11-04 12:51:25 +01:00
e182f53d69 Fix wrong defaults for images_path, configs_path, appliances_path. Fixes #1829 2020-11-04 12:30:23 +10:30
7314b41d8f Fix tests. 2020-11-02 22:45:01 +10:30
aef8f0dff3 Use EnvironmentFile for Systemd service. Ref https://github.com/GNS3/gns3-gui/issues/3048 2020-11-02 18:23:41 +10:30
e2d444928d Add back script to create a self-signed SSL certificate. 2020-11-02 18:09:14 +10:30
5a7b5e4e08 Make sure all HTTP exceptions return JSON with a "message" field instead of "detail" 2020-11-02 18:08:25 +10:30
30d6f1fa2a Make Swagger Ui the default for API documentation 2020-11-02 12:47:59 +10:30
359f9a7384 Move to version 3 of the REST API.
Rename packet capture endpoints.
2020-11-02 12:05:32 +10:30
eeaf10b418 Put all schemas in the same module. 2020-10-31 16:02:21 +10:30
81439c750a Use pydantic for data validation (instead of jsonschema)
Fix/improve various pydantic shema models.
2020-10-31 15:07:12 +10:30
b6a021dabd Fix SSL support for controller and local compute. Fixes #1826 2020-10-27 23:25:19 +10:30
5dab0c2587 Prevent WIC to be added/removed while Dynamips router is running. Fixes https://github.com/GNS3/gns3-gui/issues/3082 2020-10-27 20:08:01 +10:30
5d1fdceb98 Fix bug with application id allocation for IOU nodes. Fixes #3079 2020-10-27 19:41:24 +10:30
d6a65883ee Merge branch 'master' into 3.0 2020-10-24 17:08:19 +10:30
5743d47327 Set ident for merge. 2020-10-24 17:04:42 +10:30
ca69b01d11 Use origin/3.0 for merge into gh-pages branch. 2020-10-24 17:02:44 +10:30
b2fb2442c8 Change tag for index routes. 2020-10-24 17:00:43 +10:30
dd785b61cf Work directly on gh-pages branch to generate the API documentation. 2020-10-24 16:59:55 +10:30
f3a7eba796 Merge branch 'master' into 3.0 2020-10-24 16:49:28 +10:30
0f154e5f29 Fix invalid syntax for git merge 2020-10-24 16:45:53 +10:30
b2d81609be Publish API documentation 2020-10-24 16:32:09 +10:30
ee6c70e243 Publish API documentation 2020-10-24 16:16:29 +10:30
f9c4c82da6 Fix merge issues on gh-pages branch, second try. 2020-10-24 16:12:17 +10:30
3a136a46a1 Fix merge issues on gh-pages branch 2020-10-24 16:07:48 +10:30
34f05e92d5 Merge branch 'master' into 3.0 2020-10-24 15:53:44 +10:30
a6a35e7c43 Fix publish_api_documentation.yml 2020-10-24 15:42:44 +10:30
d316ee33df Capitalize openapi tags. 2020-10-24 15:35:53 +10:30
ec61faa035 Merge branch 'master' into 3.0
# Conflicts:
#	.github/workflows/publish_api_documentation.yml
2020-10-24 15:25:55 +10:30
163a867f00 Only automatically build API documentation for 3.0 branch and v3.* tags 2020-10-24 15:24:32 +10:30
d2b7c9bcbf Do not build API documentation on schedule. 2020-10-24 13:38:32 +10:30
fb8df1cc6b Fetch all history for all tags and branches in publish_api_documentation.yml 2020-10-24 13:13:19 +10:30
d063b3e39d Manual trigger API documentation publishing using workflow_dispatch 2020-10-24 13:08:10 +10:30
e6bf17185e Manual trigger API documentation publishing using workflow_dispatch 2020-10-24 12:52:32 +10:30
83fbd1f627 Fix GitHub Actions error: A branch or tag with the name '3' could not be found. 2020-10-24 12:16:05 +10:30
1aa6fe8535 Add publish_api_documentation.yml to master branch for scheduled event to work. 2020-10-23 23:03:50 +10:30
5bb6ba73f2 Fix syntax error in publish_api_documentation.yml 2020-10-23 23:01:03 +10:30
e568de0aa9 actions/checkout@v2 to checkout 3.0 branch. 2020-10-23 22:57:09 +10:30
3f57f5285d Publish API documentation on gh-pages branch 2020-10-23 22:48:50 +10:30
b23422e782 Fix publish_api_documentation.yml 2020-10-23 22:29:59 +10:30
b7ade95c24 Merge remote-tracking branch 'origin/3.0' into 3.0 2020-10-23 21:03:35 +10:30
e39493f8bd Only publish documentation once a day or on tags. 2020-10-23 21:03:28 +10:30
7d72b5e8b9 Publish API documentation 2020-10-23 09:13:49 +00:00
98467181de Merge remote-tracking branch 'origin/3.0' into 3.0 2020-10-23 19:42:44 +10:30
80d14a98fb Some cleaning in compute.py 2020-10-23 19:42:21 +10:30
3a55337d3f Publish API documentation 2020-10-23 08:52:41 +00:00
b04f9cb6ea Add git add to publish_api_documentation.yml 2020-10-23 19:21:50 +10:30
da2d4de89f Fix call to publish_api_documentation.py 2020-10-23 19:17:31 +10:30
80ca9100b9 Use Python 3.6 to generate the API documentation 2020-10-23 19:14:14 +10:30
4cf054061d Remove tests_require from setup.py 2020-10-23 19:10:33 +10:30
791d8ac366 Install the GNS3 server in publish_api_documentation.yml 2020-10-23 19:07:30 +10:30
10542aef91 Merge remote-tracking branch 'origin/3.0' into 3.0 2020-10-23 19:03:47 +10:30
2793f6f9d8 Automate API documentation publishing. 2020-10-23 19:03:19 +10:30
407f6efa78 Create CNAME 2020-10-23 18:49:37 +10:30
3185ebaa3d Publish API documentation generated by FastAPI. 2020-10-23 18:01:58 +10:30
087bbd1a0b Fix tests. 2020-10-22 20:37:34 +10:30
a08ddce033 Revert compute.py 2020-10-22 20:05:37 +10:30
97a91f1899 Overwrite uvicorn loggers. 2020-10-22 19:56:53 +10:30
13da8aa8f5 Do not automatically connect to local compute. 2020-10-22 16:47:11 +10:30
a92c47b310 Add HTTP client to reuse the aiohttp session where needed.
Remove unnecessary aiohttp exceptions.
2020-10-22 16:19:44 +10:30
36c8920cd1 Warn not to use the private compute API. Fixes #1593. 2020-10-20 16:27:00 +10:30
f895b66fca Run tests on Ubuntu only for now. 2020-10-20 11:57:32 +10:30
f4210108ce Do not run tests on macOS for now. 2020-10-20 11:10:42 +10:30
c0cab1c3ca Install Windows dependencies to run tests 2020-10-20 11:05:12 +10:30
8b415b0b3c Fix testing on Windows. 2020-10-20 10:55:32 +10:30
a9a5d4e665 Fix syntax error in testing.yml 2020-10-20 10:52:26 +10:30
554404e6e7 Try to run tests for Windows and macOS. 2020-10-20 10:50:46 +10:30
0500b28aea Fix changing to ProactorEventLoop in tests. 2020-10-20 00:57:06 +10:30
bd4bf53084 Use ProactorEventLoop with pytest-asyncio 2020-10-20 00:46:46 +10:30
25494ca098 Fix project import to work with FastAPI. 2020-10-19 22:39:30 +10:30
5653a8afb6 Need another job to run tests on macOS and Windows. 2020-10-19 19:27:57 +10:30
596ee9b66d Test compute notifications and run tests on macOS and Windows. 2020-10-19 19:25:32 +10:30
6af8c8933e Fix tests. 2020-10-19 18:47:25 +10:30
b8e8e5cba7 Fix status code 204 must not have a response body. 2020-10-19 18:42:27 +10:30
993e6a80e4 Add missing requests package to run tests. 2020-10-19 18:40:01 +10:30
5d71ee25ee Fix syntax error. 2020-10-19 18:34:27 +10:30
af30361f72 Enable GitHub Actions for 3.0 branch 2020-10-19 18:31:38 +10:30
f20e16074f Fix Docker dev server script. 2020-10-19 18:28:01 +10:30
be6d4771d0 Migrate PCAP streaming code to work with FastAPI. 2020-10-19 15:55:29 +10:30
bd8565b2b9 Refactor WebSocket console code to work with FastAPI.
Fix endpoint routes.
2020-10-19 15:00:41 +10:30
de2b9caeeb Use HDD disk image as startup QEMU config disk 2020-10-19 03:19:22 +02:00
5341ccdbd6 Use dependencies and group common HTTP responses in endpoints. 2020-10-14 10:49:29 +10:30
58c5965905 Fix tests. 2020-10-13 11:46:18 +10:30
46f4e7ef6e Fix update property call for Qemu VMs. 2020-10-12 18:07:00 +10:30
0746949207 Merge branch '2.2' into 3.0
# Conflicts:
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/handlers/api/compute/qemu_handler.py
#	gns3server/handlers/api/controller/symbol_handler.py
#	gns3server/version.py
#	tests/compute/qemu/test_qemu_vm.py
#	tests/endpoints/compute/test_qemu_nodes.py
#	tests/endpoints/controller/test_nodes.py
2020-10-12 18:04:49 +10:30
362701f5aa Allow commas in image paths and VM name for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/3065 2020-10-11 14:02:22 +10:30
91244456f5 Handle comma in disk path for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/3065 2020-10-08 22:09:03 +10:30
88ab528977 Development on 2.2.16dev1 2020-10-07 16:30:03 +10:30
7d031e71a0 Release v2.2.15 2020-10-07 15:29:52 +10:30
c46c095fcb Sync appliance files. 2020-10-07 15:24:15 +10:30
e592b95639 Revert "Add info log to show where custom symbols are searched from."
This reverts commit 593e3795
2020-10-07 15:20:28 +10:30
593e379523 Add info log to show where custom symbols are searched from. 2020-10-07 15:19:09 +10:30
d451d3125e Fix symbol retrieval issue. Ref #1824 2020-10-07 11:48:11 +10:30
e014d36ad2 Skip tests not working on Windows. 2020-10-06 17:40:36 +10:30
c248764efb Fixes update() missing 2 required positional arguments: 'name' and 'value'. Fixes #1821 #1825 2020-10-06 17:08:51 +10:30
0259696872 Fix Hyper-V based GNS3 VM WMI issue. Fixes #1822 2020-10-06 16:42:50 +10:30
165ba4d8d5 Merge branch 'master' into 2.2 2020-10-06 12:30:08 +10:30
8049ab8b64 Release 2020.4.0-beta.1 2020-10-05 15:42:19 +02:00
eb3cb8a41f Migration to FastAPI 2020-10-02 16:07:50 +09:30
2857cab94e Development on 2.2.15dev1 2020-09-15 06:49:11 +09:30
326841cd9e Release v2.2.14 2020-09-15 05:52:47 +09:30
dacc5ef9cd Merge branch 'master' into 2.2 2020-09-15 05:28:00 +09:30
dd1e4f655e Release 2020.3.0-beta.4 2020-09-14 18:35:17 +02:00
bf4550bf78 Fix tests. Ref https://github.com/GNS3/gns3-gui/issues/3047 2020-09-13 23:23:08 +09:30
399f1c082e Add '-smp sockets=1' by default for Qemu VMs. Ref https://github.com/GNS3/gns3-gui/issues/3047 2020-09-13 23:16:52 +09:30
919abdc052 Sync appliance files. 2020-09-12 23:08:38 +09:30
992cd7fc6c Implement full restart if user reload a Qemu VM which has been updated. Fixes https://github.com/GNS3/gns3-gui/issues/3038 2020-09-12 23:07:39 +09:30
90ecefd455 Development on 2.2.14dev1 2020-09-05 04:26:16 +09:30
b4c7823696 Release v2.2.13 2020-09-04 23:13:28 +09:30
ffde704251 Merge branch 'master' into 2.2 2020-09-04 23:10:09 +09:30
8c00cd0a84 Release 2020.3.0-beta.3 2020-09-04 12:54:48 +02:00
2bf625e000 Fix issue when resuming Qemu VM. Fixes https://github.com/GNS3/gns3-gui/issues/3027 2020-09-04 18:02:21 +09:30
5305117a75 Sync appliance files. 2020-09-04 01:59:45 +09:30
4843084158 Prioritize the config disk over HD-D for Qemu VMs.
Fixes https://github.com/GNS3/gns3-gui/issues/3036

(cherry picked from commit c12b675691)
2020-08-18 10:54:11 +09:30
c12b675691 Prioritize the config disk over HD-D for Qemu VMs.
Fixes https://github.com/GNS3/gns3-gui/issues/3036
2020-08-18 10:54:11 +09:30
01db2d2a86 Create config disk property false by default for Qemu templates
Ref https://github.com/GNS3/gns3-gui/issues/3035

(cherry picked from commit a2e884e315)
2020-08-17 12:45:57 +09:30
a2e884e315 Create config disk property false by default for Qemu templates
Ref https://github.com/GNS3/gns3-gui/issues/3035
2020-08-17 12:45:57 +09:30
fa26555d00 Merge pull request #1801 from GNS3/qemu-config-disk
QEMU config disk - enable QEMU config import/export
2020-08-15 16:35:20 +08:00
f2ddef855f Fix tests.
(cherry picked from commit 620d93634e)
2020-08-15 16:35:31 +09:30
620d93634e Fix tests. 2020-08-15 16:35:31 +09:30
ec02150fd2 Set default disk interface type to "none".
Fail-safe: use "ide" if an image is set but no interface type is configured.
Use the HDA disk interface type if none has been configured for HDD.

(cherry picked from commit 464fd804ce)
2020-08-15 16:14:16 +09:30
464fd804ce Set default disk interface type to "none".
Fail-safe: use "ide" if an image is set but no interface type is configured.
Use the HDA disk interface type if none has been configured for HDD.
2020-08-15 16:14:16 +09:30
a56b816c1a Add explicit option to automatically create or not the config disk. Off by default.
(cherry picked from commit 56aba96a5f)
2020-08-14 17:57:24 +09:30
56aba96a5f Add explicit option to automatically create or not the config disk. Off by default. 2020-08-14 17:57:24 +09:30
9d3f7c79a2 Fix more tests
(cherry picked from commit 546982d1ea)
2020-08-13 17:18:45 +09:30
546982d1ea Fix more tests 2020-08-13 17:18:45 +09:30
c684c554bf Fix tests
(cherry picked from commit 2ba6eac113)
2020-08-13 17:10:31 +09:30
2ba6eac113 Fix tests 2020-08-13 17:10:31 +09:30
cad7431069 Bump version to 2.3.0dev2 2020-08-13 01:49:25 +09:30
9890126453 Merge branch '2.2' into 2.3
# Conflicts:
#	gns3server/notification_queue.py
#	gns3server/version.py
2020-08-13 01:48:26 +09:30
94b27590a7 Merge pull request #1804 from GNS3/aux-console-refactoring
Auxiliary console support
2020-08-12 15:58:32 +08:00
97e731a7d9 Development on 2.2.13dev1 2020-08-07 21:12:46 +09:30
2c08166510 Release v2.2.12 2020-08-07 19:27:32 +09:30
940f004752 Sync appliance files 2020-08-07 19:24:01 +09:30
f083649021 Merge branch 'master' into 2.2 2020-08-07 19:03:50 +09:30
aeb82de78a Release 2020.3.0-beta.2 2020-08-07 09:57:52 +02:00
6761ae3445 Catch exception when psutil returns OSError 2020-08-06 13:37:27 +09:30
855a95de49 Fix tests. Fixes #1796 2020-07-30 14:58:22 +09:30
3c1a1eb4ef Fix tests. 2020-07-29 16:32:45 +09:30
7043d48f1a Auxiliary console support for Qemu. Ref #2873
Improvements for auxiliary console support for Docker and Dynamips.
2020-07-29 16:23:51 +09:30
d022259561 Downgrade psutil to version 5.6.7 2020-07-28 21:03:41 +09:30
380e7a8a7f Downgrade psutil to version 5.6.7 2020-07-28 21:03:24 +09:30
65c8bb6754 Fix AUX console not allocated for Dynamips IOS routers. 2020-07-27 18:42:36 +09:30
12732aaf83 Disallow to rename a running node. Fixes https://github.com/GNS3/gns3-gui/issues/2499 2020-07-27 15:06:17 +09:30
831ee5f468 Support to reset all console connections. Ref https://github.com/GNS3/gns3-server/issues/1619 2020-07-26 18:27:18 +09:30
f97d346c34 Support to reset links. Fixes https://github.com/GNS3/gns3-server/issues/1620 2020-07-24 21:48:49 +09:30
cbcdaabcce Fix tests. Ref #1674 2020-07-24 15:22:11 +09:30
01b2c72767 Add maxcpus property for Qemu VMs. Ref #1674 2020-07-24 15:15:41 +09:30
89b5629cf5 Upgrade to psutil version 5.7.2 2020-07-21 15:49:57 +09:30
47bb2edbfa Upgrade to psutil version 5.7.2 2020-07-21 15:49:06 +09:30
068c31038f QEMU config disk - improve error handling 2020-07-19 17:56:49 +09:30
2bbee15b18 QEMU config disk - notification of import/export errors 2020-07-19 17:56:49 +09:30
50c49cfedb QEMU config disk - notification of import/export errors 2020-07-19 17:56:49 +09:30
b672900406 QEMU config disk - use disk interface of HD-D, fallback is HD-A 2020-07-19 17:56:49 +09:30
2e0fba925b QEMU config disk - add missing config disk to image directory 2020-07-19 17:56:49 +09:30
450c6cddc7 QEMU config disk - get rid of mtoolsrc 2020-07-19 17:56:48 +09:30
5c44268476 QEMU config disk - preserve file timestamp on zip unpack 2020-07-19 17:56:48 +09:30
b69965791d QEMU config disk - initial implementation. Ref #2958 2020-07-19 17:56:48 +09:30
a9e9ff071d Read folder structure correctly for custom symbols. Fixes https://github.com/GNS3/gns3-gui/issues/2856 2020-07-19 17:46:49 +09:30
3dc4ea46d6 Add total RAM, CPUs and disk size to servers summary as well as disk usage in percent. Fixes https://github.com/GNS3/gns3-server/issues/1532 2020-07-19 14:16:07 +09:30
00a6765405 Merge pull request #1800 from GNS3/docker-resource-constraints
Resource constraints for Docker VMs.
2020-07-18 19:39:01 +08:00
d1c29c8bb7 Resource constraints for Docker VMs. 2020-07-18 21:03:55 +09:30
0afce89c0b Fix exception when exporting debug data. Fixes #1684 2020-07-18 17:30:18 +09:30
e4978004d0 Update IOUtools. Ref #1627 2020-07-17 21:37:25 +09:30
7471b31b0c Fix tests. 2020-07-17 15:34:00 +09:30
05ed9836e4 Fix tests. 2020-07-17 15:33:30 +09:30
37c7202aa0 Use parent directory as working directory for project duplication and snapshots. Fixes https://github.com/GNS3/gns3-gui/issues/2909 2020-07-17 15:11:14 +09:30
0390fef74d Use parent directory as working directory for project duplication and snapshots. Fixes https://github.com/GNS3/gns3-gui/issues/2909 2020-07-17 15:09:43 +09:30
dff035d957 Support for "usage" for "Cloud" nodes. Fixes https://github.com/GNS3/gns3-gui/issues/2887
Allow "usage" for all builtin nodes (not exposed in Ui).
2020-07-15 19:15:51 +09:30
d11897c1ec Bump version to 2.3.0dev1 2020-07-11 11:41:51 +09:30
99128e7713 Fix Key Error "vendor_id" is missing when configuring GNS3 VM with VirtualBox. Fixes https://github.com/GNS3/gns3-gui/issues/3018 2020-07-10 17:44:38 +09:30
c40651b53e Development on 2.2.12dev1 2020-07-09 21:37:03 +09:30
c4d2422fe2 Release v2.2.11 2020-07-09 20:37:10 +09:30
f08f7702d1 Sync appliance files. 2020-07-09 20:26:41 +09:30
b787cb3ace Merge branch 'master' into 2.2 2020-07-09 20:23:20 +09:30
62130c116a Fix crash when project sets 'auto_open' option and a remote GNS3 VM is used. Fixes https://github.com/GNS3/gns3-gui/issues/3014 2020-07-09 20:13:21 +09:30
1cbed45f16 Fix Dynamips ghost image support when project contains a space. Fixes #3015 2020-07-08 20:32:58 +09:30
29b31d72e9 Release 2020.3.0-beta.1 2020-07-07 14:05:24 +02:00
9acb2ceda1 QEMU config disk - improve error handling
(cherry picked from commit 068c31038f)
2020-07-03 11:31:17 +02:00
ea17cc2565 Fix issue when cannot skip slots for Dynamips routers. Fixes https://github.com/GNS3/gns3-gui/issues/3000 2020-06-29 20:00:30 +09:30
850c30f958 Merge branch 'master' into 2.2
# Conflicts:
#	tests/handlers/api/compute/test_dynamips.py
#	tests/handlers/api/compute/test_qemu.py
2020-06-29 18:44:46 +09:30
27da8458e8 Allow tests to be run by root. Fixes #1784 2020-06-29 18:43:35 +09:30
053828f3e8 QEMU config disk - init config disk in base class
(cherry picked from commit 2bbee15b18)
2020-06-28 16:35:39 +02:00
f747b3a880 QEMU config disk - notification of import/export errors
(cherry picked from commit 50c49cfedb)
2020-06-28 09:21:57 +02:00
8bd3e2346b Add Snyk badges. 2020-06-27 18:27:04 +09:30
74fc4fc75c Merge branch 'master' into 2.2 2020-06-26 21:30:27 +09:30
d0487b92c5 Remove pyup and pep8 script. 2020-06-26 19:20:40 +09:30
7924963276 Remove tox and update dependencies 2020-06-26 19:08:21 +09:30
d7083541b0 Remove Travis CI support and add GitHub Actions badge 2020-06-26 18:55:52 +09:30
af22fb8e98 Comment unused code that causes issue with flake8 2020-06-26 18:47:31 +09:30
03c4643a0f Merge remote-tracking branch 'origin/master' 2020-06-26 18:35:49 +09:30
4ba7131451 Add flake8 in dev-requirements.txt 2020-06-26 18:35:25 +09:30
3af71d8976 Set up GitHub Action for running tests 2020-06-26 18:31:58 +09:30
f361b9cb3e Merge pull request #1790 from GNS3/whitesource/configure
Configure WhiteSource for GitHub.com
2020-06-26 09:04:09 +08:00
12d3ba391f Add .whitesource configuration file 2020-06-26 01:01:48 +00:00
88ee9ae8b9 Merge pull request #1788 from GNS3/snyk-fix-4af38289923e34d863acdf00d9e8d3b3
[Snyk] Security upgrade psutil from 5.6.6 to 5.6.7
2020-06-24 21:08:26 +08:00
9665378f44 fix: requirements.txt to reduce vulnerabilities
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-PSUTIL-483082
2020-06-24 13:06:58 +00:00
fd411e7855 Update classifiers in setup.py 2020-06-24 12:40:31 +09:30
7fd8fde020 Some fixes for tests. Ref #1784 2020-06-19 19:05:23 +09:30
51b76b1e30 Development on 2.2.11dev1 2020-06-18 19:06:00 +09:30
9a9e54c523 Release v2.2.10 2020-06-18 12:29:33 +09:30
13a6b4fe55 Merge branch 'master' into 2.2 2020-06-18 12:23:10 +09:30
3b4f4bfeda Sync appliances. 2020-06-18 12:20:42 +09:30
a018c8e1a8 Add pytest-aiohttp to tests_require in setup.py 2020-06-18 12:04:15 +09:30
79b93defbd Don't require hardware acceleration. Fixes #1780 2020-06-18 11:26:14 +09:30
750590d0db QEMU config disk - use disk interface of HD-D, fallback is HD-A
(cherry picked from commit b672900406)
2020-06-17 17:06:55 +02:00
72bef07f2b Release 2020.2.0-beta.5 2020-06-17 15:58:43 +02:00
3344cfb98a Merge pull request #1782 from GNS3/test-refactoring
Refactor tests
2020-06-17 11:13:13 +08:00
9d141baf22 Comment capsys tests 2020-06-16 21:27:49 +09:30
1a4c2ed069 Try to fix capsys issue with Python 3.8 (third try) 2020-06-16 21:19:51 +09:30
7fb554135f Try to fix capsys issue with Python 3.8 (second try) 2020-06-16 21:11:29 +09:30
241caa1ec7 Try to fix capsys issue with Python 3.8 2020-06-16 20:56:10 +09:30
d33584a2e4 More specific fix for Windows 2020-06-16 19:16:58 +09:30
438b1c056c Remove '\n' from for version strings for test_parse_arguments test. 2020-06-16 19:16:05 +09:30
ef23e74e9c Another fix for test_gns3vm.py 2020-06-16 19:09:49 +09:30
9ab8599e1e Fix other issues with tests. 2020-06-16 19:03:42 +09:30
d9ab29a9e0 Another fix for test_gns3vm.py 2020-06-16 18:52:07 +09:30
09e9382df1 Do not try to use ProactorEventLoop() on non Windows platforms. 2020-06-16 18:45:11 +09:30
8976384a56 Fix test_gns3vm.py 2020-06-16 18:37:32 +09:30
e4b7e46444 Fix tests for Windows 2020-06-16 01:57:16 -07:00
1d4c3a164d Use the ProactorEventLoop on Windows. 2020-06-16 14:08:17 +09:30
d3ea67da24 Refactor tests
* Use pytest-aiohttp
* Use the async def / await syntax.
* Fix tests to run with Python 3.8
2020-06-16 13:59:03 +09:30
f498ab06b4 Wait longer for x11 socket file to be created. Ref #1761 2020-06-10 20:37:13 +09:30
3940f013d4 Allow Hyper-V to run on AMD when Windows 10 build 19640 or later is detected. Fixes #1777 2020-06-10 15:21:58 +09:30
e1dab0dff4 Show error message if IPv6 is not enabled when using SPICE console. Fixes #1772 2020-06-09 15:06:41 +09:30
c6da24f267 Move jsonschema 2.6.0 requirement in build repository.
https://github.com/GNS3/gns3-server/issues/1751
https://github.com/GNS3/gns3-gui/issues/2849

This is to avoid the following error:

```
ERROR: Double requirement given: jsonschema==2.6.0 (from -r gns3-gui\win-requirements.txt (line 4)) (already in jsonschema==3.2.0 (from -r gns3-gui\requirements.txt (line 1)), name='jsonschema')
```
2020-06-07 13:07:16 +09:30
1f149769f2 Only use jsonschema 2.6.0 on Windows and macOS.
https://github.com/GNS3/gns3-server/issues/1751
https://github.com/GNS3/gns3-gui/issues/2849
2020-06-07 12:55:22 +09:30
ee70a6a27d Disable default integrations for sentry sdk. 2020-06-06 15:37:17 +09:30
297d1a0aae Remove unused bytes2human function 2020-06-05 13:10:01 +09:30
05e8fd3ff5 Development on 2.2.10dev1 2020-06-04 21:06:30 +09:30
c0c8151480 Release v2.2.9 2020-06-04 18:39:27 +09:30
ad7277c938 Merge branch 'master' into 2.2 2020-06-04 12:21:52 +09:30
0c2e4d2de9 Merge pull request #1768 from GNS3/replicate-network-connection-state
Support to activate/deactive network connection state replication in Qemu
2020-06-04 10:49:47 +08:00
1264680b51 Sync appliances. 2020-06-04 12:18:16 +09:30
a9697e925c Release 2020.2.0-beta.4 2020-06-03 19:15:56 +02:00
16a0e1c308 Merge pull request #1771 from eknoes/patch-1
Fix link for appliance JSON schema
2020-06-03 19:48:07 +08:00
f53d6f1b66 Fix link for appliance JSON schema 2020-06-03 13:46:48 +02:00
58a19af9ac Support to activate/deactive network connection state replication in Qemu. 2020-06-02 18:45:22 +09:30
a796f1e42e Possible fix for problem connecting to the GNS3 VM. Ref https://github.com/GNS3/gns3-gui/issues/2969 #1760 2020-06-01 19:40:53 +09:30
6e4187741c Merge pull request #1764 from GNS3/reset-mac-addresses
Option to reset MAC addresses when exporting or duplicating a project
2020-05-27 10:53:24 +08:00
8eefaa3f32 Option to reset or not all MAC addresses when exporting or duplicating a project. 2020-05-27 12:14:47 +09:30
5575657318 Fix tests. Ref #1754 2020-05-26 21:40:41 +09:30
69b816e21e Fix bug when changing properties for closed project. Fixes #1754 2020-05-26 18:34:20 +09:30
5c3bd589b9 Fix issues with crash reporting & bump version to 2.2.9dev2. Ref https://github.com/GNS3/gns3-server/issues/1758 2020-05-21 18:19:19 +09:30
1a20cbeefd Lock listing VMs. Ref #1755 2020-05-20 19:33:56 +09:30
da85d7b827 Try to fix error when listing Hyper-V VMs. Ref #1755 2020-05-20 19:19:04 +09:30
7002b026fc Catch VirtualBox errors when listing VMs. Fixes #1759 2020-05-20 18:42:50 +09:30
00f8a27404 Merge branch 'master' into 2.2
# Conflicts:
#	requirements.txt
2020-05-19 16:16:19 +09:30
5b59a09e8d Deprecate running with Python 3.5 2020-05-19 16:14:58 +09:30
16ca0fd915 aiocontextvars is only necessary for Python < 3.7 2020-05-19 16:04:14 +09:30
c63aad8eca Replace Raven by Sentry SDK. Fixes https://github.com/GNS3/gns3-server/issues/1758 2020-05-19 15:48:53 +09:30
54bab7445c Require setuptools>=17.1 in setup.py. Ref https://github.com/GNS3/gns3-server/issues/1751
This is to support environmental markers.
https://github.com/pypa/setuptools/blob/master/CHANGES.rst#171
2020-05-08 12:34:57 +09:30
32a8bc54a1 Development on 2.2.9dev1 2020-05-07 23:10:19 +09:30
dadbacd8a4 Release v2.2.8 2020-05-07 18:10:57 +09:30
9032fd2a5c Merge branch 'master' into 2.2 2020-05-07 12:51:46 +09:30
eb0d4439a0 Release 2020.2.0-beta.3 2020-05-07 00:02:33 +02:00
91a1c5db49 Redirection to the bundled web-ui in the root handler 2020-05-06 16:31:18 +09:30
0a77233631 Fix root handler for web-ui 2020-05-06 15:38:16 +09:30
8df8b73c8f Merge branch 'master' into 2.2 2020-05-06 11:59:00 +09:30
6968ae9295 Release 2020.2.0-beta.2 2020-05-05 23:39:24 +02:00
1c9a43d071 Update appliance files. 2020-05-05 14:29:43 +09:30
a4bc696a5f Fix tests 2020-05-05 13:19:51 +09:30
10645a412b Default port set to 80 for server running in the GNS3 VM. Fixes #1737 2020-05-05 12:40:50 +09:30
1b008fb516 Sync appliance files. 2020-05-01 19:21:43 +09:30
45d135911f Fix tests. 2020-04-30 20:36:12 +09:30
3626bd5adb Make the Web UI the default page. Ref https://github.com/GNS3/gns3-server/issues/1737 2020-04-30 17:27:06 +09:30
6c322bbdde Fix tests. 2020-04-30 15:49:06 +09:30
02c0fa26e1 Support controller reloading for templates, appliances and projects. Ref #1743 2020-04-30 15:30:50 +09:30
99a238a0dc Update README Ref #1719 2020-04-29 14:57:15 +09:30
7b61724213 Remove unused variable. Ref #1744 2020-04-28 17:55:00 +09:30
72c6f5b484 Return exit status 1 if server fails to start. Fixes #1744 2020-04-28 14:39:28 +09:30
8536af33da Fix tests. 2020-04-28 13:49:05 +09:30
4ddd45f788 Merge branch 'master' into 2.2 2020-04-28 13:14:53 +09:30
53b1809dc3 Merge pull request #1742 from fadlytabrani/patch-1
Add clipboard support for TigerVnc
2020-04-27 20:34:41 -07:00
dd11d38338 Fix tests. 2020-04-27 22:48:42 +09:30
c0adc88592 Use Environmental Markers to force jsonschema version. Fixes https://github.com/GNS3/gns3-gui/issues/2849
Version 3.2.0 with Python >= 3.8
Version 2.6.0 with Python < 3.8
2020-04-27 12:54:17 +09:30
2c9afbb217 Merge remote-tracking branch 'origin/2.2' into 2.2 2020-04-27 12:43:28 +09:30
770841b3ee Use Environmental Markers to force jsonschema version 2.6.0 on Windows/macOS. Ref https://github.com/GNS3/gns3-gui/issues/2849 2020-04-27 12:43:07 +09:30
896e99d046 Merge pull request #1745 from b-ehlers/2.2
Implement a minimum interval between cpu_percent() calls. Fixes #1738
2020-04-19 21:16:06 -07:00
10bb259248 Implement a minimum interval between cpu_percent() calls. Fixes #1738 2020-04-19 20:42:46 +02:00
4ab100b716 Revert "Implement a minimum interval between psutil calls. Fixes #2262"
This reverts commit 3a09bd43dc.
2020-04-19 20:06:47 +02:00
347035a99b QEMU config disk - add missing config disk to image directory
(cherry picked from commit 2e0fba925b)
2020-04-16 11:07:56 +02:00
0db0f6256b QEMU config disk - get rid of mtoolsrc
(cherry picked from commit 450c6cddc7)
2020-04-15 20:50:59 +02:00
6fd60452c4 Add clipboard support for TigerVnc
There's currently no clipboard support for servers running on TigerVnc. TigerVnc clipboard support is provided by vncconfig that needs to be spawned for every display socket. The code changes above provides that functionality
2020-04-16 00:14:20 +10:00
a2d57f7c37 Merge pull request #1741 from candlerb/candlerb/snasphot
Correct typo "Snasphot"
2020-04-15 02:53:01 -07:00
fb153e3c71 Merge pull request #1740 from candlerb/candlerb/1739
Sort snapshots by (created_at, name)
2020-04-15 02:51:55 -07:00
69986b0d0f Correct typo "Snasphot" 2020-04-15 09:46:45 +01:00
06a6a0a332 Sort snapshots by (created_at, name)
Fixes #1739
2020-04-15 09:41:50 +01:00
2606c2d9a7 Merge branch '2.3'
# Conflicts:
#	gns3server/version.py
2020-04-08 19:39:35 +09:30
57067a99fa Development on 2.2.8dev1 2020-04-08 01:26:42 +09:30
087cba3903 Release v2.2.7 2020-04-08 00:03:13 +09:30
0a5995b11c Merge branch 'master' into 2.2 2020-04-07 23:58:50 +09:30
4f3fd65377 Release 2020.2.0-beta.1 2020-04-07 16:11:44 +02:00
99d9728360 QEMU config disk - preserve file timestamp on zip unpack
(cherry picked from commit 5c44268476)
2020-04-07 14:11:00 +02:00
6a1eef0627 QEMU config disk - initial implementation. Ref #2958
(cherry picked from commit b69965791d)
2020-04-06 12:56:00 +02:00
42eaf97e9f Fix uBrigde error popups when Docker image has stopped. Fixes https://github.com/GNS3/gns3-gui/issues/2957 2020-04-06 13:52:04 +09:30
55a5ce77ba Remove debug message 2020-04-06 11:51:59 +09:30
0922159686 Merge pull request #1731 from torstehu/fix-literal-warning
fix warning that you are explicitly comparing literals
2020-04-02 19:35:30 -07:00
f9ab4ffb96 fix warning that you are explicitly comparing literals 2020-04-02 21:26:23 +02:00
241937b80b Merge pull request #1715 from GNS3/websocket-console
Support for WebSocket consoles
2020-03-27 21:44:25 -07:00
b179ca88a7 Merge branch 'master' into 2.3
# Conflicts:
#	gns3server/version.py
2020-03-28 13:43:50 +10:30
4bed19f20a Release v2.2.6 2020-03-26 12:37:59 +10:30
4bc1e5e02e Merge branch 'master' into 2.2 2020-03-26 12:15:16 +10:30
d5b6fda270 Remove --local when starting Docker dev server. 2020-03-26 12:06:05 +10:30
720f52655e Release 2020.1.0-alpha.1 2020-03-25 00:43:14 +01:00
4df10d1427 Release 2019.2.0-alpha.11 2020-03-25 00:26:02 +01:00
aa83fcc7d1 Monitor ubrige processes. 2020-03-20 21:30:05 +10:30
afbbf7a524 Add Xvnc command to the VNC servers list. Fixes #172 2020-03-19 19:06:51 +10:30
b24bb42a66 Allow controller to reconnect to compute if communication is lost. Ref #1634 2020-03-19 18:02:01 +10:30
aa1b621c10 Improvement of support for docker USER directive. Fixes #1727. 2020-03-19 17:50:27 +10:30
6aed064a86 Fix cannot delete Dynamips router the content of the "usage" field. Fixes https://github.com/GNS3/gns3-gui/issues/2947 2020-03-16 16:38:23 +10:30
615cffd9ac Prevent locked drawings to be deleted. Fixes https://github.com/GNS3/gns3-gui/issues/2948 2020-03-16 16:30:08 +10:30
868c39acfe Fix issues with empty project variables. Fixes https://github.com/GNS3/gns3-gui/issues/2941 2020-03-14 17:22:43 +10:30
392678e757 Upgrade psutil to version 5.6.6 due to CVE-2019-18874
https://github.com/advisories/GHSA-qfc5-mcwq-26q8
2020-03-14 15:47:12 +10:30
a62168fde0 Return array for controller statistics endpoint 2020-03-10 17:48:14 +10:30
3df348ac2a Server statistics implementation 2020-03-10 17:48:03 +10:30
d9c264ce77 Sync appliances. 2020-03-06 12:05:19 +10:30
6eb62ad179 Remove 'format=raw' from the Qemu options of the disk interfaces. Ref #1699 2020-02-24 20:06:45 +08:00
966e644c51 Merge pull request #1718 from GNS3/iou-application-id
Allocate application IDs for IOU nodes on the controller. Fixes #557
2020-02-10 15:27:50 +08:00
c5412bf970 Allocate application IDs for IOU nodes on the controller.
An application ID is used by IOU to generate its interface Mac addresses. They must be unique across all opened projects sharing the same computes to avoid Mac address collisions.
2020-02-10 15:20:49 +08:00
6cb87ef25d Sync appliance files. 2020-02-04 16:48:11 +08:00
3484a7dd3d Unprotected access for websocket consoles.
Ref https://github.com/GNS3/gns3-gui/issues/2883#issuecomment-580677552
2020-01-31 18:30:26 +08:00
c313475f68 Support for WebSocket consoles 2020-01-31 17:31:27 +08:00
e90262eb95 Require VirtualBox >= 6.0 on AMD and >= 6.1 on Intel processors (for GNS3 VM only). Fixes #1610 2020-01-26 18:23:17 +08:00
f7a6a0d466 Merge pull request #1714 from GNS3/qemu-changes
Recent Qemu versions support. Ref #1699
2020-01-25 16:05:03 +07:00
92ac250bc7 Add nvme disk interface and fix scsi disk interface for Qemu VMs. 2020-01-25 16:22:34 +08:00
667d50aa4a Disallow using "legacy networking mode" with Qemu >= 2.9.0 2020-01-24 19:06:24 +08:00
d796f8d112 Add latest Qemu nic models. 2020-01-24 19:05:46 +08:00
fb4ece5c67 Attempt to fix error when loading wmi module. Fixes #1712 2020-01-23 19:04:17 +08:00
ab4b391a02 Handle "aborted" state for VirtualBox VMs. Fixes #1702 2020-01-23 18:00:33 +08:00
dcdaffa056 Change how Hyper-V VMs are found. Ref #1612 2020-01-21 18:03:07 +08:00
39d44c8480 Merge pull request #1713 from GNS3/server-statistics
Server statistics implementation. Ref #1682
2020-01-17 04:17:01 -05:00
c3b2128fae Return array for controller statistics endpoint 2020-01-17 17:07:30 +08:00
941bed9605 Server statistics implementation 2020-01-17 16:50:17 +08:00
12a8831c44 Change version to 2.3.0dev1 on 2.3 branch 2020-01-16 18:06:51 +08:00
60cc5c7bb4 Development on 2.2.6dev1 2020-01-10 00:32:10 +08:00
6d66e4d5d5 Release v2.2.5 2020-01-09 23:52:40 +08:00
82b42fffef Development on 2.2.5dev1 2020-01-09 05:17:01 +08:00
fe8fd828b6 Release v2.2.4 2020-01-09 00:45:09 +08:00
e127dc302e Merge branch 'master' into 2.2 2020-01-08 13:29:21 +08:00
c52abd973e Sync documentation 2020-01-08 10:52:15 +08:00
114da9764b Fix tests. 2020-01-08 08:59:55 +08:00
0a87ee573c Accept a node name when creating a node from a template using the API. Fixes #1708 2020-01-08 08:19:33 +08:00
688b1ac0e4 Fix tests. 2020-01-08 07:10:33 +08:00
500b5b0b65 Fix tests. 2020-01-08 06:03:31 +08:00
e428865d19 Sync appliances. 2020-01-08 05:38:34 +08:00
98f5454ccb Disallow to modify a template if changes cannot be written on disk. Fixes #1695 2020-01-08 05:35:46 +08:00
a47fa83cec Fix renaming IOL hostname replaces %h only in a single place. Fixes #1707 2020-01-08 01:24:47 +08:00
e3e6790943 Merge pull request #1710 from CapnCheapo/patch-1
Add symbols_path
2020-01-04 13:31:01 -05:00
2a77841961 Add symbols_path
Added symbols_path so everybody knows that's a config option.
2020-01-04 10:29:06 -06:00
8fbd4602e8 Release 2019.2.0-alpha.11 2019-12-30 05:09:54 -08:00
825dc5996d Change the default UDP port range to be 20000 to 30000 in gns3_server.conf Ref #1271 2019-12-06 14:36:45 +08:00
26efdaf7b7 Fix tests 2019-12-05 14:06:46 +08:00
50b507f76c Fix cannot power on VirtualBox VM in saved state. Ref #1702 2019-12-05 13:46:02 +08:00
060871cc42 Development on 2.2.4dev1 2019-11-12 16:43:21 +08:00
9e4474de8d Release v2.2.3 2019-11-12 15:29:54 +08:00
9bda15236e Sync appliance files. 2019-11-12 15:23:37 +08:00
4daaea9cec Merge branch 'master' into 2.2 2019-11-12 15:20:12 +08:00
5e4e5c741b Merge pull request #1691 from JCDraaijer/master
Added workaround for #1690
2019-11-11 18:36:34 +08:00
7117b1fb65 Improved how the path to the config file is actually determined 2019-11-11 11:20:51 +01:00
992c60e3e0 Return HTTP status code 204 in API when project successfully closed. Fixes #1689 2019-11-11 15:32:57 +08:00
a98fc2d308 Python3.8 support. Ref https://github.com/GNS3/gns3-gui/issues/2895 2019-11-11 12:44:31 +08:00
2fd4b2cbc8 Make sure still support Python >= 3.5.3 2019-11-11 12:39:45 +08:00
3bd394b637 Added workaround for #1690. Added venv/ to .gitignore 2019-11-10 20:41:39 +01:00
7571c32563 Sync appliance files. 2019-11-08 18:24:22 +08:00
05b949930d Fix tests. 2019-11-08 17:25:59 +08:00
4075bbd703 Fix exception when adding VirtualBox VM. Fixes #1685. 2019-11-08 17:13:21 +08:00
3aba2a319c Set psutil to version 5.6.3 in requirements.txt 2019-11-08 10:44:17 +08:00
3a3ba2f54a Merge branch 'master' into 2.2 2019-11-08 10:42:44 +08:00
2fa2c715f5 Add LimitNOFILE=16384 to GNS3 service. Ref #1678 2019-11-07 16:28:47 +08:00
907207a140 Fix tests 2019-11-06 15:35:59 +08:00
539cf640d8 Change the default UDP port range to be 20000 to 30000. Ref #1271 2019-11-06 12:25:30 +08:00
6e7aeb1fdd Developement version on 2.2.3dev1 2019-11-04 19:45:18 +08:00
3245450e67 Release v2.2.2 2019-11-04 18:33:28 +08:00
f154ebeee9 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-11-04 18:29:06 +08:00
7608584833 Merge branch 'master' into 2.2 2019-11-04 18:28:42 +08:00
f69914565a Release 2019.2.0-alpha.10 2019-11-04 02:15:09 -08:00
60beba108a Merge pull request #1681 from GNS3/fix-pci-bridges
Fix how PCI bridges are created for Qemu VMs with greater than 32 interfaces. Fixes #1665
2019-11-04 17:00:13 +07:00
4a0fbe9b1b Release 2019.2.0-alpha.10 2019-11-04 01:29:58 -08:00
ff9bd59ef8 Fix how PCI bridges are created for Qemu VMs with greater than 32 interfaces. 2019-11-03 17:56:52 +08:00
4ab3f281c5 Fix broken support for cloned VirtualBox VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2889 2019-11-03 16:34:24 +08:00
7b507bf532 Sync appliance files. 2019-11-03 16:32:15 +08:00
459dd7b479 Handle builtin entry does not exist when adding node from template (new fix). 2019-11-02 16:23:45 +08:00
b8c70a3a8e Development on 2.2.2dev1 2019-11-01 18:43:36 +08:00
a267ecdea4 Merge branch 'master' into 2.2 2019-11-01 18:34:17 +08:00
7b8f0c2633 Release v2.2.1 2019-11-01 17:53:20 +08:00
89f97902f9 Handle builtin entry does not exist when adding node from template. 2019-11-01 17:48:25 +08:00
8dd2831890 Upgrade aiohttp to version 3.6.2 2019-11-01 17:18:30 +08:00
19723f06ed Sync appliance files 2019-11-01 17:07:43 +08:00
3f5ee94022 Merge remote-tracking branch 'origin/master' 2019-11-01 15:24:04 +08:00
85582554ac Let systemd directly supervises the GNS3 service. Fixes #1678 2019-11-01 15:23:52 +08:00
107dbbc949 Release 2019.2.0-alpha.10 2019-10-31 04:38:52 -07:00
2af9127879 Fix issue when linking to more than one NAT node with allowed_interface option enabled. Fixes #1671 2019-10-31 17:07:52 +08:00
5e9810d420 Prevent deleting a GNS3 project outside the project directory. Ref #1669 2019-10-30 16:25:06 +08:00
f3ad333a21 Do not send "console_type" property to computes for all builtin nodes excepting Ethernet switches. Fixes https://github.com/GNS3/gns3-gui/issues/2882 2019-10-29 18:06:09 +08:00
c8f7d789f7 Update API documentation 2019-10-23 22:00:00 +08:00
df9b40c1dc Fix QEMU link detection flaky on last port. Fixes #1666 2019-10-15 23:42:42 +08:00
f5c02368e6 Fix tests. 2019-10-09 17:47:22 +08:00
7cfd0d4d1d Use compatible shlex_quote to handle case where Windows needs double quotes around file names, not single quotes. Ref https://github.com/GNS3/gns3-gui/issues/2866 2019-10-09 17:02:30 +08:00
9d47050dff Use 0.0.0.0 by default for server host. Fixes https://github.com/GNS3/gns3-server/issues/1663 2019-10-09 16:35:42 +08:00
1b845225b2 Improvement to validate HTTP authentication config. Ref #1662 2019-10-09 15:56:20 +08:00
5a3f8b9a9b Use versioned config directory for profiles. Fixes #1664 2019-10-09 15:20:19 +08:00
56a4d3f8fd Fix tests. 2019-10-09 15:00:48 +08:00
6d1adea907 Enable nested hardware virtualization by default for GNS3 VM running in VirtualBox. Fixes #1377
No error is sent by VBoxManage is this feature is not available, for instance with Intel processors.
2019-10-09 14:50:00 +08:00
2d777cac13 Set default host to "localhost". Fixes https://github.com/GNS3/gns3-server/issues/1663 2019-10-08 18:28:10 +08:00
6ae7ef8a2e Improve process to get guest IP address from GNS3 VM running in VMware workstation/player. Ref https://github.com/GNS3/gns3-gui/issues/2866 2019-10-08 17:58:27 +08:00
09d05accc1 Fix tests. Ref #1659 2019-10-08 17:34:16 +08:00
2f57bd58c0 Fix error with console type in Ethernet switch schema. Fixes #1659 2019-10-08 17:16:17 +08:00
51a92b46dd Bump version to 2.2.1dev1 2019-10-08 16:05:36 +08:00
7c437adbef Release v2.2.0 2019-09-30 16:24:26 +08:00
fef1d01e26 Merge branch 'master' into 2.2 2019-09-30 16:20:19 +08:00
af3ae0df24 Merge branch '2.1'
# Conflicts:
#	gns3server/compute/dynamips/nodes/atm_switch.py
2019-09-30 16:11:26 +08:00
87390274cc Add debug message for what directory is checked for Qemu binaries. Ref #1655 2019-09-30 15:54:57 +08:00
f424e2dfd5 Sync appliance files. 2019-09-30 11:59:41 +08:00
4031fd0c18 Release 2019.2.0-alpha.8 2019-09-27 01:57:03 -07:00
1c678e296e Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/version.py
2019-09-24 14:07:18 +08:00
958ec94f13 Sync appliance files. 2019-09-24 14:06:26 +08:00
a9fd990904 Bump version to 2.2.0dev18 2019-09-24 14:02:36 +08:00
9d18ac1e3e Merge branch 'master' into 2.2 2019-09-24 13:56:16 +08:00
2cfac30810 Fix single quote is not closed. Fixes #1654 2019-09-17 18:54:18 +07:00
67e70c4628 Fix wrong Dynamips command used to rename an ATM switch. Fixes #1651 2019-09-11 15:06:08 +07:00
8b71e9b20c Release v2.2.0rc5 2019-09-09 15:06:14 +07:00
7cd9bb6ca6 Merge branch '2.1' into 2.2 2019-09-09 15:02:06 +07:00
6ec5683c95 Merge pull request #1649 from neffs/fix-sata
Don't specify the PCI bus for AHCI device
2019-09-05 17:37:13 +07:00
2e41328ae9 Merge branch 'master' into fix-sata 2019-09-05 17:36:53 +07:00
918ba21f1f Merge pull request #1648 from neffs/master
Add id value to all qemu drives
2019-09-05 17:33:05 +07:00
077432ff2f Add qemu drive id to tests 2019-09-03 16:45:50 +02:00
8105b68d52 Don't specify the PCI bus for AHCI device
pci.X is not always defined, let qemu handle this.

I think PCI buses only exist if PCI network adapters are defined, this
is not the case with virtio.
2019-09-03 16:03:27 +02:00
906f29d5fc Add id value to all qemu drives
A fixed id doesn't hurt and now we can select Disk Interface=none in
GNS3 and e.g. attach the volume as a USB thumb drive with -device
usb-storage,drive=drive0,...
2019-09-03 15:54:51 +02:00
5d4de9d0ba Fix AttributeError: Cannot set attribute '%s'. Fixes #1646 2019-08-31 14:43:35 +07:00
4470519d9f Release v2.2.0rc4 2019-08-30 15:23:32 +07:00
941857470d Release 2019.2.0-alpha.7 2019-08-29 09:39:26 -07:00
e64ed839f5 Check that vcpus value for GNS3 VM is an integer. Fixes #1636 2019-08-27 18:01:46 +07:00
647dde1bb4 Make x,y optional for creating links via API. Fixes #1630 2019-08-26 19:51:03 +07:00
63c0bfe46e Sync appliance files. 2019-08-26 17:08:33 +07:00
2eddc463e7 Merge pull request #1643 from GNS3/allow-none-compute_id-templates
Allow "none" for compute_id in templates. Fixes #1638
2019-08-26 17:07:07 +07:00
fb288db50a Set default_name_format for some builtin nodes. 2019-08-26 17:00:18 +07:00
55a9abfcea Allow "none" for compute_id in templates. 2019-08-26 16:48:03 +07:00
dac2cf4089 Bump version to 2.2.0dev17 2019-08-23 18:20:44 +07:00
3b0bb8df4e Merge branch 'master' into 2.2
# Conflicts:
#	gns3server/version.py
2019-08-20 17:34:47 +07:00
9559748f9d Bump version to 2.2.0dev16 2019-08-20 17:33:48 +07:00
4656521987 Release v2.2.0rc3 2019-08-11 19:14:56 -07:00
2feec666a2 Revert to jsonschema 2.6.0 due to packaging problem. 2019-08-11 19:11:40 -07:00
86772d9127 Release v2.2.0rc2 2019-08-10 12:04:19 -05:00
fc182e932a Fix typo with jsonschema version 3.2.0 -> 3.0.2 2019-08-10 11:55:47 -05:00
27d447c926 Release v2.2.0rc1 2019-08-10 11:42:10 -05:00
df9f717d7c Sync appliance files 2019-08-10 11:35:32 -05:00
703dca54ab Bump jsonschema to version 3.0.2 2019-08-10 11:31:08 -05:00
39da0f3904 List Hyper-V VMs on non-english OSes. Fixes #1612 2019-07-30 15:01:17 -02:30
6a7d47ce97 Merge branch '2.2' 2019-07-12 12:07:44 +02:00
7c07d0b4bd Add missing default values in Cloud schema. 2019-07-12 11:32:55 +02:00
6626bf37a6 Development on 2.2.0dev15 2019-07-11 17:34:56 +02:00
f7376ee382 Release v2.2.0b4 2019-07-11 16:58:35 +02:00
3172985a21 Sync appliance files. 2019-07-11 16:55:13 +02:00
dcf94a5852 Requires a project to be opened to start/stop/suspend all nodes. Fixes #1609 2019-07-10 17:07:13 +02:00
cba39a3744 Fix issue when starting GNS3 VM for Hyper-V 2019-07-10 15:56:54 +02:00
03c7744efd Set defaults for custom cloud nodes. 2019-07-10 15:51:06 +02:00
b0f74c2a5e Fix issue when trying to rename a Dynamips node that is already powered on. Fixes #2824 2019-07-10 15:40:11 +02:00
63fb82a89d Remove deprecated Qemu parameter to run legacy ASA VMs. Fixes #2827 2019-07-10 11:33:04 +02:00
aad74dbcb9 Add debug message when searching for an image. Ref https://github.com/GNS3/gns3-gui/issues/2828 2019-07-10 11:16:50 +02:00
c5be58b016 Merge pull request #1607 from fcolista/patch-1
Update README.rst
2019-07-04 19:37:05 +02:00
507090d69d Fix base href for web ui 2019-07-04 10:37:14 +02:00
ed27a46dee Release 2019.2.0-alpha.5 2019-07-04 00:20:54 -07:00
8d02405e88 Fix redirection to web-ui bundled server 2019-07-04 08:59:33 +02:00
a17034fc6d Update README.rst 2019-07-03 20:30:10 +02:00
7adf5201f0 Release 2019.2.0-alpha.4 2019-07-03 06:08:46 -07:00
0df3322b6c Development on 2.2.0dev14 2019-06-15 16:38:06 +02:00
43c7acb0cf Release v2.2.0b3 2019-06-15 15:39:32 +02:00
239d9e6fd6 Merge pull request #1599 from GNS3/cdrom-refresh
Refresh mounted media after ISO switch
2019-06-15 15:26:48 +02:00
9e54ab77d0 Merge 2.1 into 2.2 branch. 2019-06-15 15:26:20 +02:00
5dbedb744e Sync appliance files. 2019-06-15 15:24:45 +02:00
7a463676cd Eject cdrom first before changing an image. Use 'force' when ejecting. 2019-06-15 15:20:21 +02:00
b0700b8787 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-06-15 12:53:55 +02:00
06ce0868ec Fix template migration issues from GUI to controller. Fixes https://github.com/GNS3/gns3-gui/issues/2803 2019-06-15 12:52:50 +02:00
7c33d3510a Development on 2.1.22dev1 2019-06-14 19:42:18 +02:00
cb1f73e9a2 Release v2.1.21 2019-06-14 10:47:07 +02:00
2476581dca Change uBridge debug level to '1' when debugging is enabled. Fixes #1598 2019-06-12 14:35:13 +02:00
b7af2e4d5c Refresh mounted media after ISO switch. 2019-06-12 14:23:03 +02:00
b002812907 Merge pull request #1597 from kazkansouh/2.2-fix-1595-volumes
Fix for issue #1595
2019-06-05 12:10:34 +02:00
af78031322 Resolve conflicts in docker volumes instead of error. Fixes https://github.com/GNS3/gns3-server/issues/1595 2019-06-05 10:40:40 +01:00
61c87e57a4 Use console port to allocate guest CID (console ID) for Qemu VMs. Fixes #2804 2019-06-05 11:25:35 +02:00
9cce4de190 %guest-cid% variable implementation for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2804 2019-06-04 18:00:44 +02:00
54d50b2ef4 Set hkp protocol for keyserver in remote install script. Fixes #1596 2019-06-04 15:10:34 +02:00
9e518412b3 Set keyserver port to 80 in remote install script. Fixes #1596 2019-06-04 15:03:28 +02:00
e9154f6af6 Fix KeyError: 'usage' exception when configuring IOU template. Fixes https://github.com/GNS3/gns3-gui/issues/2806 2019-05-31 08:41:44 +02:00
dd05884096 Development on 2.2.0dev13 2019-05-29 17:52:38 +07:00
e58f86e204 Release v2.2.0b2 2019-05-29 17:16:59 +07:00
a6bc6bc79c Update appliance files. 2019-05-29 16:52:50 +07:00
336b77e28a Merging 2.1 into 2.2 branch 2019-05-29 16:50:36 +07:00
3dbce3fa40 Development on 2.1.21dev1 2019-05-29 16:37:42 +07:00
053a16960c Release v2.1.20 2019-05-29 15:44:25 +07:00
a860243531 Ignore Unicode errors when reading base config file contents. 2019-05-29 15:43:17 +07:00
99886d3f0c Development on 2.1.20dev1 2019-05-28 16:33:43 +07:00
6fb613dcff Release v2.1.19 2019-05-28 15:23:35 +07:00
4f803ff162 Sync appliances. 2019-05-28 10:37:43 +07:00
591d4f29ff Fix minor bugs with log rotation support. Ref #1586 2019-05-28 10:34:27 +07:00
87d85c1947 Remove yarl from requirements.txt since it is installed by aiohttp. 2019-05-27 18:10:46 +07:00
54c4bd31d4 Remove setup require since we do not use environment makers yet. 2019-05-27 17:57:37 +07:00
907807dc53 Drop typing dependency. 2019-05-27 17:38:16 +07:00
5cbfafbeb2 Support snapshots for portable projects. Fixes https://github.com/GNS3/gns3-gui/issues/2792 2019-05-27 15:35:47 +07:00
6229fadace Fix topology test 2019-05-26 15:55:29 +07:00
81a48df9bb Update the GNS3 version in topology file if converted. Ref https://github.com/GNS3/gns3-gui/issues/2798 2019-05-26 15:44:55 +07:00
2289fd4a2f Set log max size to 10MB. Ref #1586 2019-05-25 21:33:47 +07:00
4ac999461b Support for log rotation and compression. Fixes #1586 2019-05-25 18:23:51 +07:00
3b87a19979 Do not start QEMU console if QEMU process is not started. Fixes https://github.com/GNS3/gns3-gui/issues/2712 2019-05-25 15:31:35 +07:00
5a62277819 Merging 2.2 into master 2019-05-24 15:27:07 +07:00
a86f881d83 Avoid sending warning message all the time for Ethernet switch. 2019-05-23 15:57:08 +07:00
457ae4783f Development on 2.1.19dev1 2019-05-23 14:37:37 +07:00
878987a26e Release v2.1.18 2019-05-22 16:13:28 +07:00
40d7ae6866 Support to include snapshots in portable projects. 2019-05-22 14:35:37 +07:00
39f6f4edd5 Development on 2.2.0dev12 2019-05-21 19:16:19 +07:00
5b3be13e73 Release v2.2.0b1 2019-05-21 15:26:54 +07:00
16908df8b2 Upgrade GNS3 Web UI to v2019.2.0-alpha.3 2019-05-20 14:23:25 +02:00
c357d52ba4 Revert "Force aiohttp version to 2.3.10 and aiohttp-cors version to 0.5.3"
Ref https://github.com/GNS3/gns3-server/issues/1583
Ref https://github.com/GNS3/gns3-server/issues/1592

This reverts commit 351ed64de9.
2019-05-20 17:23:26 +07:00
44a142e91d Fix tests 2019-05-20 11:02:29 +07:00
28004479fd Change behavior when an IOU license is verified. Fixes https://github.com/GNS3/gns3-server/issues/1555 2019-05-20 10:51:24 +07:00
e8b8554c1a Fix Qemu VM state support after closing a project and check for JSON data returned by qemu-img. Fixes #1591 2019-05-19 17:59:00 +07:00
424db843ca Fix Docker extra volumes support 2019-05-19 14:26:03 +07:00
0c6749f62b Update Dockerfile to Ubuntu 18.04 2019-05-18 20:19:34 +07:00
cdae1f9e00 Merge pull request #1584 from kazkansouh/2.2-docker-volumes
Custom persistent docker volumes
2019-05-18 20:17:11 +07:00
cf0cc8bb87 Ensure Qemu monitor commands are executed. Ref #1582. 2019-05-18 19:31:41 +07:00
c41c01b95f Fix tests. 2019-05-18 19:19:27 +07:00
2340823f53 Update appliance files. 2019-05-18 15:45:28 +07:00
470cea327f Fix console variable replacement issue. 2019-05-18 14:31:21 +07:00
6edcbd0461 Set console type to "none" by default for Ethernet switches and add a warning if trying to use "telnet". Fixes https://github.com/GNS3/gns3-gui/issues/2776 2019-05-18 14:28:20 +07:00
a7e449ff0e Bump version to 2.2.0dev11 2019-05-18 14:11:07 +07:00
e763980dbe Add %console-port% variable for additional Qemu options. Fixes https://github.com/GNS3/gns3-gui/issues/2786 2019-05-18 13:51:00 +07:00
f1ae3b3778 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-05-18 13:45:57 +07:00
9400c49b82 Merge 2.1 branch into 2.2 2019-05-18 13:45:39 +07:00
773bad811a Fix invalid reStructuredText for long description in setup.py 2019-05-17 16:14:19 +07:00
6b54cc27da Release v2.1.17 2019-05-17 15:10:28 +07:00
351ed64de9 Force aiohttp version to 2.3.10 and aiohttp-cors version to 0.5.3
This is to fix build issue for Ubuntu 19.04 package on Launchpad.
Ref #1583 https://github.com/GNS3/gns3-gui/issues/2774
2019-05-17 09:56:16 +07:00
81ddb0cfe6 Impoved docker volumes user input validation 2019-04-22 12:46:28 +01:00
0c19bc8d43 Support for additional persistent docker volumes to be specified within appliance configuration 2019-04-22 10:26:41 +01:00
264f9da576 Merge pull request #1580 from GNS3/pyup-update-pytest-4.4.0-to-4.4.1
Update pytest to 4.4.1
2019-04-16 20:05:10 +07:00
30a9ea8675 Update pytest from 4.4.0 to 4.4.1 2019-04-16 03:34:57 +02:00
7543d7587c Release v2.2.0a5 2019-04-15 17:05:20 +07:00
f5ebc6a29a Merge 2.1 into 2.2 2019-04-15 15:54:08 +07:00
f41158173b Development on 2.1.17dev1 2019-04-15 12:41:40 +07:00
cb5dc36987 Release v2.1.16 2019-04-15 12:00:18 +07:00
fb470dd4b5 Back to the major.minor version for config files. Ref https://github.com/GNS3/gns3-gui/issues/2756 2019-04-14 21:31:40 +07:00
6dbb992513 Fix templates missing after server restart. Fixes https://github.com/GNS3/gns3-gui/issues/2769 2019-04-14 20:39:55 +07:00
e962717448 Fix bug when GNS3 VM were not saved. Fix tests. 2019-04-14 17:42:20 +07:00
6dc58b28fd Some adjustments with compute WebSocket handling. Ref https://github.com/GNS3/gns3-server/issues/1564 2019-04-14 16:48:12 +07:00
6db8cecda5 Merge 2.1 into 2.2 2019-04-13 18:39:06 +07:00
cc1980ac1c Fix broken embedded console for Ethernet switch. Fixes #1574 2019-04-11 17:57:47 +07:00
2af9c9c8ec Prevent locked nodes to be deleted. Fixes https://github.com/GNS3/gns3-gui/issues/2764 2019-04-10 15:43:51 +07:00
8cd66cfc02 Remove old unused argument option. Fixes #1569 2019-04-09 19:26:07 +07:00
4d222ddc0a Bump version to 2.2.0dev10 2019-04-09 19:20:21 +07:00
5c884702e5 Development on 2.2.0dev9 2019-04-05 22:01:35 +08:00
62c5aa2948 Release v2.2.0a4 2019-04-05 19:10:04 +08:00
474e184646 Merge pull request #1573 from kazkansouh/2.2-docker-user
Support for docker images that set the USER directive (+test coverage)
2019-04-05 19:00:22 +08:00
7a55ba3c1e Use the full version number for path to config files. Ref https://github.com/GNS3/gns3-gui/issues/2756 2019-04-05 18:44:31 +08:00
6df93d4db0 Updated tests for setting docker user 2019-04-05 11:06:35 +01:00
7c3a38d379 Support for docker images that set the USER directive. Changes the
docker user to root for the init script to configure the network,
then drops to the configured user (or root if one is not defined)
for continuing booting the image.
2019-04-05 08:51:57 +01:00
dde01317e0 Fix packet filter not working for Ethernet switch and Ethernet hub. Fixes https://github.com/GNS3/gns3-gui/issues/2754 2019-04-02 01:12:06 +07:00
a17119187b Fix remote packet capture for Dynamips. 2019-04-01 20:58:18 +07:00
4cc5dbc228 Fix remote packet capture and make sure packet capture is stopped when deleting an NIO. Fixes https://github.com/GNS3/gns3-gui/issues/2753 2019-04-01 19:47:31 +07:00
f01706e9e6 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-04-01 15:53:59 +07:00
c075baa05b Store config files in version specific location 2019-04-01 15:53:39 +07:00
de2cbf4258 Merge pull request #1565 from GNS3/pyup-update-pytest-4.3.1-to-4.4.0
Update pytest to 4.4.0
2019-04-01 12:00:59 +07:00
bc71fb6933 Update pytest from 4.3.1 to 4.4.0 2019-04-01 06:54:28 +02:00
21bed54768 Fix opening previously saved 2.1 project grid overlapping. Fixes #2734 2019-03-31 16:48:08 +07:00
d50614aed7 Fix empty theme name in symbol selection dialog. Fixes https://github.com/GNS3/gns3-gui/issues/2751 2019-03-30 16:20:21 +07:00
22854f1baa Refresh documentation 2019-03-30 15:56:26 +07:00
5045c6cfbf Update documentation 2019-03-28 17:24:02 +08:00
6a6cabc2d2 Bundle v2019.1.0-alpha.3 web-ui 2019-03-27 12:34:45 +01:00
541101741b Development on 2.2.0dev8 2019-03-25 23:44:19 +08:00
2b786e40b9 Release v2.2.0a3 2019-03-25 19:35:22 +08:00
2bb1b61526 Fix traceback when starting packet capture on builtin nodes. Fixes https://github.com/GNS3/gns3-gui/issues/2743 2019-03-25 16:57:36 +08:00
106df1d4ab Load v2019.1.0-alpha.2 of WebUI 2019-03-22 14:17:40 +01:00
06a6abe687 Fetch tags for update-bundled-web-ui.sh 2019-03-22 14:12:51 +01:00
3f4bdfef11 Fix mimetype for javascript, #1559 2019-03-22 08:35:27 +01:00
cbb6eccad8 Merge branch '2.2' of github.com:GNS3/gns3-server into 2.2 2019-03-21 10:39:55 +01:00
9edbd27b4f Serve WebUI via get_resource for freezed app 2019-03-21 10:39:49 +01:00
645031ee15 Development on 2.1.16dev1 2019-03-21 13:56:11 +08:00
c70b344133 Release v2.1.15 2019-03-21 11:41:44 +08:00
343f223a83 Fix tests after deactivating the embedded shell for Ethernet switch. Ref #1424 #1556 2019-03-20 17:04:02 +08:00
1f1d93d078 Deactivate the embedded shell for Ethernet switch. Ref #1424 #1556 2019-03-20 16:23:30 +08:00
dd211bce52 Fix VBoxManage fails if VM has specific special characters in name. Fixes #2739 2019-03-18 23:29:18 +07:00
e00bde51da Merge branch '2.1' into 2.2 2019-03-18 19:26:46 +07:00
e291ec1eb9 Fix IOU symlink issue on remote servers. 2019-03-18 18:11:16 +07:00
3daa3f450b Fix IOU symlink issue on remote servers. 2019-03-18 18:05:40 +07:00
8e8985c69f Fix vcpus configuration for GNS3 VM on VMware. Ref #2738. 2019-03-18 17:53:14 +07:00
03401a477e Fix issue when images are not uploaded from appliance wizard. Ref https://github.com/GNS3/gns3-gui/issues/2738 2019-03-18 15:33:37 +07:00
4e396ac690 Save the GNS3 VM settings even if the GNS3 VM cannot be stopped. 2019-03-18 15:30:59 +07:00
3a73d01547 Fix exception when emitting event from controller. Ref https://github.com/GNS3/gns3-gui/issues/2737 2019-03-15 13:14:55 +07:00
23b568678a Development on 2.2.0dev7 2019-03-14 23:27:11 +07:00
8ad632976f Release v2.2.0a2 2019-03-14 17:09:53 +07:00
b8bf2bf465 Web-UI v2019.1.0-alpha.1 2019-03-14 10:44:09 +01:00
55be74f93c Update docs for update-bundled-web-ui.sh 2019-03-14 10:33:35 +01:00
7d591b0228 Fix issue when loading and quickly closing a project and opening it again. Fixes #1501. 2019-03-14 15:15:27 +07:00
a059e6b943 Disable unreliable nested virtualization check. 2019-03-13 23:13:54 +07:00
c6990dfeee Merge remote-tracking branch 'origin/2.2' into 2.2 2019-03-13 12:56:50 +07:00
aff67b324f Fix issue not checking build number on Windows. 2019-03-13 12:56:33 +07:00
f7e90a7d7f Merge pull request #1550 from GNS3/pyup-update-pytest-4.3.0-to-4.3.1
Update pytest to 4.3.1
2019-03-13 02:21:49 +07:00
ed6b1d909d Update pytest from 4.3.0 to 4.3.1 2019-03-12 20:16:34 +01:00
010d65114d Hyper-V with nested virtualization is only supported on Windows 10 Anniversary Update or later. 2019-03-13 02:15:58 +07:00
3dcb7799e3 Use accurate info to detect Windows version. 2019-03-12 22:40:37 +07:00
aaaeb410d5 Fix exception when loading and quickly closing a project. 2019-03-12 21:50:09 +07:00
d506962bdb Debugging why sys.getwindowsversion() does not work with frozen app. 2019-03-12 21:18:46 +07:00
4d9728b6f5 Correctly rename symbol. 2019-03-12 18:54:05 +07:00
ff9048b5a8 Revert "Rename symbol."
This reverts commit 6c96be2acc.
2019-03-12 18:53:02 +07:00
6c96be2acc Rename symbol. 2019-03-12 18:42:54 +07:00
21afaf31f9 Merge pull request #1549 from GNS3/symbol-management-refactoring
Symbol management refactoring
2019-03-12 18:21:30 +07:00
8e5ac228d5 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-03-12 18:17:41 +07:00
94f63f54ba Change Hyper-V requirement checks. 2019-03-12 18:17:31 +07:00
cf91e904f7 Early support for symbol themes. 2019-03-12 18:13:33 +07:00
767bb770ca Re-order handlers in order to prevent CORS 2019-03-11 16:16:10 +01:00
bae3fb84b9 Download custom appliance symbols from GitHub
Fix symbol cache issue. Ref https://github.com/GNS3/gns3-gui/issues/2671
Fix temporary directory for symbols was not deleted
Fix temporary appliance file was not deleted
2019-03-11 16:55:16 +07:00
889d29ec55 Update appliances. 2019-03-11 09:48:54 +07:00
a221678448 Merge pull request #1545 from steffann/patch-1
Add vMX 17.4 and 18.4
2019-03-09 17:48:46 +07:00
20886bdd51 Update juniper-vmx-vfp.gns3a 2019-03-08 23:50:55 +01:00
089148e451 Update juniper-vmx-vcp.gns3a 2019-03-08 23:39:59 +01:00
d3ec2a7275 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-03-07 18:55:59 +07:00
2d01ef489b Option to export snapshots. 2019-03-07 18:55:38 +07:00
d64d7de541 Support tags versioned WebUI when bundling 2019-03-07 11:56:15 +01:00
372017f467 Merge pull request #1537 from GNS3/import-export-refactoring
Project import/export refactoring. Fixes #1349
2019-03-07 17:38:56 +07:00
826f6b2d57 Fix include images test. 2019-03-07 17:17:07 +07:00
0ae66a2608 Support selecting a compression type when exporting a project. 2019-03-07 17:05:32 +07:00
380224dca1 Change how VPCS executable is searched. 2019-03-06 23:15:05 +07:00
af80b0bb6e Use aiofiles where relevant. 2019-03-06 23:00:01 +07:00
b0df7ecabf Merge branch '2.2' into import-export-refactoring 2019-03-05 17:29:01 +07:00
4c83fc1243 Update paths for binaries moved to the MacOS directory in GNS3.app 2019-03-04 16:07:04 +07:00
69ba0ccf77 Bump version to 2.2.0dev2 2019-03-04 14:48:57 +07:00
0681c296a7 Merge pull request #1541 from GNS3/lock-unlock-items
Refactoring for locking/unlocking items
2019-03-02 16:44:28 +07:00
3f679bd106 Locked state should not be used when duplicating a node. 2019-03-02 16:39:05 +07:00
724eda1f35 Handle locking/unlocking items independently from the layer position. 2019-03-02 16:26:40 +07:00
3f7c4c0474 Update qemu_vm.py 2019-03-01 23:40:32 +07:00
5b6011a248 Stay with jsonschema 2.6.0 2019-03-01 17:26:23 +07:00
80eb06f67c Merge 2.1 into 2.2 2019-03-01 17:23:49 +07:00
9132ba8d05 Remove zipstream from tests. 2019-02-28 23:25:05 +07:00
85ea1cf7a9 Remove import zipstream from tests. 2019-02-28 17:50:09 +07:00
8cc8269842 Use aiozipstream for snapshots.
Fix tests.
2019-02-28 17:25:05 +07:00
52bfa636c1 Project duplication support. 2019-02-27 17:57:07 +07:00
4eca82174d Development on 2.1.15dev1 2019-02-27 15:59:16 +07:00
32f5dbb645 Release v2.1.14 2019-02-27 14:58:52 +07:00
7aae682f0a Fix issue when setting cpuid.corespersocket for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/2723 2019-02-27 14:47:45 +07:00
879e32eb9a Bump ACPI Shutdown Timeout to 120 seconds. Ref #1536 2019-02-26 23:19:33 +07:00
01481cde1f Development on 2.1.14dev1 2019-02-26 18:10:23 +07:00
b5deb9d177 Release v2.1.13 2019-02-26 16:46:02 +07:00
a8990c9e89 Non blocking project exportation. 2019-02-26 15:55:07 +07:00
e1aa13fa73 Force jsonschema dependency to 2.6.0
This is to fix this issue when starting the (frozen) application on Windows:

```
  File "C:\Python36-x64\lib\site-packages\jsonschema\validators.py", line 505, in <module>
  File "C:\Python36-x64\lib\site-packages\jsonschema\_utils.py", line 57, in load_schema
  File "C:\Python36-x64\lib\pkgutil.py", line 634, in get_data
OSError: [Errno 34] Result too large: 'jsonschema\\schemas\\draft6.json'
```
2019-02-26 15:28:11 +07:00
135d56371d Fix tests for project notifications. 2019-02-23 23:20:11 +07:00
7fe8f7e716 Fix long-polling request for project notifications. 2019-02-23 21:08:52 +07:00
10702f87bc Fix export test. 2019-02-23 11:13:50 +07:00
2fb5e47c8d Allow cloud nodes to be exported. Fixes #1519 2019-02-23 11:07:01 +07:00
4487e578bc Fix create a node from a template test. 2019-02-22 18:44:12 +07:00
5754747a90 Merging 2.1 into 2.2 2019-02-22 18:04:49 +07:00
62c51edbae Less aggressive connections to uBridge. Ref #1289 2019-02-22 16:05:31 +07:00
a13d063aa1 Fix topology images (Pictures) disappearing from projects. Fixes #1514. 2019-02-21 23:58:54 +07:00
1ef1872f8e Reset MAC addresses when duplicating a project. Fixes #1522 2019-02-20 16:38:43 +07:00
657698a961 Fix create a node from an appliance test. 2019-02-20 11:21:29 +07:00
081ba31b50 Fix API call to create a node from an appliance doesn't return the new node data. Fixes #1527 2019-02-20 10:47:33 +07:00
aea4ae808f Detect invalid environment variable and send a warning when creating a Docker node. Ref #2683 2019-02-19 17:34:10 +07:00
3e601a8a24 Merge pull request #1526 from GNS3/pyup-update-pytest-4.1.1-to-4.3.0
Update pytest to 4.3.0
2019-02-19 15:57:13 +07:00
ae3515434c Do not export/import symlinks for projects. Fixes #2699 2019-02-19 12:43:44 +07:00
8e2d8f3962 Update pytest from 4.1.1 to 4.3.0 2019-02-19 04:27:57 +01:00
589c9754e8 Fix symlink not being created for duplicated IOU devices. Fixes https://github.com/GNS3/gns3-gui/issues/2699 2019-02-19 00:09:59 +08:00
4ecd3b2015 Configure coresPerSocket value in VMX file for the GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/2688 2019-02-17 23:16:48 +08:00
84ee3263ba Count logical CPUs to detect if the number of vCPUs is too high when configuring the GNS3 VM. Fixes #2688. 2019-02-17 23:07:33 +08:00
174624121d Fix Qemu VM tests. Ref #1516 2019-02-17 19:53:46 +08:00
d9a9abf845 Add explicit error when trying to pull a Docker image from Docker Hub without Internet access. Fixes #1506. 2019-02-17 19:21:21 +08:00
0b07299472 Fixes double display output in GRUB in QEMU v3.1. Fixes #1516. 2019-02-17 19:03:36 +08:00
f7d0f54b6d Use production env for bundled web-ui 2019-01-29 10:02:39 +01:00
96dce2ec82 Release v2.2.0a1 2019-01-29 14:47:09 +08:00
117a1ac6da Restore reload support for nodes. 2019-01-24 16:51:14 +08:00
7fb192699b Development on 2.1.13dev1 2019-01-23 15:42:10 +08:00
bccdfc97d1 Release 2.1.12 2019-01-23 15:40:38 +08:00
792c4310eb Merge pull request #1502 from GNS3/svg-symbols-fixes
Tune how to get the size of SVG images.
2019-01-22 00:41:26 +07:00
3e21f96bf9 Fix indentation issue. Ref https://github.com/GNS3/gns3-gui/issues/2674
(cherry picked from commit c14d79a3d5)
2019-01-21 23:51:46 +07:00
5f932fee9f Tune how to get the size of SVG images. Ref https://github.com/GNS3/gns3-gui/issues/2674.
* Default for missing height/width is "100%" as defined in the SVG specification
* Better error message, if viewBox attribute is missing
* Removal of "%" in percent more fault tolerant by using rstrip("%")

(cherry picked from commit e3757a8955)
2019-01-21 23:49:43 +07:00
c14d79a3d5 Fix indentation issue. Ref https://github.com/GNS3/gns3-gui/issues/2674 2019-01-21 16:24:23 +07:00
e3757a8955 Tune how to get the size of SVG images. Ref https://github.com/GNS3/gns3-gui/issues/2674.
* Default for missing height/width is "100%" as defined in the SVG specification
* Better error message, if viewBox attribute is missing
* Removal of "%" in percent more fault tolerant by using rstrip("%")
2019-01-21 16:01:03 +07:00
456ef1348b Fix DeprecationWarning: invalid escape sequence. Fixes https://github.com/GNS3/gns3-gui/issues/2670 2019-01-17 18:01:58 +07:00
4b52e9313e Fix issue with coroutine not awaited. Fixes #1499 2019-01-17 17:43:09 +07:00
474025175e Remove "deprecated" node for VirtualBox based GNS3 VM support. Ref #1377 2019-01-16 19:22:16 +07:00
191036e266 Fix wrong controller method call. 2019-01-14 17:20:11 +07:00
8360ae98b1 Move appliance and template management code in their own classes. 2019-01-14 16:09:06 +07:00
5a3929f01a Merge pull request #1497 from GNS3/pyup-update-pytest-4.1.0-to-4.1.1
Update pytest to 4.1.1
2019-01-13 12:53:54 +07:00
aed6ea3aa0 Update pytest from 4.1.0 to 4.1.1 2019-01-12 21:59:44 +01:00
95f91bde19 Merge pull request #1496 from GNS3/pyup-update-aiohttp-3.5.3-to-3.5.4
Update aiohttp to 3.5.4
2019-01-12 17:35:49 +07:00
7c288fc61b Update aiohttp from 3.5.3 to 3.5.4 2019-01-12 11:34:10 +01:00
12a4f95a8f Update appliance files. 2019-01-12 17:33:53 +07:00
c6afea49da Try to delete saved VM state only if a snapshot has been saved. 2019-01-12 17:04:37 +07:00
bb284d082a Set socket options SO_KEEPALIVE and TCP_NODELAY for embedded Telnet server. Ref #1335 2019-01-12 16:50:15 +07:00
a896346c77 Fix issue with notification queue that prevented to properly close projects. Fix #1493 2019-01-12 16:02:36 +07:00
161c05a310 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-01-12 12:13:40 +07:00
f0ffb07165 Fix issue with "usage" variable for Dynamips VMs. Fixes #1495 2019-01-12 12:13:22 +07:00
ce048c6a00 Merge pull request #1494 from GNS3/pyup-update-aiohttp-3.5.2-to-3.5.3
Update aiohttp to 3.5.3
2019-01-11 19:47:24 +08:00
289eee968e Update aiohttp from 3.5.2 to 3.5.3 2019-01-11 08:59:41 +01:00
b68c0cf176 Merge pull request #1491 from GNS3/pyup-update-pytest-4.0.2-to-4.1.0
Update pytest to 4.1.0
2019-01-10 09:55:09 +07:00
b20f2a116b Merge pull request #1492 from GNS3/pyup-update-aiohttp-3.5.1-to-3.5.2
Update aiohttp to 3.5.2
2019-01-10 09:54:54 +07:00
cdb7eea888 Update aiohttp from 3.5.1 to 3.5.2 2019-01-08 22:29:49 +01:00
b1123acb8a Update pytest from 4.0.2 to 4.1.0 2019-01-06 23:05:37 +01:00
c736051dda Fix tests. 2018-12-30 21:50:47 +07:00
9ed181151f New node information dialog to display general, usage and command line information.
Ref https://github.com/GNS3/gns3-gui/issues/2662 https://github.com/GNS3/gns3-gui/issues/2656
2018-12-30 19:35:24 +07:00
40f8a33331 Merge pull request #1489 from GNS3/pyup-update-sphinx-1.8.2-to-1.8.3
Update sphinx to 1.8.3
2018-12-27 00:50:23 +07:00
2a1822fe12 Update sphinx from 1.8.2 to 1.8.3 2018-12-25 22:19:11 +01:00
b66e42e650 Merge pull request #1488 from GNS3/pyup-update-aiohttp-3.5.0-to-3.5.1
Update aiohttp to 3.5.1
2018-12-25 19:21:15 +07:00
485b8a3db4 Update aiohttp from 3.5.0 to 3.5.1 2018-12-25 08:44:09 +01:00
eacc20cf07 Merge pull request #1487 from GNS3/pyup-update-aiohttp-3.4.4-to-3.5.0
Update aiohttp to 3.5.0
2018-12-24 17:48:10 +07:00
e1c250a8dd Update aiohttp from 3.4.4 to 3.5.0 2018-12-23 10:14:05 +01:00
eae9774d69 Support "usage" field for Dynamips, IOU, VirtualBox and VMware. Fixes https://github.com/GNS3/gns3-gui/issues/2657 2018-12-21 16:54:13 +08:00
468145319d Merge 2.1 into 2.2 branch. 2018-12-21 15:24:34 +08:00
ef38ccfefa Automatically create a symbolic link to the IOU image in the IOU working directory. Fixes #1484 2018-12-17 22:42:18 -06:00
670b6d689a Merge remote-tracking branch 'origin/2.1' into 2.1 2018-12-14 19:53:51 -06:00
fc75a6b8d3 Fix link pause/filters only work for the first interface of Docker containers. Fixes #1482 2018-12-14 19:53:43 -06:00
ed7b91ae3a Merge pull request #1481 from GNS3/pyup-update-pytest-4.0.1-to-4.0.2
Update pytest to 4.0.2
2018-12-14 11:49:43 -06:00
d79f6b578d Update pytest from 4.0.1 to 4.0.2 2018-12-14 18:21:49 +01:00
f76b329cba Fix ConnectionResetError issues and switch to aiohttp version 3.4.4. Fixes #1474. 2018-12-03 19:14:22 +08:00
030714ae80 Fix server authentication. 2018-12-03 18:46:24 +08:00
0fd54536d2 Fix issue when there is no gns3_controller.conf. Fixes https://github.com/GNS3/gns3-gui/issues/2644 2018-11-30 19:09:10 +08:00
58b2ee152d Fix Docker console test. 2018-11-30 18:59:02 +08:00
bec2270334 Fix non responsive console for Docker VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2645 2018-11-30 17:06:21 +08:00
56412b35e0 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/utils/asyncio/telnet_server.py
2018-11-30 12:38:02 +08:00
9fbdb25da8 Back to classic symbol theme. Ref https://github.com/GNS3/gns3-gui/issues/2644 2018-11-29 17:14:21 +08:00
647ac87c89 Merge pull request #1476 from ddragic/x11vnc
Docker: fix x11vnc not starting
2018-11-29 07:03:58 +07:00
817a053dfc docker_vm: fix x11vnc not starting 2018-11-29 00:37:20 +01:00
fb0456fdfa Merge pull request #1475 from GNS3/naming-consistency
Review and apply consistent naming
2018-11-28 16:32:42 +07:00
d7c2e16c21 Use "template" to name what we use to create new nodes. 2018-11-28 16:12:58 +07:00
21c0a35f77 Use project instead of topology where appropriate. 2018-11-27 18:30:16 +07:00
a17fa821bd Make sure nothing is named "compute server". 2018-11-27 18:14:51 +07:00
b4a2bc5b47 Merge pull request #1467 from GNS3/symbol-themes
Support symbol themes. Ref #1466
2018-11-27 17:19:52 +07:00
f39c27ff7b Allow usage property in Docker appliance. 2018-11-27 16:36:52 +07:00
db982f5df7 Merge pull request #1473 from GNS3/kazkansouh-2.2-grid-new-project
Improved grid support
2018-11-27 16:34:00 +07:00
a93606d9ed Use "node" instead of "appliance" for grid support. 2018-11-27 16:13:22 +07:00
dd14101eec Merge branch '2.2-grid-new-project' of git://github.com/kazkansouh/gns3-server into kazkansouh-2.2-grid-new-project 2018-11-27 15:50:24 +07:00
83161bcdd4 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-11-27 15:47:29 +07:00
df4e4bec24 Merge pull request #1472 from GNS3/docker-console-resize
Telnet console resize support for Docker VM. Fixes #1471
2018-11-27 15:17:34 +07:00
60ac6d2dfe Telnet console resize support for Docker VM. 2018-11-27 15:06:56 +07:00
1067f71952 Allow appliances to be loaded from file without the appliance id.
Fixes https://github.com/GNS3/gns3-gui/issues/2639.
2018-11-27 14:03:12 +07:00
8eb20525e8 Update schema to allow for drawing grid size to be part of project. 2018-11-26 15:31:28 +00:00
c0a0a13bdd Avoid _fix_permissions() to be called twice when stopping Docker VM. Ref #1428 2018-11-26 15:53:24 +07:00
a3044ede77 Fix _fix_permissions() garbles permissions in Docker VM. Ref #1428 2018-11-25 17:11:42 +07:00
df3baffd9b Fix "None is not of type 'integer'" when opening project containing a Qemu VM. Fixes #2610. 2018-11-24 19:56:29 +07:00
219c346187 Remove useless warning. 2018-11-24 17:04:16 +07:00
6a2d1e9b33 Merge pull request #1465 from GNS3/pyup-update-pytest-4.0.0-to-4.0.1
Update pytest to 4.0.1
2018-11-24 16:08:58 +07:00
e2231b1220 Update pytest from 4.0.0 to 4.0.1 2018-11-24 09:21:06 +01:00
e0813bfbe8 Normalize symbol ID on Windows. 2018-11-23 18:47:42 +07:00
9f7f26700e Debugging for Windows. 2018-11-23 18:33:45 +07:00
51787295dd Use POSIX path for symbol ID. 2018-11-23 18:26:04 +07:00
17d070dca7 Early support for symbol themes. 2018-11-23 17:27:10 +07:00
301b7475f7 Sync appliances 2018-11-21 14:13:14 +07:00
f442c6e9e1 Sync appliances 2018-11-21 14:12:38 +07:00
2a3825543a Merge pull request #1450 from GNS3/pyup-update-sphinx-1.7.1-to-1.8.2
Update sphinx to 1.8.2
2018-11-20 17:13:53 +07:00
df0f0c5b83 Merge branch '2.2' into pyup-update-sphinx-1.7.1-to-1.8.2 2018-11-20 17:06:42 +07:00
2e79da5fe1 Fix broken examples in API documentation. 2018-11-20 16:24:59 +07:00
4e2b8bfe7c Add more information about appliances to the API documentation. 2018-11-20 16:21:33 +07:00
68ecbffcf1 Use Python3.6 to build the API documentation. 2018-11-20 15:35:46 +07:00
1289d20a14 Add missing files for API documentation. 2018-11-20 15:19:44 +07:00
53928b884f Bump version to 2.2.0dev5 2018-11-20 14:37:38 +07:00
bc5eda8259 Restore previously removed test. 2018-11-20 14:36:18 +07:00
ff5ba3742e Update API documentation for appliance endpoints. Ref https://github.com/GNS3/gns3-gui/issues/2630 2018-11-20 13:04:27 +07:00
e5950674f8 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-11-20 00:22:35 +07:00
5cb0957f35 Require privileged access for uBridge when using VMware VMs and Docker containers. Fixes #1461. 2018-11-20 00:22:16 +07:00
7385d67c39 Merge pull request #1457 from GNS3/pyup-update-pytest-timeout-1.2.1-to-1.3.3
Update pytest-timeout to 1.3.3
2018-11-19 17:49:46 +07:00
e8cb8d29d8 Merge pull request #1454 from GNS3/pyup-update-pytest-3.8.1-to-4.0.0
Update pytest to 4.0.0
2018-11-19 17:49:10 +07:00
3fae6ada95 Only require privileged access for uBridge when connecting a cloud to an Ethernet/TAP interface. Fixes #1461. 2018-11-19 17:33:17 +07:00
ca6a0708a8 Merge pull request #1462 from GNS3/use-files-as-disk-images
Allow virtual machines to use files in project directory as disk images.
2018-11-19 16:41:36 +07:00
3727487730 Fix test on Windows. 2018-11-19 16:09:39 +07:00
3497deaa31 Allow virtual machines to use files in project directory as disk images. 2018-11-19 15:53:43 +07:00
3861d6a274 Merge pull request #1459 from GNS3/duplicate-appliance
Support to duplicate an appliance via API. Fixes https://github.com/GNS3/gns3-gui/issues/2618
2018-11-18 17:57:10 +07:00
bd657c0167 Support to duplicate an appliance. 2018-11-18 17:05:16 +07:00
9b83b087cb Fix mac address schema validation for Qemu VM appliance. Fixes https://github.com/GNS3/gns3-gui/issues/2629 2018-11-18 16:20:50 +07:00
a33b8eac3a Support "L1 keepalives" in IOU appliance schema. 2018-11-18 16:04:08 +07:00
c7b8c347d7 Remove problematic test when run on Travis. 2018-11-18 00:08:40 +07:00
53f3821d41 Change test that randomly fails on Travis. 2018-11-17 23:23:28 +07:00
3512fde841 Fix small bugs when using the new appliance management API. 2018-11-17 22:16:18 +07:00
74e1463015 Fix bug with custom adapters and categories for Docker VM. Fixes https://github.com/GNS3/gns3-gui/issues/2613 2018-11-17 21:50:00 +07:00
aa4593c993 Handle custom adapters in schemas. 2018-11-17 20:09:34 +07:00
82140c082c Merge pull request #1458 from GNS3/appliance-default-settings
Apply default settings when adding an appliance via API. Fixes #1456
2018-11-17 19:39:34 +07:00
499ab9844a Reorganize how appliance creation is validated against JSON schemas.
This allows for clearer error messages when validation fails.
2018-11-17 18:12:46 +07:00
71fcf855b4 Add tests for all appliance types. 2018-11-17 15:37:20 +07:00
627c7e9cfe Use schema to set appliance default values and better schema validation error messages. 2018-11-16 23:02:10 +07:00
f486f07a61 Update pytest-timeout from 1.2.1 to 1.3.3 2018-11-16 13:11:49 +01:00
1acc7777f9 Merge pull request #1455 from GNS3/appliance-api
New appliance management API. Fixes #1427
2018-11-15 22:52:18 +07:00
1184f29b90 Add appliance API tests. Ref #1427. 2018-11-15 21:34:36 +07:00
9aafa4e62f Schema validation for appliance API. Ref #1427. 2018-11-15 17:28:17 +07:00
bb3edfe779 Update pytest from 3.8.1 to 4.0.0 2018-11-15 00:57:47 +01:00
98f04365b7 Remove generic controller settings API endpoint. 2018-11-14 16:24:30 +08:00
cebb56387a Fix tests. 2018-11-13 15:40:18 +08:00
f91d3c9dbb Merge branch '2.2' into appliance-api 2018-11-13 14:59:55 +08:00
089fdff4f1 Working dedicated appliance management API. Ref https://github.com/GNS3/gns3-server/issues/1427 2018-11-13 14:59:18 +08:00
e7b8309a80 Fix Docker VNC tests. Ref #1438 2018-11-11 23:25:23 +08:00
d45d52f15c Support Xtigervnc restart. 2018-11-11 23:23:30 +08:00
029344da14 Only require Xtigervnc or Xvfb+x11vnc for Docker with vnc console. Ref #1438 2018-11-11 22:33:58 +08:00
36474f7bab Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
2018-11-11 22:31:29 +08:00
d0bab9947e Support tigervnc in Docker VM. Ref #1438 2018-11-11 21:07:33 +08:00
f0fe9d39fa Base for dedicated appliance management API. Ref https://github.com/GNS3/gns3-server/issues/1427 2018-11-11 20:13:58 +08:00
887b32c4bc Merge remote-tracking branch 'origin/2.2' into 2.2 2018-11-11 20:08:37 +08:00
f03ba5ca0b Update appliance templates. 2018-11-11 20:08:13 +08:00
97758a09f4 Update sphinx from 1.7.1 to 1.8.2 2018-11-11 12:59:41 +01:00
41fbbf7a56 Reorder routes in order to get working CORS 2018-11-08 11:47:09 +01:00
fcd102317a Merge pull request #1448 from GNS3/disable-cors-cache
Disable CORS cache, Fixes: #1445
2018-11-06 13:38:43 +01:00
7bc67cb41f Merge pull request #1447 from GNS3/wrong-cors-response
Fix CORS response on node deletion, Fixes: #1446
2018-11-06 13:38:01 +01:00
249b2255f6 Fix CORS response on node deletion, Fixes: #1446 2018-11-06 13:37:03 +01:00
78c693ff63 Disable CORS cache, Fixes: #1445 2018-11-06 13:31:14 +01:00
b858664985 Merge pull request #1444 from alfredmyers/patch-1
Fixed typos on README.rst
2018-11-05 21:23:30 +07:00
78fe929e0c Fixed typos on README.rst 2018-11-05 09:59:29 -02:00
2764828f38 Refactor how clients access PCAP capture files. Fixes https://github.com/GNS3/gns3-gui/issues/2438.
* The PCAP file is directly accessed if controller and client are on the same host.
* The PCAP file is streamed from the compute server to the client with the controller as a proxy when the controller is remote for the client.
2018-10-27 14:47:17 +07:00
bf1b801cc0 Remove static dir configuration 2018-10-24 09:04:05 +02:00
4158edf8e2 Merge pull request #1435 from GNS3/fix-put-cors-for-nodes
FIX PUT CORS for nodes, Fixes: #1434
2018-10-23 12:41:14 +02:00
fa5571ced1 FIX PUT CORS for nodes, Fixes: #1434 2018-10-23 11:09:38 +02:00
df36d8377d Fix more tests. 2018-10-17 17:40:25 +07:00
ab8dc52ece Fix tests to work with new version of aiohttp (>= 3.0) 2018-10-17 17:32:10 +07:00
9ae9209881 Update appliance templates. 2018-10-16 16:20:37 +07:00
86f87aec74 Fix installation with Python 3.7. Fixes #1414.
Fix deprecated use of aiohttp.Timeout. Fixes #1296.
Use "async with" with aiohttp.ClientSession().
Make sure websocket connections are properly closed, see https://docs.aiohttp.org/en/stable/web_advanced.html#graceful-shutdown
Finish to drop Python 3.4.
2018-10-16 15:56:06 +07:00
8217f65e97 Do not test with Python 3.4 on Travis. 2018-10-15 17:08:18 +07:00
de5934f818 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-10-15 17:06:25 +07:00
76af98404a Drop Python 3.4 and switch to async / await syntax for asyncio. Fixes #1425 2018-10-15 17:05:49 +07:00
93b6c0e49d Merge pull request #1421 from kazkansouh/2.2-update-docker-init-path
Support for using other dhcp clients in docker init.sh
2018-10-07 04:35:48 +02:00
14fb64b941 Added "/sbin" to init script PATH variable so that its possible to
use more sophosticated dhcp clients (compared to the udhcpc that is
provided by busybox) by installing them into the docker image in
the normal way.
2018-10-06 16:06:24 +01:00
8baa480b79 Fix tests. 2018-10-06 21:57:03 +08:00
97c68f56bf Notify users if x11vnc process has crashed. Fix #1401. 2018-10-06 21:30:39 +08:00
22f7ca0243 Return compute port information via API. Ref #1420. 2018-10-05 12:48:20 +02:00
eb97ebf311 Fix platform.linux_distribution() is deprecated. Fixes https://github.com/GNS3/gns3-gui/issues/2578 2018-10-04 16:32:49 +02:00
de5a6ca8c7 Merge remote-tracking branch 'origin/2.2' into 2.2 2018-10-04 15:44:29 +02:00
9de13c570c Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/builtin/nodes/cloud.py
#	gns3server/compute/docker/docker_vm.py
#	gns3server/compute/dynamips/nodes/ethernet_switch.py
#	gns3server/compute/iou/iou_vm.py
#	gns3server/compute/qemu/qemu_vm.py
#	gns3server/compute/virtualbox/virtualbox_vm.py
#	gns3server/compute/vmware/vmware_vm.py
#	gns3server/controller/__init__.py
#	gns3server/version.py
#	gns3server/web/web_server.py
2018-10-04 15:44:13 +02:00
e4a6db8ebc Fix some typos. 2018-10-04 15:22:42 +02:00
181a31be32 Update minimum VIX version requirements for VMware. Ref #1415. 2018-10-02 11:22:32 +02:00
8d368cd0f6 Development on 2.1.12dev1 2018-09-28 20:50:03 +02:00
41d4ecc4b7 Release v2.1.11 2018-09-28 20:47:44 +02:00
4d95e0b51f Catch some exceptions. 2018-09-28 15:04:38 +02:00
0b919aa8c9 Merge pull request #1411 from GNS3/pyup-update-pytest-3.4.2-to-3.8.1
Update pytest to 3.8.1
2018-09-27 22:23:49 +02:00
b10d79c37a Update pytest from 3.4.2 to 3.8.1 2018-09-27 21:59:19 +02:00
4efdefaf5a Development on 2.1.11dev1 2018-09-15 11:23:18 +02:00
b6b345508b Release v2.1.10 2018-09-15 11:19:55 +02:00
5d2e539193 Update appliances. 2018-09-14 22:18:13 +02:00
eb0e26b55f Include locale information and GNS3 VM version in crash reports. 2018-09-12 15:38:20 +02:00
17d657c919 Fix small errors like unhandled exceptions etc. 2018-09-11 15:06:01 +02:00
0aa9ab53d1 Import encodings.idna to avoid LookupError when standard library is in a zip file. 2018-09-07 09:34:17 +02:00
4021a13651 Catch exceptions in various locations to fix small issues reported by Sentry. 2018-09-06 09:49:12 +02:00
341e2e2e3a Check if serial pipe can be opened for VMware and VirtualBox VMs. 2018-09-06 07:02:32 +02:00
f8ecd61a98 Notify users if xvfb process or x11vnc process have crashed. Ref #1401. 2018-09-05 15:16:07 +08:00
c620d0be84 Improve the invalid port format detection. Fixes https://github.com/GNS3/gns3-gui/issues/2580 2018-09-05 13:35:42 +08:00
abfbadecd6 Update aiohttp verion requirement in order to support Python 3.7. Fixes https://github.com/GNS3/gns3-gui/issues/2566 2018-09-02 20:41:45 +07:00
4a6202fa84 Update setup.py and fix minor issues. 2018-09-02 15:32:33 +07:00
f89d645b56 Update appliances. 2018-08-31 19:33:03 +07:00
6822ff65a2 Disable static directory. Ref https://github.com/GNS3/gns3-gui/issues/2558. 2018-08-30 17:34:26 +07:00
ef4db112f1 Fix typo. 2018-08-29 17:27:24 +07:00
86be4f98f1 Fix wrong call after merging. 2018-08-29 16:22:37 +07:00
3c332b895d Fix tests after merging. 2018-08-29 16:08:08 +07:00
33e8710495 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/controller/compute.py
#	gns3server/controller/gns3vm/__init__.py
#	gns3server/controller/link.py
#	gns3server/controller/project.py
#	gns3server/handlers/api/controller/project_handler.py
#	gns3server/handlers/api/controller/server_handler.py
#	gns3server/utils/asyncio/__init__.py
#	gns3server/utils/asyncio/telnet_server.py
#	gns3server/version.py
#	gns3server/web/web_server.py
#	tests/compute/qemu/test_qemu_vm.py
2018-08-29 15:57:54 +07:00
8e90d79399 Upgrade remote install script to use any ubuntu codename. Fixes #1393. 2018-08-28 17:41:06 +07:00
78d0284247 Merge remote-tracking branch 'origin/master' 2018-08-28 17:27:18 +07:00
57cb457b5d Use port 80 for key server. 2018-08-28 17:27:08 +07:00
b7dd8b5176 Catch asyncio.CancelledError when shutting down the server. 2018-08-28 17:10:24 +07:00
00cf66fb0f Report GNS3 VM errors to the GUI server summary. Ref #1359. 2018-08-28 15:42:06 +07:00
8d4e73d23c Replace vboxnet0 (if it does not exist) by the first available vboxnet interface on Windows. Fixes https://github.com/GNS3/gns3-vm/issues/102 2018-08-26 03:28:38 -07:00
4e712280b3 Merge remote-tracking branch 'origin/2.1' into 2.1 2018-08-26 02:44:01 -07:00
4d57a3befa Check if the VirtualBox host-only network exists when starting a GNS3 VM running on VirtualBox. Ref https://github.com/GNS3/gns3-vm/issues/102 2018-08-26 02:43:40 -07:00
38b72079b2 Change file timestamps if necessary because ZIP does not support timestamps before 1980. Fixes #1360. 2018-08-25 18:10:40 +07:00
814526ba26 Add missing coroutine decorator Ref https://github.com/GNS3/gns3-gui/issues/2566 2018-08-25 16:00:40 +07:00
f5dc635baa Fix test to support Python 3.7 Ref https://github.com/GNS3/gns3-gui/issues/2566 2018-08-25 15:50:08 +07:00
902de3dd47 Refactor asyncio locking system for Python 3.7 support. Ref https://github.com/GNS3/gns3-gui/issues/2566 Ref https://github.com/GNS3/gns3-gui/issues/2568 2018-08-25 14:10:47 +07:00
ad9b6f42bf Test with Python 3.7 on Travis. 2018-08-24 18:59:10 +07:00
3560cda06c Use asyncio.ensure_future() instead of asyncio.async() with conservative approach to support Python < 3.4.4. Fixes https://github.com/GNS3/gns3-gui/issues/2566 2018-08-24 18:57:18 +07:00
a3d1e865a8 Replace asyncio.async() by asyncio.ensure_future() in tests. Ref #2566. 2018-08-24 18:52:15 +07:00
089d25c79d Forbid controller and compute servers to be different versions.
Report last compute server error to clients and display in the server summary.
2018-08-22 16:54:43 +07:00
59ce105a50 Fix exception with short names for Dynamips interfaces. Fixes #1386. 2018-08-21 19:46:14 +07:00
aeb33024ca Add missing Qemu boot priority values. Fixes https://github.com/GNS3/gns3-server/issues/1385 2018-08-21 17:49:58 +07:00
9ef23ce6a8 Include HTTP error code when reporting an error while download appliance templates
from GitHub repository.
2018-08-21 17:30:34 +07:00
b7f9b865c8 Optimize appliance templates update from GitHub repository by only downloading when the repository
has been updated. Ref https://github.com/GNS3/gns3-gui/issues/2490
2018-08-21 16:26:07 +07:00
651d8280a7 Fix appliance template tests. 2018-08-19 19:35:45 +07:00
5958a23557 Update appliance templates from online registry. Ref #2490. 2018-08-19 16:02:47 +07:00
a78ee18977 Update appliance templates. 2018-08-18 16:49:21 +07:00
1e33e94c15 Add missing doc pages. 2018-08-16 21:50:54 +07:00
8699f2e2b0 Update docs for controller_notifications and project_notifications. 2018-08-16 21:40:51 +07:00
7f72b90b0e The server has now 2 notification streams
* A new one for controller related events (compute, appliance templates etc.)
* The existing one for project related events (links, nodes etc.)
2018-08-16 21:31:57 +07:00
dac3ba19b7 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/controller/ports/port_factory.py
2018-08-13 22:06:44 +07:00
c593785c6d Development on 2.1.10dev1 2018-08-13 13:50:43 +02:00
689a82a180 Release v2.1.9 2018-08-13 13:13:46 +02:00
23e83b730b Fix some more problems with interface short names. Fixes https://github.com/GNS3/gns3-gui/issues/2562 2018-08-13 15:45:24 +07:00
e5d38811ca Fix incorrect short port names in topology summary. Fixes https://github.com/GNS3/gns3-gui/issues/2562 2018-08-13 15:10:21 +07:00
daa2de4541 Allow custom symbols to be sub-directories. 2018-08-13 00:16:02 +07:00
29620f4ea3 Add affinity symbols. Ref https://github.com/GNS3/gns3-gui/issues/2488 2018-08-12 22:08:48 +07:00
1fd010484d ACPI shutdown for GNS3 VM running on Hyper-V. Ref https://github.com/GNS3/gns3-gui/issues/763 2018-08-12 17:11:32 +07:00
c48eebcc5d Hyper-V support for GNS3 VM. Fixes https://github.com/GNS3/gns3-gui/issues/763 2018-08-12 16:49:24 +07:00
c0521732a9 Get IP address from guest Hyper-V VM. Ref https://github.com/GNS3/gns3-gui/issues/763 2018-08-12 01:49:48 -07:00
7a9625744c Merge pull request #1384 from BrentBaccala/pull-2
add appliance data for Cisco Nexus 9000v NX-OS 7.0(3)I7(3)
2018-08-11 12:55:19 +07:00
470133b096 add appliance data for Cisco Nexus 9000v NX-OS 7.0(3)I7(3) 2018-08-10 16:40:23 -04:00
c9767a06b3 Early Hyper-V support to run the GNS3 VM. Ref https://github.com/GNS3/gns3-gui/issues/763. 2018-08-10 16:18:14 +07:00
652d5788c3 Fix tests. 2018-08-09 18:14:38 +07:00
89f7169589 Add appliance UUID added to the node data. Fixes #1334. 2018-08-09 17:45:33 +07:00
a54359d243 Clean GNS3 close if one remote server is down. Fixes #1357. 2018-08-09 16:59:10 +07:00
e3c8c9d484 Mark VirtualBox support for running the GNS3 VM as deprecated. Ref #1377. 2018-08-08 15:02:31 +07:00
cc52a6a6b5 Change default z value for nodes to 1 2018-08-08 14:33:10 +07:00
033f005bde Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/docker/docker_vm.py
#	gns3server/version.py
2018-08-07 21:06:42 +07:00
12e71a2917 Set lower process priority when computing idle-pc value on Windows. Ref #2522. 2018-08-07 19:31:33 +07:00
17e51fdac6 Merge remote-tracking branch 'origin/2.1' into 2.1 2018-07-26 13:35:57 -05:00
d0ed6931d8 Catch exception: ZIP does not support timestamps before 1980. Ref #1360. 2018-07-26 13:34:23 -05:00
c274be1135 Sync appliances 2018-07-13 12:42:43 +02:00
a494f8257b Merge pull request #1368 from sbraz/typing
Require typing only for Python < 3.5
2018-07-13 11:34:30 +08:00
2a1b9e7232 Require typing only for Python < 3.5 2018-07-12 23:43:27 +02:00
1cc1ccd511 Re-enable static directory 2018-07-02 09:25:39 +02:00
ec8cfcd0f9 Disable static/ dir, Ref: #2532 2018-06-29 14:31:19 +02:00
dd845eb096 Fix tests on Windows 2018-06-28 09:16:51 +02:00
41026c74c1 Use mocked dir for web-ui redirection test 2018-06-26 13:13:19 +02:00
7d75b6248d Use mocked dir of web-ui for tests 2018-06-26 12:53:39 +02:00
21780fa2ed Gitkeep for web-ui directory 2018-06-26 12:26:04 +02:00
aed1989cdf Merge pull request #1364 from GNS3/bundled-web-ui
Serve WebUI handlers and update-bundled-web-ui script
2018-06-26 12:10:11 +02:00
0e1f2e26d0 Serve WebUI handlers and update-bundled-web-ui script, Ref: #1362 2018-06-26 12:09:08 +02:00
6dc2ae8641 Clear script 2018-06-22 15:30:24 +02:00
867e997b74 Support /static/ files serving, Ref: #1362 2018-06-22 15:29:47 +02:00
e20e885d44 Release v2.1.8 2018-06-14 15:17:08 +02:00
893e9c4749 'caplog.text()' syntax is deprecated, use 'caplog.text' property instead. 2018-06-14 17:15:24 +08:00
b68041e4e3 Remove problematic pytest-capturelog dev dependency. 2018-06-14 17:09:15 +08:00
84865ac3d6 Fix dev requirement. 2018-06-14 16:55:48 +08:00
0f496907a0 Fix API status code for start/stop/suspend/reload a node. Fixes #1353.
Fix issues with test.
Update documentation.
2018-06-14 16:39:32 +08:00
f3b4cc0160 Fix tests 2018-06-13 19:16:43 +02:00
ac73c72727 Don't send variables to computes where are empty, Ref: #1340 2018-06-13 18:55:47 +02:00
2e586f56ca Development on v2.1.8dev1 2018-06-12 11:15:06 +02:00
0b742fc43d Release v2.1.7 2018-06-12 11:12:59 +02:00
72cc3961dd Merge pull request #1351 from acaudwell/udp-ports-fix
Don't release NIO UDP ports when updating docker container.
2018-06-11 22:36:17 +07:00
b2e0a1b291 Don't release NIO UDP ports when updating docker container.
When a docker container was updated, the NIO UDP ports were being released
from port_manager, but they were still stored in self._ethernet_adapters.
When the container was restarted, the same NIO ports would be used. However,
if a new connection was then added, it could assign a port that was already
in use. The end result was that traffic would be bridged across the wrong
interface connection.
2018-06-11 15:17:13 +12:00
96d5e351f7 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	requirements.txt
2018-06-10 21:19:55 +07:00
45edc40948 Timeout for stream file. 2018-06-10 21:18:16 +07:00
1550c7bee7 Fix cloud tests. 2018-06-10 17:56:56 +07:00
1f017a0d1d Console support for clouds (to connect to external devices or services). 2018-06-10 17:43:29 +07:00
34fcbd68f3 Fix switching console type from telnet to VNC throws error. 2018-06-09 22:08:30 +07:00
40151cd1fe Fix switching console type from telnet to VNC throws error. Fixes #2489. 2018-06-09 21:47:36 +07:00
1905a99ce7 Fix saved VM state was not deleted correctly. 2018-06-09 17:28:26 +07:00
6caf38206c Fix tests. 2018-06-07 22:37:29 +07:00
8851a55199 Fix timeout error with "save as" for large projects. 2018-06-07 22:26:23 +07:00
c18d855a10 Merge branch '2.1' of github.com:GNS3/gns3-server into 2.1 2018-06-07 11:58:30 +02:00
ae0c362427 Merge pull request #1348 from ehlers/api-docs
Update API documentation
2018-06-07 15:57:11 +07:00
60a3ab87dc Update API documentation 2018-06-07 10:26:06 +02:00
62f87de23a Add API endpoint to return all links attached to a node. 2018-06-06 20:46:44 +07:00
70cbc0260b Merge pull request #1347 from AlyssonOliveira/fix_requirements.txt_to_hold_prompt-toolkit_1.0.15
Hold prompt-toolkit==1.0.15 to fix https://github.com/GNS3/gns3-serve…
2018-06-06 18:57:02 +07:00
c3c298cd63 Hold prompt-toolkit==1.0.15 to fix https://github.com/GNS3/gns3-server/issues/1346 2018-06-06 08:37:50 -03:00
fd5df0052a Fix issue with some SVG symbols that could not be used in GNS3.
This was due to the height and width values being percentages.
2018-06-06 16:32:51 +07:00
19c5ff8521 Show correct free disk space value. 2018-06-06 14:59:44 +07:00
31a268e756 Force prompt-toolkit to version 1.0.15 2018-06-06 01:36:43 +07:00
7f27cb7015 Update requirements.txt 2018-06-06 01:34:05 +07:00
fbfa75830e Bump version to 2.1.7dev1 2018-06-05 16:46:11 +07:00
f8bf749577 Remove unwanted trailing characters and other white spaces when reading .md5sum files. 2018-06-05 00:01:20 +07:00
d1ccf3bc84 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	requirements.txt
2018-06-04 22:46:52 +07:00
051eedb406 Change order to find vnetlib on Windows (PATH -> Registry -> Default directories). 2018-06-04 21:57:34 +07:00
e026c6415e Add dev1 to the version 2018-05-24 13:11:57 +02:00
b0c89a4f2c Development on v2.1.7dev1 2018-05-22 14:14:31 +02:00
eafe27e684 Release v2.1.6 2018-05-22 14:11:48 +02:00
c52342907a Merge pull request #1332 from GNS3/global-vars
Docker `ExtraHosts`, global variables for project and supplier support, Fixes: #2482
2018-05-15 09:23:54 +02:00
5a0e21f58d Locks down async-timeout<3.0.0 for P3.4 support; Fixes: #1331 2018-05-11 13:37:04 +02:00
f3c6faed75 Removed unnecessary line 2018-05-09 15:53:50 +02:00
7b3d5ae5e3 Create/update project on compute when variables changes 2018-05-09 15:29:35 +02:00
83445214be Support for nested global variables 2018-05-09 11:25:55 +02:00
0bcc657bf1 Don't clean logo images when applied to the project 2018-05-08 16:22:35 +02:00
f2700ed445 Support of supplier and variables in topology 2018-05-08 10:07:42 +02:00
e4436096c2 Fix tests 2018-05-07 15:18:19 +02:00
132c7c8f5b Fix tests 2018-05-07 12:55:32 +02:00
e267f8a8b8 Project global variables 2018-05-04 14:34:44 +02:00
21a1800edc Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/export_project.py
#	gns3server/controller/import_project.py
#	gns3server/controller/project.py
#	gns3server/version.py
2018-04-28 19:41:12 +07:00
202e7362a5 Add command information when uBridge has an error. Ref #1289 2018-04-28 18:48:52 +07:00
305fe2e817 Handle asyncio timeouts. Ref #1307. 2018-04-28 17:42:02 +07:00
a56d5b453f Fix project export tests. 2018-04-28 16:46:47 +07:00
3b94484914 Fix bug with export project. Ref #1187 #1307. 2018-04-28 16:38:52 +07:00
50a922f83e Offload slow file operations to threads for snapshots and project "save as". Ref #1187 #1307. 2018-04-28 16:01:43 +07:00
80958e8a6d support based on init.sh, Ref: #2482 2018-04-27 14:33:07 +02:00
20294e284c Fix exception from send_signal() on Windows. 2018-04-27 17:00:28 +07:00
43081152ef Add support of ExtraHosts for Docker, Ref. gns3-gui#2482 2018-04-25 16:03:01 +02:00
747814f083 Development on v2.1.6 2018-04-18 11:41:30 +02:00
2e9c5590a8 Release v2.1.5 2018-04-18 11:29:02 +02:00
cfd0216554 Disable TraceNG for version 2.1.5 2018-04-18 17:19:44 +08:00
2ea0aa5ded Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/compute/iou/iou_vm.py
#	gns3server/compute/virtualbox/virtualbox_vm.py
#	gns3server/compute/vmware/vmware_vm.py
2018-04-18 17:08:42 +08:00
9ecb058343 Fix tests. 2018-04-18 16:13:59 +08:00
013c74f6d8 Sync appliance files. 2018-04-18 16:12:30 +08:00
fff2e128eb Set the first byte to 0C when generating a random MAC address for a Qemu VM. Ref #1267. 2018-04-18 16:06:51 +08:00
5690d350bd Update appliance files. 2018-04-17 12:58:37 +08:00
1fea086f13 Do not use VMnet0 when allocating VMnet adapters. 2018-04-17 11:47:25 +08:00
dd9c18b9f8 Use SO_REUSEADDR before calling bind() where missing. Fixes #1289. 2018-04-16 16:36:36 +08:00
5c4f6dd3dc Do not fail a Dynamips project conversion if a file being used. 2018-04-16 15:45:43 +08:00
a12c5a95b0 Catch exceptions when using AsyncioTelnetServer. Fixes #1321. 2018-04-16 15:30:06 +08:00
025441f027 Add default destination setting for traceng + some checks. 2018-04-16 15:03:22 +08:00
801547983a Fix tests. 2018-04-13 17:04:19 +08:00
2de182eff4 Grid size support for projects. 2018-04-13 16:54:57 +08:00
9adfb1820d Remove 'include INSTALL' from MANIFEST. 2018-04-13 14:17:18 +08:00
ee5317948b Fix tests. 2018-04-06 14:32:06 +07:00
22a71b0e8c Fix problem with VM saved stated. 2018-04-06 13:19:54 +07:00
7622c10cc9 Returns the ports' adapter types and mac addresses when available. 2018-04-06 13:19:17 +07:00
adc2f69d5d Fix tests. 2018-04-04 21:51:31 +07:00
395277d5c5 Support for console auto start. 2018-04-04 21:31:35 +07:00
1d7f67695a Bump version to 2.2.0dev2 2018-04-03 12:51:09 +07:00
757c103c03 Possibility to customize port names and adapter types for Qemu, VirtualBox, VMware and Docker. Fixes #2361.
MAC addresses can customized for Qemu as well.
2018-04-02 22:27:12 +07:00
509b171b06 Allow to have projects with the same name in different locations. 2018-03-30 23:01:37 +07:00
ea0009db6c Save state feature for VirtualBox and VMware. New "On close" setting to
select the action to execute when closing/stopping a Qemu/VirtualBox/VMware VM.
2018-03-30 21:18:44 +07:00
3d1ee4da3f Support for suspend to disk / resume (Qemu). 2018-03-30 19:28:22 +07:00
64949f5d04 Fix bug with 'none' console type for Ethernet switch.
Fix some tests related to traceng.
2018-03-30 13:00:52 +07:00
669d2ec038 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/schemas/node.py
2018-03-30 12:14:09 +07:00
297bbd91ec Fix traceng tests. 2018-03-30 12:10:57 +07:00
47e5dfabd8 Merge branch 'traceng' into 2.1 2018-03-29 15:17:41 +07:00
898f180310 Fix issue with start all. 2018-03-29 13:32:56 +07:00
b61bd2dc67 Merge remote-tracking branch 'origin/traceng' into traceng 2018-03-29 13:29:56 +07:00
b7780ba7cc Check for valid IP address and prevent to run on non-Windows platforms. 2018-03-29 13:26:43 +07:00
c053a2f350 Enable UDP tunnel option and use ICMP probing by default. 2018-03-28 04:26:40 -07:00
05ec14e888 Use the configured IP address to trace. 2018-03-27 03:43:50 -07:00
d08c08617c Support for source and destination for traceNG. 2018-03-27 16:58:49 +07:00
8e695c8af1 Have TraceNG start without needing cmd.exe 2018-03-27 01:19:24 -07:00
ff7911bd99 Allow to resize a Qemu VM disk (extend only). 2018-03-26 18:05:49 +07:00
6cec67f79f Allow to select the default NAT interface in preferences for local server. 2018-03-26 14:23:01 +07:00
caa2bda71b Spice with agent support for Qemu VMs. 2018-03-25 14:36:14 +07:00
d419d3fa39 Check if the HAXM service is running when starting a Qemu VM with hardware acceleration. Ref #1242. 2018-03-24 22:15:20 +07:00
5d704aa478 Fix tests. 2018-03-24 18:25:09 +07:00
e52775fa3a Support for console type "none". 2018-03-24 18:11:21 +07:00
54661c50b2 Fix tests related to console type changes. 2018-03-23 21:29:39 +07:00
b6275deeef Fix tests. 2018-03-23 16:01:21 +07:00
b8353bc0d5 Support for none console type (Qemu & Docker only) 2018-03-23 15:44:16 +07:00
a40fdb3641 Fix bug and add optimizations when connecting and sending commands to QEMU monitor after starting a VM. Fixes #2336. 2018-03-23 00:07:32 +07:00
135bbe8825 Check if HAXM support is installed on macOS. Ref #1242. 2018-03-22 22:37:09 +07:00
9a9ac6d9f7 Fix some issues with hardware acceleration support for Qemu. 2018-03-22 15:45:41 +07:00
17bfed52f2 Fix Qemu VM tests. 2018-03-22 14:05:31 +07:00
44f2acffa5 Support Qemu with HAXM acceleration. Ref #1242. 2018-03-21 16:41:25 +07:00
85dcb985eb Fix packet filters for Dynamips. 2018-03-20 11:15:42 +07:00
279b4d7b20 Fix link filters/suspend tests. 2018-03-19 18:25:56 +07:00
8b91894fa4 Improve suspend a link for Qemu and VirtualBox VMs.
A suspended link will be unplugged allowing the VMs to be notified
of the change.
2018-03-19 16:26:12 +07:00
cde30f8f53 Fix warning message. 2018-03-19 14:23:46 +07:00
c7875f93a3 Qemu VM support to detect when a link is plugged/unplugged. 2018-03-19 14:22:10 +07:00
b7e436efdf Fix tests. 2018-03-15 20:47:42 +07:00
aaf59e6050 Allow to configure the interface to be used by the NAT node. Fixes #1175. 2018-03-15 17:20:40 +07:00
08493871a5 Restrict the list of available Ethernet/TAP adapters. Fixes #352. 2018-03-15 16:33:23 +07:00
fb3bcf3b8f Basic project stats. 2018-03-15 15:21:29 +07:00
90ce6093d8 Some spring cleaning. 2018-03-15 14:17:39 +07:00
88674455a3 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	tests/compute/docker/test_docker_vm.py
2018-03-14 18:40:37 +07:00
a4626a2b79 Custom icons and small fixes for TraceNG integration. 2018-03-14 16:56:37 +07:00
a13c237495 Merge pull request #1316 from BrentBaccala/master
Update Cisco ASAv appliance to include version 9.9.1
2018-03-14 13:25:22 +07:00
54a93a5ccb update Cisco ASAv appliance to include version 9.9.1 2018-03-14 01:20:09 -04:00
397c1322b4 Base support for TraceNG. 2018-03-12 17:57:13 +07:00
148baaf465 Back to development on v2.1.5dev1 2018-03-12 11:27:02 +01:00
aaac2a2d93 Fix issue with temporary travis deploy issues 2018-03-12 09:43:57 +01:00
e54a94240d Re-release v2.1.4 2018-03-12 09:40:42 +01:00
4ca216b181 Development on v2.1.5dev1 2018-03-12 09:26:07 +01:00
e417ee8fed Release v2.1.4 2018-03-12 09:19:18 +01:00
658aa4bae9 Merge 2.1 into 2.2 branch 2018-03-12 13:38:50 +07:00
3201a996ed Add Juniper JunOS space appliance. 2018-03-11 23:02:43 +07:00
1df03d052f Sync checkpoint gaia appliance template. 2018-03-09 15:41:17 +07:00
da31358a65 Sync appliance templates. 2018-03-09 15:26:40 +07:00
0bd7736460 Make sure we use an IPv4 address in the remote install script. 2018-03-08 21:09:00 +07:00
38f458db7c Delete old pcap file when starting a new packet capture. 2018-03-08 16:00:05 +07:00
233e41d006 Fix export project test. 2018-03-08 00:39:08 +07:00
22db13d2bf Fix bug preventing to export portable projects with IOU images. 2018-03-08 00:13:35 +07:00
0fde1cf54a Ignore invalid BPF filters. Ref #1290. 2018-03-07 21:37:15 +07:00
00e781826b Different approach to handle no data returned by uBridge hypervisors. Fixes #1289. 2018-03-07 19:42:19 +07:00
7c14e21f4a Different approach to handle no data returned by Dynamips or uBridge hypervisors. Fixes #1289. 2018-03-07 19:33:19 +07:00
a3a0657502 Do not raise exception if Dynamips or uBridge hypervisor don't return data and are still running. Fixes #1289 2018-03-07 19:11:34 +07:00
3ca4f72b99 Fix Dynamips private config not loaded into nvram when starting a router. Fixes #1313. 2018-03-07 18:18:51 +07:00
d911e82dc4 Merge remote-tracking branch 'origin/2.1' into 2.1 2018-03-07 16:42:12 +07:00
c93d0d8d12 Make sure we don't try to read when opening a file in binary more. Fixes #1301. 2018-03-07 16:39:04 +07:00
2a5f3221b9 Merge pull request #1314 from GNS3/pyup-update-pytest-3.4.1-to-3.4.2
Update pytest to 3.4.2
2018-03-06 09:24:58 +01:00
78ea230673 Update pytest from 3.4.1 to 3.4.2 2018-03-06 04:57:22 +01:00
53a229f8e9 Fix never reached condition 2018-03-05 11:16:03 +01:00
419797dd92 Merge pull request #1312 from GNS3/controller-compat
Compatybility with controller, default_symbol and hover_symbol, Fixes…
2018-03-02 13:49:32 +01:00
05b6be2e42 Compatybility with controller, default_symbol and hover_symbol, Fixes: #2444 2018-03-02 13:48:27 +01:00
c714c9c8de Merge pull request #1310 from GNS3/fix-1297
Filter snapshots directory during the snapshot, Fixes: #1297
2018-02-28 16:40:18 +01:00
9be76d98a2 Filter snapshots directory during the snapshot, Fixes: #1297 2018-02-28 16:38:32 +01:00
09c7d73ee9 Filter snapshots directory during the snapshot, Fixes: #1297 2018-02-28 16:33:20 +01:00
9e73ca6620 Merge pull request #1309 from GNS3/fix-2420
Handle docker env with last empty line, Fixes: #2420
2018-02-27 16:41:24 +01:00
e79e27a73f Handle docker env with last empty line, Fixes: #2420 2018-02-27 16:33:55 +01:00
7beae4e451 Merge pull request #1308 from GNS3/pywin32-dep
Pywin32 instead of pypiwin32, Ref. #1276
2018-02-27 09:27:54 +01:00
a0f2dd374e Require uBridge version 0.9.14 on Linux 2018-02-26 23:18:44 +07:00
b1657996e3 Pywin32 instead of pypiwin32, Ref. #1276 2018-02-26 16:25:31 +01:00
835bc24b44 Merge pull request #1304 from GNS3/pyup-update-sphinx-1.6.6-to-1.7.1
Update sphinx to 1.7.1
2018-02-26 09:14:40 +01:00
e83ed3b4b5 Merge pull request #1295 from ehlers/fix_cpuload
Implement a minimum interval between psutil calls. Fixes #2262
2018-02-26 13:08:10 +06:30
603442509a Update sphinx from 1.6.6 to 1.7.1 2018-02-23 19:59:09 +01:00
89b352890c Merge pull request #1303 from GNS3/pyup-update-pytest-3.3.2-to-3.4.1
Update pytest to 3.4.1
2018-02-21 11:59:38 +01:00
56b901a831 pytest.ini for ignoring files and recording DEBUG level in tests 2018-02-21 11:05:50 +01:00
1b3065750d .pytest_cache into .gitignore 2018-02-21 10:27:01 +01:00
f1d8ee30cd pytest-catchlog merged into the core 2018-02-21 10:26:30 +01:00
2111f549c9 Merge pull request #1302 from nabilbendafi/master
Fix missing 'locales' package in base image
2018-02-21 10:14:01 +01:00
629c7be395 Update pytest from 3.3.2 to 3.4.1 2018-02-21 03:03:33 +01:00
3a15839272 Fix missing 'locales' package in base image
`/bin/sh: 1: locale-gen: not found`
2018-02-20 16:43:22 +01:00
3a09bd43dc Implement a minimum interval between psutil calls. Fixes #2262 2018-02-13 11:31:04 +01:00
17422bc461 Fix appliance loading test (missing category). 2018-02-06 16:55:40 +08:00
935b8981ea Fix appliance loading test. 2018-02-06 16:15:34 +08:00
fff593b358 Fix error when appliance template is broken (missing fields). Fixes #1287. 2018-02-06 16:07:23 +08:00
abbe3d3a31 Fix "Change of linked base VM doesn't work with templates migrated from 2.0" 2018-02-05 16:42:29 +08:00
52b690b683 Fix "Unable to override non-custom VMware adapter". 2018-02-04 22:08:41 +08:00
654aa18d09 Fix get_port test. 2018-02-02 22:14:50 +08:00
519df3ab35 Let a project be opened when a port cannot be found (can happens if a project is corrupted). 2018-02-02 22:05:51 +08:00
4ba523a0d7 Add an error message when Docker container is not ready to be started. Ref #1281. 2018-02-02 16:29:08 +08:00
07d2d7b340 Update documentation. 2018-01-31 23:37:02 +07:00
e5a4afaeb1 Sync appliance files. 2018-01-31 19:05:03 +07:00
3802a3d70b Fix more IOU tests. 2018-01-31 16:34:41 +07:00
0ee87c9110 Fix IOU tests. 2018-01-31 16:12:55 +07:00
e5c76750b1 Fix issue when running multiple project containing IOU nodes on the same server. Ref #1239. 2018-01-31 15:51:29 +07:00
1045364adc Set first byte to 52 when generating a random MAC address for a Qemu VM. Ref #1267. 2018-01-30 18:26:38 +07:00
008baad86a Update link state and save project when a link is suspended or filters are added/removed (without node properties set). 2018-01-30 17:39:33 +07:00
c0ff37039d Merge pull request #1278 from GNS3/pyup-update-pytest-3.2.5-to-3.3.2
Update pytest to 3.3.2
2018-01-30 09:00:17 +01:00
29b9b0431c Merge branch '2.2' into pyup-update-pytest-3.2.5-to-3.3.2 2018-01-30 09:00:08 +01:00
cf5b24e829 Merge pull request #1279 from GNS3/pyup-update-pep8-1.7.0-to-1.7.1
Update pep8 to 1.7.1
2018-01-30 08:59:06 +01:00
f9853a1cc3 Merge pull request #1280 from GNS3/pyup-update-pytest-timeout-1.2.0-to-1.2.1
Update pytest-timeout to 1.2.1
2018-01-30 08:58:47 +01:00
d14e3d084d Update pytest-timeout from 1.2.0 to 1.2.1 2018-01-30 08:58:07 +01:00
53e36d1ed5 Update pep8 from 1.7.0 to 1.7.1 2018-01-30 08:58:03 +01:00
403645d2f0 Update pytest from 3.2.5 to 3.3.2 2018-01-30 08:57:47 +01:00
9921db2183 Merge branch '2.1' into 2.2 2018-01-30 08:53:23 +01:00
4f2a50894b Merge pull request #1277 from GNS3/av-pywin32
Fix AppVeyor crashes with pypiwin32-222 Ref. #1276
2018-01-30 08:52:35 +01:00
62e03148c1 Merge pull request #1275 from GNS3/async-md5-calcs
Calculate MD5 on thread and before json response, Ref. gui#2239
2018-01-29 23:28:11 +07:00
889aa3ba94 More generic dependency for pypiwin32, Ref. #1276 2018-01-29 15:26:45 +01:00
cbb15c7a84 Check if locking version of pypiwin32==220 helps, Ref. #1276 2018-01-29 15:16:38 +01:00
8268e76a86 Check if passes tests on 2.1 2018-01-29 15:09:03 +01:00
bb26e8acdd Calculate MD5 on thread and before json response, Ref. gui#2239 2018-01-29 14:20:48 +01:00
1582ac3195 Merge branch '2.2' into async-md5-calcs 2018-01-29 13:01:45 +01:00
7fe6508e73 Merge pull request #1274 from GNS3/asyncio-ensure-future
Conservative approach to supported versions of Python 3.4 and asyncio…
2018-01-29 12:21:41 +01:00
eeae07e783 Conservative approach to supported versions of Python 3.4 and asyncio.ensure_future, Ref. #1269 2018-01-29 12:13:20 +01:00
dc377165f2 Cancellable md5sum calculation on thread, Ref. gui#2239 2018-01-29 10:18:13 +01:00
6868e20a70 Compute md5sum on thread and don't block main server, Ref. gui#2239 2018-01-26 12:53:48 +01:00
3c5ca9ce0e Merge pull request #1270 from GNS3/replace-async-with-ensure-future
Replace asyncio.async with ensure_future because of deprecation, Fixe…
2018-01-24 11:18:10 +01:00
d9a0ec9ff3 Replace asyncio.async with ensure_future because of deprecation, Fixes: #1269 2018-01-24 11:11:53 +01:00
838d82a98b Merge branch '2.2' of github.com:GNS3/gns3-server into 2.2 2018-01-24 10:55:08 +01:00
05983f2838 Fix test_open_auto_start test 2018-01-24 10:54:56 +01:00
c532e6392d Merge pull request #1257 from GNS3/pyup-update-sphinx-1.6.2-to-1.6.6
Update sphinx to 1.6.6
2018-01-24 10:15:07 +01:00
e05f93abd3 Merge pull request #1268 from GNS3/pyup-pin-prompt-toolkit-1.0.15
Pin prompt-toolkit to latest version 1.0.15
2018-01-24 10:14:57 +01:00
daf058a306 Merge tag 'v2.1.3' 2018-01-24 10:09:31 +01:00
647c1dbb05 Pin prompt-toolkit to latest version 1.0.15 2018-01-23 06:47:36 +01:00
28f8216590 Merge branch '2.1' into 2.2
# Conflicts:
#	gns3server/version.py
#	requirements.txt
2018-01-23 12:47:13 +07:00
e54ccc26b0 Bump to version 2.2.0dev1 & refresh resources/ui files. 2018-01-23 11:36:57 +07:00
f7d82059d5 Development on v2.1.4dev1 2018-01-19 07:18:00 +01:00
d2faaee099 Release v2.1.3 2018-01-19 07:15:39 +01:00
6fee543ce7 Fix more client/server version tests. 2018-01-18 16:14:09 +08:00
2e40fb8608 Fix client/server version test. 2018-01-18 16:04:31 +08:00
d4f1084391 Bump version number to 2.1.3dev1 2018-01-18 15:32:06 +08:00
b792be00f9 Merge tag 'v2.1.2' 2018-01-18 08:29:40 +01:00
cf4477ce34 Merge remote-tracking branch 'origin/unlock-yarl' into 2.1 2018-01-18 12:10:19 +08:00
f525bd2ce1 Update appliance files. 2018-01-18 11:57:48 +08:00
bd8816d14c Suspend for Docker nodes. 2018-01-18 11:43:04 +08:00
34acb1f185 Unlock yarl version and multidict 2018-01-17 10:26:22 +01:00
7ded71142f Fix same MAC address for duplicated Qemu nodes. 2018-01-17 14:13:06 +08:00
c281f55fb2 Fix same base MAC for duplicated IOS routers. Fixes #1264. 2018-01-17 14:01:44 +08:00
e5e2b7a8ac Fix "Creating multiple IOU nodes at once assigns the same application id". Fixes #1239. 2018-01-15 18:09:05 +07:00
30e8949985 Fix "Transport selection via DSN is deprecated" message. Sync is configured with HTTPTransport. 2018-01-15 16:56:15 +07:00
393ac85bca Merge remote-tracking branch 'origin/2.1' into 2.1 2018-01-15 14:42:25 +07:00
9d9dc037d8 Refresh CPU/RAM info every 1 second. Ref #2262. 2018-01-15 14:42:01 +07:00
32f56feca2 Merge pull request #1263 from ddragic/eth_switch_cmd
Rename ethernet switch shell command arp to mac
2018-01-15 08:20:39 +01:00
5d86f06390 Rename ethernet switch arp command to mac, also rename in test 2018-01-14 17:50:21 +01:00
6789989cb9 Rename ethernet switch arp command to mac 2018-01-14 17:10:26 +01:00
ffc7024b64 Fix error while getting appliance list. Fixes #1258. 2018-01-14 20:29:17 +07:00
ed275e4ec5 Fix UnboundLocalError: local variable 'node' referenced before assignment. Fixes #1256. 2018-01-14 19:06:35 +07:00
4143ee8178 first commit 2018-01-14 10:52:59 +07:00
88989cc274 Default symbol must be computer.svg 2018-01-12 21:46:48 +07:00
ab6fe6da1d Compatibility for old node templates (those with default_symbol and hover_symbol properties). 2018-01-12 17:34:37 +07:00
8b1c68a0b7 Fix problem when searching for VBoxManage. Fixes #1261. 2018-01-12 13:17:16 +07:00
97cfb892a6 Improve the search for VBoxManage. 2018-01-11 16:33:15 +07:00
f9c7c15f95 Fixing race condition when starting the GNS3 VM. 2018-01-10 16:22:55 +07:00
5f14f8eb46 Default VPCS name format is now PC-{0}. 2018-01-09 23:40:35 +07:00
7c91e46812 Development on v2.1.3dev1 2018-01-08 14:21:04 +01:00
588339487f Update sphinx from 1.6.2 to 1.6.6 2018-01-08 14:10:17 +01:00
6af64454d0 Release v2.1.2 2018-01-08 14:09:59 +01:00
47ef7e2a5e Merge remote-tracking branch 'origin/2.1' into 2.1 2018-01-08 18:08:45 +07:00
927f7e6b9d Do not show log message if configuration file doesn't exist. Fixes #1206. 2018-01-08 18:07:15 +07:00
9ca56964f5 Merge pull request #1255 from ehlers/update-docs
Update API documentation
2018-01-08 02:46:06 -08:00
e6d2bd4424 Update API documentation 2018-01-08 09:26:44 +01:00
21a7a68875 Merge remote-tracking branch 'origin/2.1' into 2.1 2018-01-08 11:57:24 +07:00
ffe21f6b73 Update API documentation. Fixes #1253. 2018-01-08 11:57:07 +07:00
266916b092 Merge pull request #1252 from ehlers/api_links_drawings
GNS3-API: implement GET for specific drawing and link
2018-01-07 06:12:24 +01:00
8907b3d58a GNS3-API: implement GET for specific drawing and link
Fixes #1249
2018-01-05 13:44:46 +01:00
d80e01a9c5 Development on v2.1.2dev1 2017-12-22 13:29:18 +01:00
5dd0414ab3 Release v2.1.1 2017-12-22 13:27:20 +01:00
e8353e68bb Merge remote-tracking branch 'origin/2.1' into 2.1 2017-12-21 09:38:28 +01:00
23c63bbd4d Protect variable replacement for Qemu options. Escape double quotes. 2017-12-21 09:38:18 +01:00
dadf11f69b Fix tests 2017-12-21 09:37:48 +01:00
3efe753eee Add proper exception when cannot find tunnel on QEMU, Fixes: #1241 2017-12-21 08:55:49 +01:00
f48420af58 Increase timeout for creation of image, Ref. #2239 2017-12-21 08:46:20 +01:00
79bca29b93 Protect variable replacement for Qemu options. 2017-12-20 20:46:16 +01:00
0e4865e049 Bump version to 2.1.1dev2 2017-12-20 11:20:07 +01:00
26567d9164 Merge remote-tracking branch 'origin/2.1' into 2.1 2017-12-18 12:08:23 +01:00
a8177d7afa Fix tests more reliably. Ref #0df997d. 2017-12-18 12:08:14 +01:00
a393e7f723 Merge pull request #1205 from GNS3/aiohttp-2.3.1
aiohttp 2.3 support.
2017-12-18 11:09:16 +01:00
0df997d232 Fix tests. 2017-12-17 23:06:19 +01:00
630afc5469 Do not overwrites persistent Docker volumes. Fixes #2358. 2017-12-17 22:35:26 +01:00
3e3e1df051 Allow users to see an error when the server cannot stream a PCAP file. 2017-12-07 12:28:01 -06:00
3a1ba8f42d Fix issue with Qemu + SPICE when IPv4 is not enabled. 2017-12-07 12:02:41 -06:00
0a72e0db87 Fix more GNS3 VM related tests. 2017-12-05 20:38:48 -06:00
e3b3427cc6 Fix GNS3 VM start test. 2017-12-05 20:30:28 -06:00
dde2003168 Fix tests. 2017-12-05 16:56:50 -06:00
cfe8e9e85c Warn users if the GNS3 VM and local server are not in the same subnet. Fixes #1231. 2017-12-05 16:43:44 -06:00
6e2752648a Implement #1153 into 2.2 branch. 2017-11-27 15:16:46 +07:00
09b1cac676 Merge remote-tracking branch 'origin/2.2' into 2.2
# Conflicts:
#	requirements.txt
2017-11-27 14:21:02 +07:00
1699ce5d1c Add missing appliance files. 2017-11-27 13:43:47 +07:00
d0850927d0 Update appliance files. 2017-11-27 13:42:26 +07:00
745532bf23 Fix auto idlepc test. 2017-11-23 23:46:22 +07:00
78cf0309a0 Merge remote-tracking branch 'origin/2.1' into 2.1 2017-11-23 23:29:09 +07:00
851fcf5c71 Fix compute auto idlepc test. 2017-11-23 23:28:52 +07:00
a80355998d Merge pull request #1230 from GNS3/consitance-about-exc
Keep consistance of aiohttp.web.HTTPForbidden() execution
2017-11-23 23:02:42 +07:00
e54d574e47 Fix auto idle-pc from preferences. 2017-11-23 23:00:31 +07:00
e754db950d Merge pull request #1219 from GNS3/pyup-update-pytest-3.1.1-to-3.2.5
Update pytest to 3.2.5
2017-11-23 16:46:31 +01:00
68d8fecc36 Merge pull request #1220 from GNS3/pyup-pin-prompt-toolkit-1.0.15
Pin prompt-toolkit to latest version 1.0.15
2017-11-23 16:39:57 +01:00
5a6b0cc07b Keep at least this version 2017-11-23 16:39:15 +01:00
fe60c414b9 Keep consistance of aiohttp.web.HTTPForbidden() execution 2017-11-23 16:28:10 +01:00
efbf7728ea Fix Docker tests. 2017-11-23 11:27:17 +07:00
061af38b5a Make sure connected links are removed when a node is deleted. 2017-11-23 11:19:41 +07:00
f48549a997 Validate idle-pc values for auto idle-pc feature. 2017-11-23 10:40:51 +07:00
958ab2294c Merge remote-tracking branch 'origin/2.1' into 2.1 2017-11-23 10:04:46 +07:00
dd89b09f84 Fix error when updating packet filter on stopped Docker link. Fixes #1229. 2017-11-23 10:04:32 +07:00
642536a070 Merge pull request #1228 from GNS3/es-console
Close telnet console after stopping the node. Ref gui/#2330
2017-11-20 22:02:58 +07:00
860ca3b35d Remotely close telnet console. Ref #2330 2017-11-20 15:28:07 +01:00
96a0b52cf8 EthernetSwitch closing connections, Ref: gui/#2330 2017-11-20 13:51:07 +01:00
7c90c513d0 Merge pull request #1227 from GNS3/improved-export-project
Export files from remote server, Fixes: gui/#2271
2017-11-20 17:19:20 +07:00
fe59c937d5 Merge branch '2.1' into improved-export-project 2017-11-20 11:15:04 +01:00
b48f5df53f iExport files from remote server, Fixes: gui/#2271 2017-11-20 10:47:03 +01:00
3e2e8e61f7 New option: require KVM. If false, Qemu VMs will not be prevented to run without KVM. 2017-11-19 12:39:37 +07:00
068077c594 Remove forgotten debug. 2017-11-18 17:36:39 +07:00
e08aebf1f0 Implement variable replacement for Qemu VM options. 2017-11-18 17:36:11 +07:00
cfbcc1194d Avoid duplicate "-nographic" option. 2017-11-18 16:22:29 +07:00
035a078b5e Show qemu-img stdout in case of an error. 2017-11-17 18:13:34 +07:00
cf14deb2fa Fix IOU tests. 2017-11-16 17:07:51 +07:00
e1fe34ca07 Use the correct NVRAM amount when pushing private config to IOU. 2017-11-16 16:52:19 +07:00
840aa39457 Merge remote-tracking branch 'origin/2.1' 2017-11-16 15:04:33 +07:00
d3e55520d9 Merge remote-tracking branch 'remotes/origin/master' into 2.1 2017-11-16 15:03:20 +07:00
fb2e10d3c1 Merge remote-tracking branch 'remotes/origin/master' 2017-11-16 14:59:57 +07:00
4477cd4dfd Merge remote-tracking branch 'origin/2.1' 2017-11-16 14:54:53 +07:00
967798a7de Check and fix corrupt Qemu disk images. Fixes #2301. 2017-11-16 14:54:37 +07:00
0ce5b80a1d Pin prompt-toolkit to latest version 1.0.15 2017-11-15 13:20:52 +01:00
61acb939a4 Update pyup config to use 2.2 branch 2017-11-15 13:20:31 +01:00
49f1ef9693 Update pytest from 3.1.1 to 3.2.5 2017-11-15 13:17:57 +01:00
8c11b649e5 Update warning messages when connecting to non custom adapter for VMware VMs. 2017-11-15 16:55:19 +07:00
b14e2e73ed Fix "Can't use VirtualBox VM when an interface is managed by VirtualBox". Fixes #2335. 2017-11-15 16:41:33 +07:00
2235a8158f Update requirements.txt 2017-11-15 09:00:14 +01:00
9afe756462 Add low disk space warning when creating a new project. 2017-11-14 18:22:59 +07:00
135c529d4b Development on 2.1.1dev1 2017-11-09 10:49:56 +01:00
ce219e81ea Development on 2.1.0dev11 2017-11-09 10:48:48 +01:00
c2684f056c Release 2.1.0 2017-11-09 07:29:46 +01:00
009677f019 Fix typo in vcpus on VirtualBoxVM, fixes: #1213 2017-11-07 11:15:49 +01:00
9c3ee02797 Development on v2.1.0dev10 2017-11-07 10:19:19 +01:00
50c8fe070d Release v2.1.0rc4 2017-11-07 08:47:40 +01:00
ace7b0c69f Merge pull request #1212 from GNS3/fix-vcpus-controll-on-vmware
Fix GNS3VM vCPUs control on VMware, fixes: #2324
2017-11-06 23:46:04 +08:00
255dc7ed9b Fix GNS3VM vCPUs control on VMware, fixes: #2324 2017-11-06 15:15:37 +01:00
75ceffb458 Fix typo in sample gns3_server.conf. Fixes #1210. 2017-11-03 16:15:03 +08:00
21c2429aee Merge pull request #1209 from GNS3/ignore-env
Ignore env files
2017-10-30 17:43:39 +07:00
8cc04f25e2 Merge pull request #1208 from GNS3/info-about-api
Warning for getting endpoint of compute
2017-10-30 17:41:31 +07:00
815dca101f Ignore env files 2017-10-30 11:30:06 +01:00
022d76e88a Warning for getting endpoint of compute 2017-10-30 11:26:57 +01:00
2c0804d4ee Merge pull request #1204 from GNS3/loop-speed-on-win
Disable loop debug on default
2017-10-27 16:43:54 +07:00
b2c5e175d7 Enable debug loop only on debug mode 2017-10-27 11:19:06 +02:00
a7412d1c87 aiohttp 2.3.1 dependency 2017-10-26 16:29:01 +02:00
2171072ae4 Enable debug mode on async loop only in dev/debug mode 2017-10-26 12:24:01 +02:00
8fcfed53ed Add warning when using IOU with a hostname length above 15 characters. 2017-10-24 15:07:32 +07:00
df468bf2af Improve VMware VMs discovery process. Ref #1201. 2017-10-22 17:33:21 +07:00
8930b4c6e5 Improve error message when IOU VM process is unexpectedly stopped. 2017-10-22 16:28:54 +07:00
b4307e6035 Improved error message when the number of network adapters is above the maximum for VirtualBox VMs.
Better support for potential future chipsets in addition of PIIX3 and ICH9.
2017-10-22 15:23:43 +07:00
6a87047c18 Added localhost and gns3.github.io CORS 2017-10-20 13:21:43 +02:00
d918330472 Back to dev. at 2.1.0dev9 2017-10-20 08:37:47 +02:00
8fde8789f1 Fix Travis deployment 2017-10-19 09:57:52 +02:00
aaa8c4895f Development on 2.1.0dev9 2017-10-19 08:58:28 +02:00
66d5cb520d Release 2.1.0 rc3 2017-10-19 08:56:06 +02:00
d2a7f724e3 Merge pull request #1198 from GNS3/vmware-config
Set vhv.enable before run for VMware. Fixes #1184
2017-10-18 17:42:56 +07:00
c7015435c9 Update vmware_gns3_vm.py 2017-10-18 15:53:37 +07:00
44efab109e Set vhv.enable before run for VMWare 14. Fixes #1184 2017-10-18 10:32:56 +02:00
98b201e9e5 Tweak how VMware VMs are found with fallback to search in the default location for VMs. 2017-10-18 15:27:03 +07:00
1f4b87ae9c Merge pull request #1197 from GNS3/fix-win-tests
fix passing tests on Windows
2017-10-16 19:44:22 +08:00
bc782b6896 fix passing tests on Windows 2017-10-16 13:02:44 +02:00
4cae6b678a Merge pull request #1194 from GNS3/direct-file-uploads
Endpoint for obtaining direct action on compute
2017-10-16 17:27:35 +08:00
3a5a771b19 Merge pull request #1195 from ddragic/qemu-log-macaddress
QEMU: fix logging of base mac address when creating a new node
2017-10-14 16:00:22 +02:00
44bb912139 QEMU: fix logging of base mac address when creating a new node 2017-10-14 13:55:16 +02:00
74e7201ea6 Sync appliance files. 2017-10-13 17:56:42 +08:00
4f13c63a52 Do not use builtin name. 2017-10-13 17:51:19 +08:00
02ad98664f Fix creation of an VMware VM failed with invalid JSON. Fixes #2282. 2017-10-13 17:50:23 +08:00
b654d78ea6 Endpoint for obtaining direct action on compute 2017-10-13 11:03:56 +02:00
244a86bcbc Merge remote-tracking branch 'origin/2.1' into 2.1 2017-10-12 23:33:00 +08:00
1524493c33 Fix IOU detection of layer 1 keepalive support. Fixes #1183. 2017-10-12 23:32:45 +08:00
e52b83be11 Merge pull request #1192 from GNS3/travis-docker-tests
Tests on TravisCI with docker compose
2017-10-12 01:52:03 -07:00
0c7a92b710 Tests on TravisCI with docker compose 2017-10-12 10:40:49 +02:00
67c78ba2e3 Merge pull request #1188 from GNS3/fix-post-file-normalization
Fixes path normalization during file upload on nodes (Fixes: #2276)
2017-10-05 02:07:02 -07:00
9619827f44 Reenable tests and back to development on 2.1.0dev8 2017-10-04 13:05:00 +02:00
5b645cd455 Temporary disable passing tests 2017-10-04 12:58:53 +02:00
7d19312d44 Development on 2.1.0dev8 2017-10-04 11:39:52 +02:00
81048f44d6 Release 2.1.0 rc2 2017-10-04 11:37:12 +02:00
be35ad6874 Fixes path normalization during file upload on nodes (Fixes: #2276) 2017-10-03 18:13:19 +02:00
897f7656da Merge pull request #1185 from GNS3/fix-delete-project
Don't create directory structure during json dump. Fixes #2270
2017-10-02 13:49:46 -07:00
3d85bba9d4 Don't create directory structure during json dump. Fixes #2270 2017-10-02 10:41:57 +02:00
dbd41e44f8 Bump version to 2.1.0dev7 2017-10-02 04:04:38 +08:00
7269285b0f Add more information when qemu-img fails. 2017-10-02 00:47:16 +08:00
2a4ed9ba89 Fix issue with multidict when upgrading GNS3 VM to use dev channel. 2017-09-23 18:09:10 +08:00
a567b394f3 Restore file permissions fails for volumes with soft links. Fixes #1180. 2017-09-21 22:45:17 +08:00
d76bcf7078 Use RAW sockets by default on Linux. 2017-09-19 12:39:55 +07:00
fcd2c7b6d4 Add missing https console keyword in JSON schema. Fixes #1179. 2017-09-19 12:38:35 +07:00
60bc386d6b Merge remote-tracking branch 'origin/2.1' into 2.1 2017-09-14 17:58:25 +07:00
e1c8df170a Allow projects to be opened even when a node port is already used. 2017-09-14 17:57:58 +07:00
cdfce26b61 Development on v2.1.0dev6 2017-09-13 09:31:30 +02:00
f415d38ccd Release v2.1.0rc1 2017-09-13 09:29:31 +02:00
6a8f220ff1 Fix NAT test. 2017-09-11 15:09:32 +07:00
9e4cfaf787 Fix NAT node not working on Windows. Fixes #1163. 2017-09-11 13:02:26 +07:00
4a2dfb0037 Do not prevent a project to be deleted. Fixes #2237. 2017-09-06 18:12:22 +07:00
b538bd0a29 Back to development on v2.1.0dev5 2017-09-05 15:22:49 +02:00
36210b10c6 Re-release 2.1.0b2 2017-09-05 11:22:43 +02:00
fd623a5ad2 Fix test_ubridge_apply_filters 2017-09-05 11:07:10 +02:00
e5a7eb74ed Fix project tests 2017-09-05 10:38:17 +02:00
daf7ed8c95 Development on 2.1.0dev5 2017-09-05 08:39:53 +02:00
1f87d8222b Release 2.1.0 beta 2 2017-09-05 08:38:42 +02:00
90e3a8d612 Round-robin nodes across all available compute resources. Fixes #1165. 2017-09-03 22:51:51 +07:00
c22229101f Try to improve error reporting when streaming a PCAP file. Ref #2235. 2017-09-01 17:10:24 +07:00
ee486b32bd Use Npcap DLL on Windows when checking for uBridge version. 2017-09-01 16:22:43 +07:00
7492899b95 Merge pull request #1173 from GNS3/console-tests
Windows console bugfix tests
2017-08-29 17:45:29 +07:00
807bea40d4 Fixes running switch console inside PyCharm terminal (Ref. #1172) 2017-08-29 12:28:53 +02:00
4e3eee33fc Windows console bugfix tests 2017-08-29 10:08:10 +02:00
a7297ffca4 Merge pull request #1169 from GNS3/checking-nio-existance
Added checking if NIO exists (Fixes #1160)
2017-08-25 16:34:44 +08:00
2806b7b286 Merge pull request #1170 from GNS3/load-meta-when-project-opens
Load meta of the project on loading time (Fixes #2225)
2017-08-25 16:30:23 +08:00
b0783eeccc Load meta of the project on loading time (Fixes #2225) 2017-08-22 09:36:52 +02:00
4fc29504f2 Merge pull request #1168 from GNS3/nat-on-windows
Fixes NAT node not working on Windows (#1163)
2017-08-21 14:24:05 +02:00
efae614af2 Added checking if NIO exists (Fixes #1160) 2017-08-21 11:03:23 +02:00
7523e9c4bc Fixes NAT node not working on Windows (#1163) 2017-08-21 10:17:56 +02:00
3dd5dbe0c1 Merge pull request #1161 from GNS3/empty-link-on-compute
Fixes loading project when link_id is not set (#1159)
2017-08-10 22:09:49 +08:00
e15d1cd350 Fixes loading project when link_id is not set (#1159) 2017-08-10 10:02:18 +02:00
fc7377e999 Merge pull request #1158 from GNS3/platform-on-appliances-list
Return platform value on appliances list (Fixes #2211)
2017-08-08 22:16:40 +08:00
3fd86f5807 Return platform value on appliances list (Fixes #2211) 2017-08-08 13:58:43 +02:00
fc9d44011b Merge pull request #1157 from GNS3/bugfix-1156
Fixes not known category in Appliances (Fixes #1156)
2017-08-07 16:46:14 +08:00
3a1fd892ac Fixes not known category in Appliances (Fixes #1156) 2017-08-07 10:00:46 +02:00
3caba334c0 Development on 2.1.0dev4 2017-08-04 11:39:31 +02:00
e2de872036 Release 2.1.0 beta 1 2017-08-04 11:38:33 +02:00
44fc87a24c Sync appliances 2017-08-04 10:59:05 +02:00
2dc83d7894 Interface starting with gns3 are not display by default in the cloud
Fix https://github.com/GNS3/gns3-gui/issues/2199
2017-08-03 16:33:42 +02:00
211f48d981 Catch error when something that is not the GNS3 server answer to virtualbox requests
Fix #1155
2017-08-03 16:31:28 +02:00
3bb8cdafb2 Catch KeyError: <aiohttp.connector._TransportPlaceholder
Fix #1152
2017-08-02 10:16:49 +02:00
e74eaa8ea8 Add a warning when you try to load and the server is not started with --local
Ref #1151
2017-08-02 09:52:31 +02:00
8a028a6dce Merge pull request #1147 from GNS3/fix_docker_permission
Fix permission on exited container
2017-08-01 00:30:56 +08:00
1cde787ffa Sync appliances 2017-07-31 15:12:06 +02:00
81d77cabf9 Development on 2.1.0dev3 2017-07-31 11:57:45 +02:00
37c76189dc Release 2.1.0 alpha 2 2017-07-31 11:53:35 +02:00
6996b7094f Handle invalid appliances files
Fix #1150
2017-07-28 15:21:35 +02:00
2eead38cd8 Sync appliances 2017-07-28 14:41:19 +02:00
283b08c2a1 Fix naming of node with a number in the name
Fix #1149
2017-07-27 16:06:52 +02:00
fc6b6b5e63 Fix race condition in startup of capture
Fix https://github.com/GNS3/gns3-gui/issues/2111
2017-07-27 15:32:46 +02:00
108a659ca4 Fix bug when exporting debug information with multiple remote servers
Fix #1100
2017-07-27 11:59:20 +02:00
7683a79bb1 Fix OSError when uploading images
Fix #1101
2017-07-27 11:42:10 +02:00
103be13ba4 Fix an error when a symbol is not available on filesystem
Fix #1102
2017-07-27 11:39:25 +02:00
cc89099ea5 Fix ServerDisconnectedError for stop_all
Fix #1089
2017-07-27 11:33:27 +02:00
2e68c90e25 Merge pull request #1148 from GNS3/fix_include_images
This fix the images always included in portable project
2017-07-26 23:14:15 +08:00
92c9e48f18 This fix the images always included in portable project
Also add test to avoid regressions on this.

Fix https://github.com/GNS3/gns3-gui/issues/2165
2017-07-26 16:46:29 +02:00
a93f3b0576 Fix permission on exited container
If a container is exited we quickly start it to fix
the permissions.

Fix https://github.com/GNS3/gns3-gui/issues/2181
2017-07-26 14:52:16 +02:00
86bd7b6058 Added missing corutine flag, fixes #1145 2017-07-26 11:37:09 +02:00
6aa6d96ba0 Fix support of docker appliance with a usage
Fix #1144
2017-07-26 10:52:43 +02:00
5dd5c21374 Merge pull request #1139 from GNS3/prompt-with-new-vpcs
Prompt with new vpcs, fixes: #1083
2017-07-26 10:20:03 +02:00
136e483ace Merge pull request #1143 from GNS3/last_dynamips
Duplicate API for ATM, Ethernet Hub and Frame Relay Switch
2017-07-25 08:05:35 -07:00
d69475cd44 Duplicate API for ATM, Ethernet Hub and Frame Relay Switch
Fix https://github.com/GNS3/gns3-gui/issues/1065
2017-07-25 16:51:49 +02:00
ac508435c3 History support for console and telnet application, Fixes: #1083
Arrows UP/DOWN for telnet, Ref. #1083

Typo, Ref. #1083

Support async commands, Ref. #1083

Small refactor, Ref. #1083

Asyncio telnet server - connections support, Ref. #10831

Prompt-toolkit in dependencies, ref. #1083

Few comments, ref. #1083

Direct imports, ref. #1083

Windows size changed support in telnet server, ref. #1139

Fake termios

Fake termios - different approach

InputStream - copied source from prompt_toolkit
2017-07-25 16:18:07 +02:00
bb90c0ba52 Merge pull request #1140 from GNS3/duplicate_docker
Support duplicate for Docker
2017-07-25 06:50:00 -07:00
a805b3c7c3 Merge pull request #1142 from GNS3/duplicate_iou
Duplicate IOU
2017-07-25 06:46:44 -07:00
f0343124ec Merge pull request #1138 from GNS3/duplicate_qemu
Duplicate support for qemu
2017-07-25 06:44:49 -07:00
27582bb68c Fix IOU image upload
Fix #1141
2017-07-25 14:59:55 +02:00
6d4529f445 Duplicate IOU
Ref https://github.com/GNS3/gns3-gui/issues/1065
2017-07-25 11:39:46 +02:00
16209a2b60 Support duplicate for Docker
Ref https://github.com/GNS3/gns3-gui/issues/1065
2017-07-25 11:32:09 +02:00
01be1b32c4 Duplicate support for qemu
Ref https://github.com/GNS3/gns3-gui/issues/1065
2017-07-25 10:02:40 +02:00
6514252a95 2.1.0dev2 2017-07-24 16:17:02 +02:00
faed85e48b 2.1.0a1 2017-07-24 16:15:24 +02:00
34c27bc18a Merge pull request #1137 from GNS3/duplicate
API for duplication a Node
2017-07-24 01:52:34 -07:00
47e8392ceb Use uuid4() for temporary node name while duplicating a node. 2017-07-24 15:52:14 +07:00
a0a7b0af10 Sync appliances 2017-07-24 10:39:06 +02:00
0854c04687 API for duplication a Node
Support:
* VPCS
* Dynamips router
* Ethernet switch

Ref #1065
2017-07-24 10:08:22 +02:00
0449a5b4ee Cleanup 2017-07-20 17:04:50 +02:00
b37a282475 Raise a NotImplementedError for IPV6 support in old UDP cloud
Fix #1093
2017-07-20 16:23:32 +02:00
253e113168 Raise an error if the licence check setting is not a boolean
Fix #1099
2017-07-20 16:19:20 +02:00
87838cb574 Handle when pid file is corrupt
Fix #1090
2017-07-20 16:17:07 +02:00
ec4e69b0d8 Ensure, that the docker mount directory exists
Fix #1097

Signed-off-by: Julien Duponchelle <julien@gns3.net>
2017-07-20 16:12:20 +02:00
c96694105c Handle broken appliance files
Fix #1135
2017-07-20 16:10:56 +02:00
46e5e8ac68 Log error if you invalid character in auth login
Fix #1088
2017-07-20 15:42:07 +02:00
b33ba5f8ea Don't allow user to overwrite GNS3 docker environment variables
Fix #1098
2017-07-20 15:37:56 +02:00
8354beaa86 Return computer symbol if an appliance don't have symbol
Fix #1087
2017-07-20 15:13:58 +02:00
27f733736e Merge pull request #1133 from GNS3/appliances_dir
Add an appliance templates directory
2017-07-19 22:10:13 -07:00
90cdf14c2a Merge pull request #1134 from GNS3/suspend_link
Suspend link
2017-07-20 11:14:15 +07:00
ca3f6fb4b8 Update some sentences related to suspending a link. 2017-07-20 11:11:44 +07:00
5fd842e54d Suspend link 2017-07-19 17:30:25 +02:00
bce9c61e41 Cleanup unused code in test_link 2017-07-19 16:02:14 +02:00
f5e023222e Fix symbols permissions
Fix #1132
2017-07-19 13:57:19 +02:00
a7d2391608 Use the libpcap on Linux when blocking host originating packets on vmnet interfaces. Ref #1131. 2017-07-19 16:56:24 +07:00
7d123f334f Add an appliance templates directory
Fix https://github.com/GNS3/gns3-gui/issues/2133
2017-07-19 11:44:05 +02:00
c2fbe4f313 Merge pull request #1130 from GNS3/vmware_filters
Filters support for VMware
2017-07-19 14:59:25 +07:00
ac10ba370a Merge pull request #1129 from GNS3/filters_virtualbox
Packet filters support for VirtualBox
2017-07-19 13:34:48 +07:00
fa211a82eb Filters support for VMware
Fix #1108
2017-07-18 18:04:03 +02:00
d9b13fb0c5 Add test for the VMware compute API 2017-07-18 16:07:10 +02:00
54faaf5f6f Packet filters support for VirtualBox
Fix #1107
2017-07-18 14:59:47 +02:00
873418dbbe Fix a merge error 2017-07-18 09:24:36 +02:00
7b8e4c1a60 Merge pull request #1127 from GNS3/filters_iou
Filters support for IOU
2017-07-17 23:15:37 +07:00
08d4c1a000 Merge branch '2.1' into filters_iou 2017-07-17 17:51:17 +02:00
6d577406d7 Merge pull request #1128 from GNS3/filters_cloud
Filter implementation for cloud & Nat
2017-07-17 22:49:26 +07:00
536c708c16 Filter implementation for cloud & Nat
Fix #1111
2017-07-17 17:27:07 +02:00
03af9bd621 Sync appliances 2017-07-17 11:43:49 +02:00
5b839c22e9 Filters support for IOU
Fix #1113
2017-07-17 11:21:54 +02:00
3487b657a7 Merge pull request #1125 from GNS3/docker_filters
Filter support for Docker
2017-07-13 13:22:22 +07:00
23c3d32e06 Filter support for Docker
Fix #1110
2017-07-12 19:44:15 +02:00
f557ec4bda Fix regression in docker introduce by 2.0 merge 2017-07-12 17:59:29 +02:00
cf3b668cf1 Merge pull request #1124 from GNS3/filters_qemu
Qemu support for packet filtering
2017-07-12 21:57:15 +07:00
e8a35ac41f Interface ending with -nic are special ethernet interface
It's libvirt internal stuff

Fix #1114
2017-07-12 16:13:46 +02:00
03f8c747cc Qemu support for packet filtering
Fix #1112
2017-07-12 14:50:33 +02:00
53c4cba1f6 Merge pull request #1117 from GNS3/remove_use_ubrige
Remove use_ubridge flag
2017-07-12 12:46:24 +02:00
9e2759a3f2 Merge branch '2.1' into remove_use_ubrige 2017-07-12 12:46:10 +02:00
9d8a8c95f6 Merge pull request #1123 from GNS3/filters_dynamips
Support packet filtering for Dynamips
2017-07-12 17:23:34 +07:00
86f1201276 Support packet filtering for dynamips
Fix #1109
2017-07-12 12:08:02 +02:00
4a55a367e3 Missing file in previous commit 2017-07-12 11:42:37 +02:00
cf17176bfc Fix recreate a link with dynamips
Fix #1122
2017-07-12 11:34:44 +02:00
2e592d3199 Merge pull request #1121 from GNS3/bfp_filter
BPF filter support
2017-07-12 16:22:01 +07:00
b37f9eb4f0 Update schema for BPF filter. 2017-07-12 16:21:11 +07:00
7c6ffb3f49 Update error message when invalid aiohttp 2017-07-12 10:57:03 +02:00
4a05a4f7c5 Fix virtualbox links 2017-07-12 10:32:02 +02:00
114b137b02 Merge pull request #1120 from GNS3/aiohttp_2.2
Upgrade to last aiohttp version
2017-07-12 15:20:02 +07:00
66d5d34877 Fix qemu hotlink 2017-07-12 10:07:21 +02:00
04303ca00c Fix VPCS ubridge usage 2017-07-12 09:55:23 +02:00
fd0770158c Fix tests with Yarl 0.11 2017-07-12 09:34:40 +02:00
5747aba83c Update error message to require aiohttp 2.2 2017-07-12 13:34:18 +07:00
c8155aa14f Upgrade Yarl 2017-07-12 08:27:49 +02:00
5f874cca2c Merge branch 'master' into 2.1 2017-07-11 19:02:35 +02:00
fc87871d46 Fix a bug in docker binary message handling 2017-07-11 19:00:29 +02:00
699ecb7c89 Merge branch 'master' into 2.1 2017-07-11 18:59:50 +02:00
8a8de1e2df BPF filter support
Fix https://github.com/GNS3/gns3-gui/issues/765
2017-07-11 17:30:29 +02:00
d525f721a6 Merge pull request #1119 from GNS3/fix_random_snap_failure
Test if a snapshot name already exists
2017-07-11 21:28:15 +07:00
357de50a1b Upgrade to last aiohttp version 2017-07-11 15:59:09 +02:00
450c089b6d Test if a snapshot name already exists
This fix random test failure when testing snapshots. It
seem under high load sometimes the previous snapshot folder
was not visible on disk. Perhaps a test isolation issue but
I don't see how.

But in any case it's better to test if the name is not already
use.

Fix #1118
2017-07-11 15:28:01 +02:00
8eb060304a Correct typos in schemas. 2017-07-11 20:03:24 +07:00
d112da400e Remove use_ubridge flag
Ref #1115
2017-07-11 13:58:59 +02:00
fcd7dfbde6 Merge pull request #1116 from GNS3/dynamips_ubridge
Use ubridge for dynamips routers
2017-07-11 12:37:20 +07:00
5112f6fe56 Small changes for Dynamips NIO UDP. 2017-07-11 12:36:43 +07:00
557924e91a Use ubridge for dynamips routers
Ref #1109
2017-07-10 20:38:28 +02:00
c6f28afb7c Fix a broken test 2017-07-10 20:35:02 +02:00
7f4eeb56fa Remove unusued code 2017-07-10 13:50:57 +02:00
339ed8ab57 Merge pull request #1106 from GNS3/idlepc_apicall
Implement an api call for computing the IDLE PC
2017-07-10 11:33:16 +07:00
5bdc239064 Merge pull request #1104 from GNS3/filters_api
Support packet filtering for VPCS
2017-07-08 18:50:00 +07:00
3eadbb9adb Implement an api call for computing the IDLE PC
Fix https://github.com/GNS3/gns3-gui/pull/2153
2017-07-07 17:50:40 +02:00
d17b4eb053 Merge pull request #1105 from GNS3/bugfix-2136
Bugfix 2136 (gui) issue with UTF-8 characters and Docker
2017-07-07 09:04:47 +02:00
8f260e0a83 Update field names for filters. 2017-07-06 16:53:05 +07:00
e0f0adf3c8 Added preferred Docker API version. Fixes #2136 2017-07-06 11:24:55 +02:00
8e8b8bc5a5 WebSocket binary mode support for docker 2017-07-06 10:13:00 +02:00
4097bab565 Apply feedback from @grossmj 2017-07-05 16:36:39 +02:00
c6f9ec3758 More information on Docker WebSocket error 2017-07-05 10:36:58 +02:00
dc7a9ffc51 Merge pull request #1103 from GNS3/graphics-settings
Graphics settings
2017-07-04 15:15:36 +02:00
08423eff96 Support packet filtering for VPCS
https://github.com/GNS3/gns3-gui/issues/765
2017-07-04 15:12:26 +02:00
dadbb0ab09 More options for drawing area 2017-07-03 10:01:22 +02:00
cc34f45677 Additional drawing options for Project 2017-06-30 14:31:25 +02:00
3132dbd9eb Merge pull request #1096 from GNS3/bugfix-725
Enable binding server to an IPv6 host
2017-06-30 17:28:40 +08:00
b33a1f5214 Enable binding server to an IPv6 host 2017-06-30 10:21:15 +02:00
8f72356bab Rebuild the documentation 2017-06-29 17:14:46 +02:00
63e9558b10 New VPCS base config. Fixes #786. 2017-06-28 17:40:54 +08:00
5b19ef4862 Remove forgotten debug message. 2017-06-28 16:11:46 +08:00
799a2d376e Merge pull request #1092 from GNS3/fix_vpcs_name
Fix the initial startup for VPCS is not used
2017-06-28 16:09:54 +08:00
0a6dc55645 Fix appliance properties lost when you create two node from template 2017-06-28 09:37:19 +02:00
617868402f Fix the initial startup for VPCS is not used
The default VPCS template didn't provide the base
startup config setting. This prevent the replacement
of the hostname in the configuration file.

Fix https://github.com/GNS3/gns3-gui/issues/2123
2017-06-27 18:44:31 +02:00
c1a4bba101 Merge pull request #1091 from GNS3/bugfix-557
Bugfix 557
2017-06-27 11:17:12 +02:00
3c18150cdb Adjustment of IOU_OBJECT_SCHEMA 2017-06-27 11:14:34 +02:00
931018b877 Fix passing tests 2017-06-27 11:11:07 +02:00
6aa2afcf54 Fix #557 - mac addess collision when running IOU on multiple GNS3 servers 2017-06-27 10:09:21 +02:00
a7170da93f Update bundled appliances 2017-06-26 11:00:55 +02:00
1d09f423e5 Disable checking if IOU is on the same server 2017-06-23 12:20:49 +02:00
1e37101641 Allow IOU 64-bit images. 2017-06-23 12:00:33 +02:00
bcdac6c969 Fix test for ethernet switch show arp 2017-06-23 10:54:05 +02:00
3ed055dbb9 Merge pull request #1086 from GNS3/spice-qxl
spice - added qxl vga support
2017-06-23 09:57:32 +02:00
7447b3190d spice - added qxl vga support 2017-06-22 12:56:28 +02:00
1b6cefd82b Merge pull request #1055 from GNS3/embed_shell
Fake console for simple Ethernet switch
2017-06-22 00:24:14 +02:00
ad850f3857 Add port number in arp command output for Ethernet switch. 2017-06-22 00:23:33 +02:00
0ceec2629a Merge pull request #1081 from GNS3/spice-feature
Spice support
2017-06-21 15:16:30 +02:00
bc5ec98cd5 Spice support
* QEMU VNC options tests
* QEMU - SPICE support at build options and schemas
* SPICE console_type for nodes
2017-06-21 15:14:41 +02:00
a8e8eac0b4 Merge remote-tracking branch 'origin/master' into 2.1 2017-06-21 15:13:04 +02:00
5a1d313fca Merge pull request #1080 from GNS3/spice-feature
Spice feature
2017-06-21 10:37:04 +02:00
e7853a1be9 Merge pull request #1079 from GNS3/revert-1076-spice-feature
Revert "Spice feature"
2017-06-21 10:32:41 +02:00
36dc264a6c Revert "Spice feature" 2017-06-21 10:32:28 +02:00
efd5d82c88 Merge pull request #1076 from GNS3/spice-feature
Spice feature
2017-06-21 10:28:43 +02:00
ea9f0e52c8 Fixes #2108 (gns3-gui): getting project file with leading slashes issue (#1078) 2017-06-21 10:26:36 +02:00
6730cfe823 Merge pull request #1077 from GNS3/fix-win-tests
Fix tests on windows
2017-06-20 14:36:01 +02:00
2e6366a766 Fix tests on windows 2017-06-20 13:46:03 +02:00
e5bc7c7a66 Merge branch '2.1' into embed_shell 2017-06-19 11:10:24 +02:00
e1c20e6a22 Fix merge 2.0 error 2017-06-19 10:50:45 +02:00
734ca7d2f9 Fix linked base & linked clone settings in appliance 2017-06-19 10:49:23 +02:00
bb8097a052 Merge remote-tracking branch 'origin/master' into 2.1 2017-06-19 10:44:52 +02:00
8973cc6fee Merge branch '2.1' into embed_shell 2017-06-19 09:11:08 +02:00
c8c991af78 Fix the error about appliance ID not found (#1075)
* Fix the error about appliance ID not found

* Copy appliance data before editing it
2017-06-19 08:47:50 +02:00
61fda93611 SPICE console_type for nodes 2017-06-16 14:41:05 +02:00
88c2353e2e QEMU - SPICE support at build options and schemas 2017-06-16 10:17:26 +02:00
c91a001729 QEMU VNC options tests 2017-06-16 10:03:33 +02:00
b8a4785633 2.0.4dev1 2017-06-13 10:37:41 +02:00
41af46cdc5 2.0.3 release 2017-06-13 10:35:50 +02:00
64a852f38f Fixes #1068 - handle zipfile encoding issues at project duplication 2017-06-09 15:32:25 +02:00
5c0d955156 Fix: #1066 - Catching parsing errors at linked vbox file 2017-06-09 10:41:34 +02:00
c1c3a9ed80 Drop debug 2017-06-09 09:31:18 +02:00
0dd35e1cbe Ignoring virtualenv directory at gitignore 2017-06-09 09:14:25 +02:00
7235a312ab Escaping VPCS name in regex #1067 2017-06-09 09:14:25 +02:00
ae328e5c50 Merge branch '2.1' into embed_shell 2017-06-07 18:21:41 +02:00
40cc5d76b3 Fix racecondition when listing interface
Fix #1060
2017-06-07 15:57:05 +02:00
b9e2b7945a Removed gc collection at testing 2017-06-07 14:39:47 +02:00
eb6068c3d3 Fix Qemu disk creation with unicode characters not supported by local filesystem #1058 (#1063) 2017-06-07 12:35:41 +02:00
c538ec5937 Fix tests on case sensitive file system 2017-06-07 11:20:55 +02:00
e0b519eced Fix when config file doesn't have computes section (#1062) 2017-06-07 10:50:40 +02:00
cdcdba7411 Fix installation issue with Python 3.4 and aiohttp cors 2017-06-06 17:41:36 +02:00
2fe589b1a8 Fix invalid test for 1.3 topology conversion to GNS3 2.1 2017-06-06 16:07:27 +02:00
ca3f8d0b43 Provide easy to test a shell by using stdin as an input 2017-06-02 14:50:34 +02:00
88cd804274 Update readme 2017-06-02 11:40:39 +02:00
6a0345897d Connector is no longer supported in ws_connect by aiohttp 2.0 2017-06-02 10:42:40 +02:00
7dfb634376 Fix for websocket usage with aiohttp 2.0
Fix #1050
2017-06-01 18:39:55 +02:00
823288dd0b Fix a crash in some cases 2017-06-01 18:35:03 +02:00
ed656b7ab2 Merge branch '2.0' into 2.1 2017-05-31 17:07:13 +02:00
e74e66b203 Typo in error message 2017-05-31 17:04:14 +02:00
93adef91d8 Merge branch '2.0' into 2.1 2017-05-31 16:58:31 +02:00
6fa27c6885 Check aiohttp version 2017-05-31 16:56:46 +02:00
07049562a4 Update pytest from 3.1.0 to 3.1.1 (#1056) 2017-05-31 15:34:36 +02:00
5616ab0e9a Fake console for simple Ethernet switch
Fix #454
2017-05-31 15:13:29 +02:00
4f6cca0019 Fix errors when enabling chunking 2017-05-31 11:17:28 +02:00
7044c8c9ff Fix the GUI disconnect from the server
Fix https://github.com/GNS3/gns3-gui/issues/2084
2017-05-31 11:03:44 +02:00
7913646ce3 2.0.3dev1 2017-05-30 08:58:05 +02:00
78e1321bae 2.0.2 2017-05-30 08:57:07 +02:00
c46a9da769 Update sphinx from 1.6.1 to 1.6.2 (#1049) 2017-05-29 09:01:12 +02:00
89394ba7e0 Drop SSL support 2017-05-26 15:54:08 +02:00
b8ee8d69c8 Fix unexpected keyword argument 'conn_timeout'
Fix #1047
2017-05-26 15:42:46 +02:00
ef5c013561 Merge branch 'master' into 2.0 2017-05-26 10:47:57 +02:00
8bbe7e8041 Set correct permission on ubridge when doing a remote installation 2017-05-26 10:47:25 +02:00
777361c23d Merge branch 'master' into 2.0 2017-05-26 10:32:26 +02:00
c3d5abd104 Remote install script should be totally non interactive 2017-05-26 10:29:33 +02:00
39879ca92b Duplicate project on remote server use UUID
Ref https://github.com/GNS3/gns3-server/issues/1040
2017-05-23 17:20:51 +02:00
5a86277a9f Test that import erase the auto_open and auto_start setting
Ref #1041
2017-05-23 16:08:30 +02:00
b87692acce Fix import of some old topologies from 1.3 2017-05-23 14:05:47 +02:00
d765d02f06 Fix error in logging of error during starting GNS3 VM 2017-05-23 13:39:41 +02:00
5bb6c51698 Fix an error when logging Docker container fail to start 2017-05-23 13:31:04 +02:00
59488e8064 Fix tests on python 3.4 (#1046) 2017-05-23 12:15:04 +02:00
54e80d68f8 Fix test failed on Python 3.4
Fix #1045
2017-05-23 11:11:13 +02:00
2a8911d19e Keep DOCKER_MINIMUM_API_VERSION and DOCKER_MINIMUM_VERSION consistent 2017-05-23 11:00:15 +02:00
8b7209ea78 Use docker version in error message of outdated docker installation 2017-05-23 10:41:42 +02:00
7d48eba01b Use versioned docker API
Since docker v1.13 the unversioned docker API is deprecated.
Backport of gns3-server 2.0, commit effbe59
2017-05-23 10:37:47 +02:00
1e598d1890 Test for support of docker commit images
Ref #1039
2017-05-23 10:23:12 +02:00
2191c487b6 Support images created by "docker commit". Fixes #1039 2017-05-23 10:23:11 +02:00
3ed49bbdd5 Update pytest from 3.0.7 to 3.1.0 (#1044) 2017-05-23 08:29:36 +02:00
82f1ab2be2 Merge pull request #1036 from GNS3/aiohttp_2.0
Aiohttp 2.0
2017-05-22 22:41:01 +02:00
7d30da5d4e Do not wait auto start to finish in order to complete project opening
Fix https://github.com/GNS3/gns3-gui/issues/2074
2017-05-22 20:18:07 +02:00
4dc55a5af4 Improve logging for remote server connection lost
Ref https://github.com/GNS3/gns3-gui/issues/2074
2017-05-22 13:57:32 +02:00
bdd980d6a2 Ignore console_hsot when loading topologie 2017-05-22 11:42:50 +02:00
51d6152a5c Fix support for some old topologies
Fix #1042
2017-05-19 18:27:20 +02:00
bdcadcc335 Fix support from some old topologies
Fix #1038
2017-05-19 17:49:39 +02:00
624a2c02c5 FIX iou creation
Fix https://github.com/GNS3/gns3-gui/issues/2065
2017-05-18 17:13:40 +02:00
189ad994c8 Symbols are returned with a content length 2017-05-18 16:37:44 +02:00
a4245fcf44 Aiohttp 2.0
Ref #1000
2017-05-17 18:42:17 +02:00
812ff6b5d8 Update sphinx from 1.5.6 to 1.6.1 (#1035) 2017-05-17 08:30:16 +02:00
f338158654 Use 127.0.0.1 for local UDP tunnels to uBridge for Qemu. Ref #664. 2017-05-16 20:51:14 +02:00
e9fef928b0 Fix dynamips node creation error 2017-05-16 10:49:45 +02:00
5c5caf8418 Add comment about why we change linked_base to linked_clone 2017-05-16 10:38:58 +02:00
aff5554528 Rename old properties from gui linked_base to linked_clone
Fix #1034
2017-05-16 10:33:37 +02:00
2a159c06c5 Fix forwarding properties
Fix #2005, #2002
2017-05-16 10:22:55 +02:00
c231e2bbf1 Merge branch '2.0' into 2.1 2017-05-16 09:30:07 +02:00
e24bfd5913 2.0.2dev1 2017-05-16 09:16:35 +02:00
f2d5eb0b27 2.0.1 2017-05-16 08:47:35 +02:00
bef1b2e8f1 Merge branch '2.0' into 2.1 2017-05-16 08:38:13 +02:00
39419462db Handle HTTP 504 errors from compute node
Fix #1032
2017-05-16 08:37:54 +02:00
ddc5e8169e Merge pull request #1031 from GNS3/async_images
When connecting to a compute node ask for qemu images list
2017-05-15 21:20:28 +02:00
cd17ef6b12 Merge branch '2.0' into 2.1 2017-05-15 15:46:50 +02:00
3dc478385b When connecting to a compute node ask for qemu images list
The server start to compute qemu image list in background
because first time discovery could be slow due to the compute
time of md5sum.

Fix #996
2017-05-15 15:35:48 +02:00
851d6e1db8 When importing portable project NAT node is loaded on GNS3 VM
Fix #1030
2017-05-15 10:21:37 +02:00
facdf9c617 Update sphinx from 1.5.5 to 1.5.6 (#1029) 2017-05-15 09:41:18 +02:00
70d34befb9 Merge remote-tracking branch 'origin/2.0' into 2.0 2017-05-12 21:04:39 +08:00
8696a464ab Merge pull request #1027 from GNS3/fix_wic_numbering
Fix wic numbering
2017-05-12 21:03:05 +08:00
5721dd3f30 Fix port numbering for Wic slot 1 & 2 2017-05-12 14:12:24 +02:00
bf38a8515e Fix typo. 2017-05-12 18:54:54 +08:00
942cc09eda Fixes issue with connections when loading an ATM switch. 2017-05-12 18:00:58 +08:00
9baaf5685d Merge pull request #1028 from GNS3/filter_logs
Filter /settings from log
2017-05-12 17:31:42 +08:00
961dbb5162 Filter /settings from log
Fix #1026
2017-05-12 10:48:43 +02:00
19a6157f64 Fix wic numbering
Fix #1011
2017-05-12 09:48:05 +02:00
18cfcaa081 Fixes ATM mapping. 2017-05-12 13:09:26 +08:00
87d42f4eb9 Fixes Frame-relay VC mapping. 2017-05-12 12:39:01 +08:00
766456014b Fix export project is looking into the wrong directory
Fix #1010
2017-05-11 17:59:57 +02:00
f31e46e8ed Fix a race condition in logging when ubridge exit fast
Fix #1025
2017-05-11 17:26:18 +02:00
633cdef0bc Merge pull request #987 from GNS3/nat_vmware
NAT node can use the VMware NAT
2017-05-11 14:03:34 +08:00
fb6a95f7bb Fix conversion issue with old topology with C3640
Fix #1019
2017-05-10 13:50:19 +02:00
93fe66a253 Fix error when you have a directory in your symbols directory
Fix #1006
2017-05-10 13:40:49 +02:00
e870b0cfa0 Catch VMWare errors when getting status after GNS3 VM start
Fix #1008
2017-05-09 19:16:47 +02:00
b4467d83bf Make sure upstart LANG is utf8
Fix #1017
2017-05-09 18:54:01 +02:00
ac5509f383 Always install typing module (compat with python 3.4 on ubuntu)
Fix #1021
2017-05-09 15:09:55 +02:00
050f6876ce Fix KeyError: 'filename'
Fix #1018
2017-05-09 12:25:15 +02:00
2172c25df6 Run tests into a tmp directory prefixed by unicode character 2017-05-09 09:43:47 +02:00
48dae085aa Catch missing function listxattr on some Linux host. 2017-05-08 21:02:23 +07:00
bfee08459d Test image sorting
Ref https://github.com/GNS3/gns3-gui/issues/2030
2017-05-05 20:09:51 +02:00
8a6584d90f Sort image list
Fix https://github.com/GNS3/gns3-gui/issues/2030
2017-05-05 19:52:45 +02:00
6870749e50 Handle a race condition at project closing
Fix #1015
2017-05-05 19:39:06 +02:00
3070a68273 Fix unicode error when reading ios configuration
Fix #1013
2017-05-05 19:27:04 +02:00
bda36081a9 Fix AttributeError: 'NoneType' object has no attribute 'send'
Fix #1014
2017-05-05 17:16:07 +02:00
930e7089db Fix a conversion issue with some 1.3 topologies 2017-05-04 12:09:56 +02:00
04220846b3 Fix an error with ethernetswitch when ethertype is null
Fix #1007
2017-05-04 10:33:02 +02:00
694a4e8068 Raise an error if we can't create the dynamips configuration directory
Fix #992
2017-05-03 17:55:13 +02:00
7ba351c888 Catch timeout error when loading virtualbox VM
Fix #999
2017-05-03 17:44:55 +02:00
ae3e25b03b Handle broken compute at server startup
Fix #1001
2017-05-03 17:40:58 +02:00
fa1450cb24 Catch error when we can't backup the topology
Fix #998
2017-05-03 17:35:10 +02:00
8e5f7d0838 Catch error when writting the topology file on read only device
Fix #1003
2017-05-03 17:28:47 +02:00
31d1696215 Catch a race condition in VirtualBox when editing and linking
Fix #993
2017-05-03 16:14:42 +02:00
078a6d8d34 Fix a race condition when editing a qemu vm and connecting it
Fix #997
2017-05-03 16:01:51 +02:00
ecba758c58 Docker aux console is a VT100 terminal
Without that program like nano can't work.

Signed-off-by: Julien Duponchelle <julien@gns3.net>
2017-05-03 10:30:43 +02:00
6190b9c189 2.0.1dev1 2017-05-03 10:18:26 +02:00
c88886911e 2.0.0 2017-05-02 10:16:11 +02:00
56d91b648c Fix connection to websocket with last docker release
Fix https://github.com/GNS3/gns3-gui/issues/1994

Signed-off-by: Julien Duponchelle <julien@gns3.net>
2017-04-28 16:06:43 +02:00
1b0f5c63b8 Fix connection to websocket with last docker release
Fix https://github.com/GNS3/gns3-gui/issues/1994

Signed-off-by: Julien Duponchelle <julien@gns3.net>
2017-04-28 16:03:26 +02:00
a6d085bf61 Fix server startup on windows 2017-04-28 11:06:39 +02:00
b0f45035a9 NAT node can use the VMware NAT
On Windows and Mac OS this allow the NAT node to use the
VMware nat (it's always vmnet8). On Linux we still use the
libvirt NAT
2017-04-27 15:26:58 +02:00
273a711459 Merge branch '2.0' into 2.1 2017-04-26 17:22:14 +02:00
c3aecf935f Add new appliances 2017-04-26 17:02:33 +02:00
629443a5e5 Sync appliances 2017-04-26 16:27:59 +02:00
2da581139c Lower docker requirements in tests also 2017-04-24 18:49:47 +02:00
1a90305baa Docker minimum api is 1.25 2017-04-24 18:43:12 +02:00
effbe59414 Lock docker API to 1.27
Fix https://github.com/GNS3/gns3-gui/issues/1994
2017-04-24 17:51:55 +02:00
8b9f22c30c Handling server disconnect error when docker daemon die
Fix #985
2017-04-24 17:37:41 +02:00
c9ceeee9de Handle some invalid SVG images
Fix #986
2017-04-24 17:31:20 +02:00
78e030b7ab 2.0.0dev13 2017-04-20 10:55:36 +02:00
456a28304d 2.0.0rc4 2017-04-20 10:52:55 +02:00
11321383c5 Remove not working trigger of nightly build 2017-04-19 15:53:39 +02:00
d90a8fa482 Trigger nightly build when pushing 2017-04-19 15:52:36 +02:00
2962649dc8 Fix a race condition when handling error at project opening
Fix #983
2017-04-19 09:17:32 +02:00
d9b93ccd66 Fix an issue with editing network on windows
Fix  #982
2017-04-18 18:04:00 +02:00
37e21f2a3d Skip a test for qemu not supported on windows 2017-04-18 16:35:36 +02:00
c72ae1bfe7 Fix IOU test run on Windows 2017-04-18 16:21:45 +02:00
54014ccd39 Fix one more windows test 2017-04-18 16:01:07 +02:00
b4434b5134 Add tests for checking if path are correctly cleaned 2017-04-18 15:50:11 +02:00
691c2dfd8e Drop a test about OVA no longer use 2017-04-18 14:27:44 +02:00
36de30e25e Fix various tests for windows 2017-04-18 14:23:29 +02:00
3de04d6e76 Install winpcap for the windows tests 2017-04-18 14:08:37 +02:00
51ef5d8c90 Fix a broken test on windows machines 2017-04-18 14:04:50 +02:00
0d687e62ad Try to enable test on appveyor 2017-04-18 13:54:30 +02:00
0bf6ed52cd Verbose test on windows 2017-04-18 13:39:34 +02:00
b152360c5b Merge branch 'master' into 2.0 2017-04-18 12:33:19 +02:00
722028b2d2 Install win32 dependencies for the tests 2017-04-18 12:27:54 +02:00
25a992a870 Build only for Python 3.6 on Windows 2017-04-18 12:24:19 +02:00
c50e80b2d3 Setup appveyor 2017-04-18 12:16:54 +02:00
5729d37992 Setup appveyor 2017-04-18 11:54:10 +02:00
7302f65ffe Catch timeout error on docker
Fix #981
2017-04-18 11:44:20 +02:00
152807e654 Merge branch 'master' into 2.0 2017-04-18 09:22:58 +02:00
3518a781e9 typing is already included in Py >= 3.5 (#979) 2017-04-18 09:15:16 +02:00
f3a87d76ef Fix import of some old topologies
Fix #977
2017-04-14 10:38:21 +02:00
57cdef6b02 Fix AttributeError: 'NoneType' object has no attribute 'returncode'
Fix #976
2017-04-14 10:33:19 +02:00
d2d5f003f8 Fix a merge error 2017-04-14 09:09:43 +02:00
540ffdf5f3 Merge remote-tracking branch 'origin/master' into 2.0 2017-04-14 08:55:37 +02:00
5fb2a462c2 Merge master 2017-04-14 08:53:53 +02:00
a9b76c9656 1.5.5dev1 2017-04-14 08:46:31 +02:00
838680cb40 1.5.4 2017-04-13 17:30:25 +02:00
85136bc2e4 Fix VPCS tests for recent version 2017-04-13 15:56:12 +02:00
6d150bb62c Freeze server dependencies to the same version used for 1.5.3 2017-04-13 14:45:27 +02:00
3afe85ba3c Fix 1.5: Error message, when stopping IOU router #769
Signed-off-by: Julien Duponchelle <julien@gns3.net>
2017-04-13 14:25:40 +02:00
57ba7ab801 Fix crash in some tests 2017-04-13 14:24:26 +02:00
b755840a27 Add security issues section 2017-04-13 12:38:16 +02:00
a8294c3de8 Backport requirements of 2.0 2017-04-13 10:22:20 +02:00
878aee6e90 Correct version number 2017-04-13 09:55:22 +02:00
9dc6f0f486 Embed the appliances in the server. (#927)
This add a /appliances call
2017-04-12 14:35:49 +02:00
62cd5e4aa3 Fix ghost vmware vms
Fix #975
2017-04-11 15:05:31 +02:00
18835974fb Fix required field in schema not use
Fix #972
2017-04-11 10:57:01 +02:00
ab2af5ceab Catch error and log them when we can't write the config
Fix #974
2017-04-10 17:44:09 +02:00
fdd1084714 Fix bridge 'bridge0' already exist when we have trouble with a container
Fix #973
2017-04-10 16:58:00 +02:00
03a134af75 Catch an error at startup when the remote GNS3 VM is not a real GNS3 VM 2017-04-07 15:34:18 +02:00
5edb631b00 Fixes Qemu sata option. Ref #875. 2017-04-07 17:25:14 +08:00
ec6fdb7324 Catch GNS3 VM loading error at startup 2017-04-04 14:25:30 +02:00
7f621ed5dd Update sphinx from 1.5.4 to 1.5.5 (#967) 2017-04-03 23:44:26 +02:00
8f33d9ab79 Update documentation links
Fix #1977
2017-04-03 16:27:08 +02:00
b7e1a56056 Catch a startup error due to the usage of some antivirus 2017-04-03 16:25:37 +02:00
11c7f35ea2 Update sphinx from 1.5.3 to 1.5.4 (#966) 2017-04-03 09:06:26 +02:00
b92f881921 2.0.0dev12 2017-03-31 10:08:56 +02:00
ef5714bd3e 2.0.0rc3 2017-03-31 10:07:25 +02:00
4f1b738ef5 Merge branch '2.0' into 2.1 2017-03-30 10:16:16 +02:00
cfe13e1929 Support IOU image without .bin at the end 2017-03-29 16:08:13 +02:00
935ca17d7a Allow to change some properties of an already connected ethernet switch
Fix https://github.com/GNS3/gns3-gui/issues/1970
2017-03-29 13:22:24 +02:00
644616b69c Ensure we start only one ubridge
Fix https://github.com/GNS3/gns3-gui/issues/1964
2017-03-28 16:27:09 +02:00
84da9b4c23 Remove unused module import 2017-03-28 14:51:55 +02:00
7528152475 Ignore new version or aiohttp cors 2017-03-28 14:10:29 +02:00
815820f692 Catch some broken hostname for compute node
Fix #961
2017-03-28 12:14:27 +02:00
2564740665 Fix limit of 20 docker containers
Fix #963
2017-03-28 11:54:16 +02:00
42f409d5f9 Fix race conditions in creation of Frame Relay Switch 2017-03-28 11:25:26 +02:00
aae37034e1 Fix conversion of project from 1.X with custom symbol for cloud 2017-03-28 09:12:36 +02:00
132bc87081 Dissallow parallel pull of docker images
Fix #962
2017-03-27 20:46:25 +02:00
25c4207661 Add a scripts for running current dev version on GNS3 VM 2017-03-27 17:13:07 +02:00
8d22f2930e Fix a crash with missing size in the svg files
Fix #960
2017-03-27 10:41:28 +02:00
ac05db5d1b Fix an utf8 error in auth code 2017-03-27 10:38:41 +02:00
80e361ff2e Improve vmrun timeout message
Ref https://github.com/GNS3/gns3-gui/issues/1967
2017-03-27 09:00:58 +02:00
541afe9660 Support utf-8 characters in user and password for auth
Fix #959
2017-03-23 15:50:02 +01:00
bbfd56606c Notify pyup that some dependencies doesn't require update 2017-03-23 09:50:46 +01:00
4036e519a7 Update aiohttp-cors from 0.5.0 to 0.5.1 (#957) 2017-03-23 09:49:49 +01:00
9fd5e4cbc9 Handle password configuration change on remote servers
Fix https://github.com/GNS3/gns3-gui/issues/1942
2017-03-22 18:29:08 +01:00
cb78eb4ee3 Fix Bug when delete fake-running VMBox
Fix https://github.com/GNS3/gns3-gui/issues/1933
2017-03-22 11:08:16 +01:00
8712866489 Fix Can't connect to compute local on some computers
Chicken and egg problem we try to connect to compute
before http was available. I rewrote the code to prevent
erase of settings and rollback the beta4 code for init.

Fix #946
2017-03-21 18:06:45 +01:00
1566d7f12a Remove UDP server discovery because not use for the moment 2017-03-21 17:04:59 +01:00
cc6f4c0510 Add a modification uuid to settings returned by the server
Ref #1949
2017-03-21 13:35:02 +01:00
73c31b4b87 Update docs 2017-03-21 13:32:04 +01:00
c608a4ab38 Remove port name format documentation (moved to docs.gns3.com) 2017-03-21 10:30:33 +01:00
c5290cfec6 Check python version in setup.py only for install
This allow us to use this on build service like travis.
2017-03-21 10:06:07 +01:00
34f5a6f82c Fix Session is closed when listing docker images
Fix #955
2017-03-20 23:50:31 +01:00
78c154e376 Cleanup docker source code 2017-03-20 20:30:59 +01:00
a571b1a2f8 Use aiohttp session for docker queries 2017-03-20 19:46:50 +01:00
55563b9808 Escape special characters from SVG text
Ref https://github.com/GNS3/gns3-server/issues/952
2017-03-20 19:14:07 +01:00
5409d9c3f8 Fix some port short name display issues
Fix https://github.com/GNS3/gns3-gui/issues/1940
2017-03-20 18:10:00 +01:00
95f864c871 Catch server disconnected errors from computes
Fix #953
2017-03-20 17:13:37 +01:00
a62b791c68 Fix TypeError: http_query() got an unexpected keyword argument 'timeout'
Fix #947
2017-03-20 17:06:00 +01:00
bc0e4c1174 Generate a node uuid if the uuid is missing in the .gns3
Fix #950
2017-03-20 16:21:09 +01:00
0997998064 Ensure to dump project before exporting it
Fix #951
2017-03-20 14:57:20 +01:00
c8b46bdcab Fix return code check for SIGSEGV of IOU images
Fix #948
2017-03-20 09:46:07 +01:00
2ddb329a90 Prevent vmname change for VirtualBox linked clone
Fix https://github.com/GNS3/gns3-gui/issues/1930
2017-03-16 19:17:12 +01:00
1b84874762 Upgrade to aiohttp 1.3.5 to solve issue with big file
Fix #943
2017-03-16 18:42:00 +01:00
7c318d477d Handle some invalid svg
Fix #944
2017-03-16 18:39:07 +01:00
490576fedc Try to fix some 1.3 topology with corrupted data
Fix #945
2017-03-16 18:29:02 +01:00
31ed2a4c96 Fix ComputeError: Can't connect to Main server
Fix #942
2017-03-16 12:05:30 +01:00
6a015fffeb Catch error when the server as trouble to access to itself
Fix #940
2017-03-16 10:50:08 +01:00
08bafc2dcc Catch a timeout error in docker
Fix #936
2017-03-16 10:39:08 +01:00
cb6f94bc24 Lock yarl version because 0.10 is not compatible with aiohttp 1.3 2017-03-15 10:51:00 +01:00
d37d3e7d77 Update pytest from 3.0.6 to 3.0.7 (#935) 2017-03-15 10:20:34 +01:00
2c0fb0d016 Raise error if image are not avaible on main server during export
Fix https://github.com/GNS3/gns3-gui/issues/1928
2017-03-14 18:00:16 +01:00
233a5fbed4 Fix a race condition when killing ubridge
Fix #931
2017-03-13 18:21:43 +01:00
84a6ed7684 If your settings from 1.X are broken with skip them at import
Fix #932
2017-03-13 18:17:17 +01:00
1d5029e4e2 Catch a permission error on symbols
Fix #930
2017-03-13 17:50:39 +01:00
d60597ca0d Catch unicode error when you try to duplicate a project with invalid characters
Fix #934
2017-03-13 17:11:37 +01:00
886329a978 Catch error when you try to put an invalid server url
Fix #929
2017-03-13 16:59:42 +01:00
0dc38a3970 Fix an error when handling ubridge errors
Fix #933
2017-03-13 16:57:24 +01:00
9ef334331e Fix crash when handling an error in project creation
Fix #928
2017-03-13 16:55:35 +01:00
5e2b619305 Merge branch 'master' into 2.0 2017-03-13 15:42:58 +01:00
fea77398e7 Publish on PyPi when we tag 2017-03-10 20:33:17 +01:00
3cfe83ae84 2.0.0rc2 2017-03-10 20:24:57 +01:00
55b4e95396 Merge branch 'master' into 2.0 2017-03-09 19:10:29 +01:00
b909ec978f Drop color logging for remote install, seem to fail in some conditions 2017-03-09 19:09:56 +01:00
99ee40df3d Do not return broken appliances like ASA 8 2017-03-09 15:44:48 +01:00
21849656d1 Merge branch '2.0' into 2.1 2017-03-08 18:17:15 +01:00
c2ccad35fe Merge branch 'master' into 2.0 2017-03-08 18:16:36 +01:00
cb338d9583 Cleanup the remote install script 2017-03-08 18:15:43 +01:00
bb45ff0d9a Support for Xenial in remote install
Fix #923
2017-03-08 15:58:28 +01:00
5036079deb Merge branch '2.0' into 2.1 2017-03-07 16:48:31 +01:00
7b642552dd Fix GNS3VM settings are lost at startup
Fix #926
2017-03-07 15:36:35 +01:00
6017ebbd97 Merge branch '2.0' into 2.1 2017-03-07 11:16:05 +01:00
d89ea83746 When we receive settings from the client save them on disk 2017-03-07 11:12:51 +01:00
e3974377ed Merge pull request #888 from GNS3/embed_appliances
Embed the appliances in the server.
2017-03-06 17:43:15 -07:00
78e5944e66 2.0.0dev10 2017-03-06 19:35:16 +01:00
5b217d2043 2.0.0rc1 2017-03-06 19:31:02 +01:00
54131bc9bb Update the documentation 2017-03-06 14:35:39 +01:00
8b7035b185 Enable show in file manager for cloud
Fix https://github.com/GNS3/gns3-gui/issues/1900
2017-03-06 14:25:53 +01:00
94d285301a Improve error log when you have trouble to load a topology 2017-03-06 12:15:52 +01:00
5e7f97b175 Fix when qemu exit by itself clean other processes
Fix https://github.com/GNS3/gns3-gui/issues/1898
2017-03-03 18:40:26 +01:00
e828c9068a Fix an issue with some node name format
Fix #922
2017-02-28 18:03:10 +01:00
5a399b90fe Merge branch '2.1' into embed_appliances 2017-02-28 14:55:33 +01:00
583327ad33 Merge branch '2.0' into 2.1 2017-02-28 14:32:40 +01:00
7e1e63cd09 Catch error when we can't save the settings
Fix #921
2017-02-28 14:31:52 +01:00
1ab9ca2333 Merge branch '2.0' into 2.1 2017-02-28 14:25:38 +01:00
39106ac36b Do not prevent the creation of a local server on a machine named gns3vm
Fix #920
2017-02-28 13:11:03 +01:00
41d7570b24 Load local server before anything else 2017-02-28 12:08:47 +01:00
da8811515d Remove noise from log when VMware is not installed 2017-02-28 11:42:07 +01:00
ec6411f730 Fix an error with some SVG
Fix #919
2017-02-28 11:22:53 +01:00
70e2b87ff0 Patch hostname in configuration file even if name is unsync
Ref https://github.com/GNS3/gns3-gui/issues/1889
2017-02-27 12:48:05 +01:00
8fd59c7967 If the GNS3 VM as failed to start reset his status 2017-02-27 12:03:26 +01:00
9c71e96fd4 Report aiohttp version in crash report 2017-02-27 11:31:51 +01:00
8e9c480d8d Catch some invalid node name formatting
Fix #917
2017-02-27 11:24:06 +01:00
53dd1bd6e1 Ensure we dump a .gns3 before exporting it
Fix #915
2017-02-27 11:10:08 +01:00
34d0736946 Update sphinx from 1.5.2 to 1.5.3 (#916) 2017-02-27 08:45:45 +01:00
2e0f012952 Improve ACPI shutdown for virtualbox 2017-02-24 13:58:03 +01:00
65b75a9212 Fix an issue with serial capture for IOU
Fix https://github.com/GNS3/gns3-gui/issues/1886
2017-02-24 11:55:41 +01:00
366c567864 Fix restoration of private config when using dynamips
Fix #906
2017-02-23 18:21:00 +01:00
420c3792eb Merge branch 'unknow_error_bug' into 2.0 2017-02-23 18:08:46 +01:00
3fb24dd895 Avoid a crash when the connection with the server close 2017-02-23 17:54:01 +01:00
5bfa864f0c Increase timeout for detecting VirtualBox GNS3 VM 2017-02-23 16:19:20 +01:00
0d96471f29 Fix headless startup of the GNS3 VM 2017-02-23 15:35:30 +01:00
8aca3c7b99 Do not crash at startup if local server as the same name as remote server
Fix #910
2017-02-23 14:34:21 +01:00
30db4d8b5c Yarl 0.9.8 is require by aiohttp 1.3 2017-02-23 11:49:46 +01:00
afa3f12e30 Allow any 1.3 aiohttp release but not 1.4 2017-02-23 11:48:34 +01:00
726480f676 Disable Keep Alive because it's bug with old Qt versions 2017-02-23 09:32:26 +01:00
40be22bc58 Fix run missing function
Fix https://github.com/GNS3/gns3-gui/issues/1878
2017-02-23 09:13:27 +01:00
6a91804116 Catch error when you provide an invalid port name formating
Fix #909
2017-02-22 18:03:26 +01:00
ebe8c1e536 Update aiohttp from 1.2.0 to 1.3.3 (#905) 2017-02-22 10:28:43 +01:00
2884a40769 Fix error when the startup config file is missing
Fix https://github.com/GNS3/gns3-gui/issues/1877
2017-02-22 09:28:34 +01:00
b132d95a04 Fix error when you delete the builtin symbols directory
Fix #908
2017-02-20 18:28:49 +01:00
961c209ab1 Fix an issue when getting size from some SVG file
Fix https://github.com/GNS3/gns3-gui/issues/1866
2017-02-20 17:25:26 +01:00
132a7bfeb7 Catch an error in etherswitch when ubridge die
Fix #907
2017-02-20 12:19:38 +01:00
7407ab88b3 Fix a failing test on Python 3.6 2017-02-20 10:56:48 +01:00
7fea6f0e2e Fix conversion issue for old IOU projects
Fix https://github.com/GNS3/gns3-gui/issues/1868
2017-02-20 10:48:03 +01:00
5672b4b748 Merge pull request #890 from GNS3/base_config_server_side
Manage base configuration on server
2017-02-19 22:59:06 -08:00
aee7208f7b Merge pull request #895 from GNS3/qemu_more_adapters
Allow up to 275 adapters for qemu
2017-02-17 01:40:41 -08:00
635e163954 Update qemu_vm.py 2017-02-17 17:37:06 +08:00
99f817392d Raise an error if you use Qemu < 2.4 and try to use large number of adapters 2017-02-17 09:55:50 +01:00
51bf979284 Merge branch '2.0' into 2.1 2017-02-16 16:24:57 +01:00
a730fce514 2.0.0dev9 2017-02-16 11:23:19 +01:00
5796f47a55 Crash report key for b4 2017-02-16 11:21:39 +01:00
0f33448af2 2.0.0 beta 4 2017-02-16 11:19:27 +01:00
8d2c27eafd Lock aiohttp to see if it's the reason of Unkown error from Qt 2017-02-15 20:10:41 +01:00
10b039074f Avoid a crash in some conditions when reading the serial console 2017-02-15 19:31:38 +01:00
897c9cb42c Improve docker container for development 2017-02-15 19:31:18 +01:00
a2337ed6c6 Force installation of last aiohttp 2017-02-15 16:41:23 +01:00
b7e5c08fdf Display git version in commit 2017-02-15 12:58:12 +01:00
e04eb44a15 Disallow export of project with VirtualBox linked clone
Fix https://github.com/GNS3/gns3-gui/issues/1824
2017-02-14 16:41:31 +01:00
a191029c4f Fix linked_clone property lost during topology convert 2017-02-14 14:45:48 +01:00
0dbd92db11 Fix disk lost when save as a project using linked clone VirtualBox
Fix https://github.com/GNS3/gns3-gui/issues/1824
2017-02-13 19:11:29 +01:00
a576c57873 Catch permission error when restoring a snapshot
Fix #899
2017-02-13 15:30:02 +01:00
5639cbe860 Fix a rare crash when closing a project
Fix #900
2017-02-13 15:24:22 +01:00
defcf82610 Fix a rare error when closing a project
Fix #897
2017-02-13 15:18:00 +01:00
4fed98617b Add Dockerfile for development 2017-02-13 11:39:21 +01:00
2a840da462 Create an ApplianceTemplate class 2017-02-08 15:40:56 +01:00
8d86d959de "/appliances" => "/appliances/templates" 2017-02-08 14:51:00 +01:00
b0567772f7 Allow up to 275 adapters for qemu
See #889 for more details
2017-02-07 17:04:29 +01:00
5e02a9d450 Merge branch '2.0' into 2.1 2017-02-07 15:03:24 +01:00
f33e470601 Fix error when you have error on your filesystem during project convertion
Fix #894
2017-02-07 10:36:36 +01:00
19b70accd5 Catch error when we can't access to a unix socket 2017-02-06 17:59:00 +01:00
94fd4bcbe9 Fix stacktrace display when connecting to remote server
Fix #891
2017-02-06 17:56:08 +01:00
6ded234681 Fix an error with Python 3.4 2017-02-06 17:19:02 +01:00
bcc71b5455 Fix a crash with Python 3.4
Fix https://github.com/GNS3/gns3-server/issues/876
2017-02-06 16:52:13 +01:00
08c2892295 If we can't resolve compute name return 0.0.0.0
It's not perfect, but it's rare in most cases it's
handle before.

Fix #892
2017-02-06 16:47:40 +01:00
9c7d2e9915 Raise an error if you put an invalid key in node name
Fix https://github.com/GNS3/gns3-gui/issues/1833
2017-02-06 15:05:29 +01:00
0d7157c295 Improve a lot project loading speed
Fix #893
2017-02-06 11:57:56 +01:00
fbe26d11cf Fix a potential crash 2017-02-06 11:07:35 +01:00
d06af526b2 Fix the server don't start if a remote is unavailable 2017-02-06 10:49:09 +01:00
959c08449e Do not crash if you pass {name} in name 2017-02-03 14:56:55 +01:00
96194cef67 Fix import/export of dynamips configuration 2017-02-03 14:44:32 +01:00
e892e5dfab Manage base configuration on server
Fix #786
2017-02-03 13:19:14 +01:00
afcd27f348 Merge branch '2.0' into 2.1 2017-02-02 15:35:04 +01:00
63b888a57e Drop unused code 2017-02-02 15:34:39 +01:00
842e2c7fbf Merge branch '2.0' into 2.1 2017-02-02 11:54:03 +01:00
46d405c8b3 Simplify conversion process from 1.3 to 2.0
This could avoid some corruption issue.
2017-02-02 11:52:55 +01:00
dc6756d5ae Embed the appliances in the server.
This add a /appliances call
2017-02-01 11:30:14 +01:00
5204cec9e6 Merge branch '2.0' into 2.1 2017-02-01 10:08:38 +01:00
f0ff035c0b Prevent corruption of VM in VirtualBox when using linked clone
Fix https://github.com/GNS3/gns3-gui/issues/1821
2017-01-31 18:58:43 +01:00
27a1089806 Fix creation of qemu img
Fix https://github.com/GNS3/gns3-gui/issues/1826
2017-01-31 15:16:05 +01:00
bfbc6ff0be Fix rare race condition when stopping ubridge
Fix #887
2017-01-31 13:43:05 +01:00
580693b1ec Prevent renaming of a running VirtualBox linked VM
Fix https://github.com/GNS3/gns3-gui/issues/1816
2017-01-30 15:19:46 +01:00
2da20177a2 Avoid crash when you broke your system permissions
Fix #877
2017-01-27 10:56:48 +01:00
267a5ae3a8 Do not crash when you broke permission on your file system during
execution

Fix #878
2017-01-27 10:52:17 +01:00
8ff7670031 Fix a crash when you broke permission on your file system
Fix #879
2017-01-27 10:49:57 +01:00
d99ec92210 Fix a rare race condition when exporting debug informations
Fix #880
2017-01-27 10:48:07 +01:00
b9bd6aa501 Do not try to start the GNS3 VM if the name is none
Fix #881
2017-01-27 10:41:39 +01:00
d901efae51 2.1.0dev1 2017-01-24 10:37:23 +01:00
1ed88eda85 Fix version check for VPCS 2017-01-23 21:11:52 +01:00
a24490930f Fix pcap for PPP link with IOU
Fix https://github.com/GNS3/gns3-gui/issues/1799
2017-01-23 18:28:06 +01:00
dc40b0296e Correct link are not connected to the correct ethernet switch port after conversion
Fix https://github.com/GNS3/gns3-gui/issues/1797
2017-01-23 13:34:11 +01:00
f90e6f2f5b Fix an error if you don't have permissions on your symbols directory
Fix #872
2017-01-23 10:23:18 +01:00
a1a677fcd3 Fix an error when converting some topologies from 1.3
Fix #871
2017-01-23 10:18:35 +01:00
9d6d15c1bc Update sphinx from 1.5.1 to 1.5.2 (#873) 2017-01-23 10:01:53 +01:00
5183ef8348 Update pytest from 3.0.5 to 3.0.6 (#874) 2017-01-23 10:00:18 +01:00
1b07c31ef1 2.0.0 dev8 2017-01-19 11:17:22 +01:00
c5be64a44f 2.0.0b3 2017-01-19 11:16:05 +01:00
6177a45eb5 Merge branch 'master' into 2.0 2017-01-19 11:04:56 +01:00
e7a88a7d99 Force the dependency on typing because otherwise it's broke on 3.4 2017-01-19 10:27:32 +01:00
89d98bc528 Fix sometimes you have an exception when closing GNS3
Fix #869
2017-01-18 18:38:25 +01:00
d74769c824 Fix duplicate node names
Fix https://github.com/GNS3/gns3-gui/issues/1796
2017-01-18 18:28:50 +01:00
e5dba5e66a Fix bug with other directory of Qemu images
Fix https://github.com/GNS3/gns3-gui/issues/1790
2017-01-18 12:39:10 +01:00
3c0bdd12b5 Do not raise an error if no VM is selected for remote GNS3 VM 2017-01-18 09:49:59 +01:00
47c58bb400 Fix UnboundLocalError: local variable 'vmname' referenced before assignment
Fix #868
2017-01-18 09:39:27 +01:00
c9f3ea4489 Fix some race condition in project deletion
Fix #866
2017-01-17 19:37:38 +01:00
d10e707f4f Turn off coveralls 2017-01-17 18:58:43 +01:00
28cbae546d Fix tests broken by recent pytest upgrades 2017-01-17 18:56:06 +01:00
82da073dd7 If qemu status change internally we mirror it 2017-01-17 16:03:12 +01:00
6938e400d1 Fix VPCS test suite 2017-01-17 16:02:56 +01:00
bfb23ce7a3 Fix hostname of VPCS is not changed
Fix https://github.com/GNS3/gns3-gui/issues/1780
2017-01-17 14:34:48 +01:00
e06be6729a Fix streaming test 2017-01-17 09:05:05 +01:00
304d92764c Fix capture stop with Wireshark
Fix https://github.com/GNS3/gns3-gui/issues/1763
2017-01-16 20:31:55 +01:00
2de284ea30 Fix some tests on travis 2017-01-16 10:13:13 +01:00
7a0783d050 Drop a useless debug information
Fix https://github.com/GNS3/gns3-gui/issues/1778
2017-01-16 09:17:08 +01:00
7241063ddf Fix sometimes VirtualBox VM are not loading
Fix  https://github.com/GNS3/gns3-server/issues/865
2017-01-16 08:57:50 +01:00
1527a1a4e1 Fix cloud on Linux
Fix  https://github.com/GNS3/gns3-server/issues/865
2017-01-13 17:08:40 +01:00
ec0181a5ad Merge pull request #856 from GNS3/dynamips_directory_layout
Change directory layout for dynamips.
2017-01-12 20:30:10 -08:00
e87f5fd782 Merge branch 'master' into 2.0 2017-01-12 09:08:17 +01:00
e63171c2c2 1.5.3dev1 2017-01-12 09:07:06 +01:00
19c4ec1867 1.5.3 2017-01-12 08:18:46 +01:00
b1ae884bf0 Drop NAT port from cloud from old topologies
It was almost not used (only one occurrence in the whole
beta test).

Fix #844
2017-01-11 19:20:12 +01:00
1bf54bcaeb Fix Port labels for docker VMs incorrect 2017-01-11 18:38:28 +01:00
82c99418b4 Fix If cloud interface is down the project doesn't open
Fix https://github.com/GNS3/gns3-gui/issues/1751
2017-01-11 17:23:36 +01:00
69d8ed5636 Catch Timeout error from VirtualBox GNS3 VM
Fix #864
2017-01-11 15:49:36 +01:00
df694ca9eb Fix export of IOU configuration
Fix https://github.com/GNS3/gns3-gui/issues/1745
2017-01-10 15:50:35 +01:00
720adb7721 Fix a crash with VirtualBox in some conditions
Fix #863
2017-01-10 14:23:12 +01:00
9480065b28 Sata disk interface support for Qemu VMs. (#862) 2017-01-10 14:11:40 +01:00
afd46ec010 Fix random error in the dynamips test suite after previous commit 2017-01-10 12:41:14 +01:00
6150929a5b Support conversion to dynamips new directory layout on remote
Ref https://github.com/GNS3/gns3-gui/issues/1761
2017-01-10 12:15:31 +01:00
e0071f5b59 Catch error when a file is deleted during the compression of project
Fix #860
2017-01-10 10:16:45 +01:00
666461277d Fix a crash with some docker images
Fix #861
2017-01-10 10:09:34 +01:00
41d32a5f71 Fix Wrong slot numbering on IOS router
Fix #1762
2017-01-09 18:04:54 +01:00
f7d87f09f1 Fix VPCS configuration is overwritten on project load
Fix https://github.com/GNS3/gns3-gui/issues/1766
2017-01-09 17:07:42 +01:00
58287b3638 Fix wrong short label for ethernet switch, hub & VPCS
Fix https://github.com/GNS3/gns3-gui/issues/1764
2017-01-09 16:48:42 +01:00
2de60ba257 Drop a useless line of code in port_manager 2017-01-09 16:11:34 +01:00
035cbac28e Fix binding console host for VMware and VirtualBox
Ref https://github.com/GNS3/gns3-gui/issues/1757
2017-01-09 16:05:29 +01:00
b63273ec97 Fix resume of dynamips routers
Fix #1754
2017-01-09 13:24:23 +01:00
45cf004946 Merge branch 'master' into 2.0 2017-01-09 11:01:24 +01:00
8019374ed0 Fix sporadically systemd is unable to start gns3-server
Signed-off-by: Julien Duponchelle <julien@gns3.net>
2017-01-09 10:28:21 +01:00
688122c467 Fix RuntimeError: File size has increased during compressing
Fix #858
2017-01-09 10:20:14 +01:00
5c8193556d Do not dump local compute configuration when saving topology
Fix #855
2017-01-09 10:14:21 +01:00
a2fdc92fcb Change directory layout for dynamips.
This create a directory by node to allow feature like save as
to work when running on multiple compute. Benefits now dynamips work
like other nodes. Old topologies are migrated.

Ref https://github.com/GNS3/gns3-gui/issues/1761
2017-01-06 17:43:47 +01:00
955a466be5 Ensure we can't connect to occupy port
Ref https://github.com/GNS3/gns3-gui/issues/1759
2017-01-06 10:29:56 +01:00
51aef2b9c7 Fix handling of UTF-8 in large SVG files
Fix #854
2017-01-06 09:42:56 +01:00
6778b29fc0 Prevent a crash when you close a dynamips node and create a link at the same time
Fix #853
2017-01-06 09:33:10 +01:00
d4be588973 Cleanup tests around port name 2017-01-05 17:49:36 +01:00
a329f89294 Remove Yarl version requirements (trust aiohttp for it) 2017-01-05 17:10:07 +01:00
c06d2e3118 Fix short label diplay instead of custom interface labels
Fix https://github.com/GNS3/gns3-gui/issues/1742, https://github.com/GNS3/gns3-gui/issues/1752
2017-01-05 16:55:31 +01:00
12f09829e7 Improve error message about the netmask
Ref #1751
2017-01-05 14:51:43 +01:00
c9fc0a0d6d Do not mark VirtualBox adapter as connected when not connected to another node in GNS3. 2017-01-05 14:30:23 +08:00
855ab13655 Add missing 'DLT_PPP_SERIAL' PCAP link type in schemas. 2017-01-05 12:24:36 +08:00
ef54367bf7 Fix crash when converting topology with broken link
Fix #845
2016-12-21 14:39:44 +01:00
e53db1ed81 Replace JSONDecodeError by ValueError (Python 3.4 compatibility)
Fix #847
2016-12-21 09:45:24 +01:00
8c61ef18ba 2.0.0dev7 2016-12-21 09:40:36 +01:00
9a7a9f41aa Catch an error when we can't create the IOU directory
Fix #846
2016-12-21 09:33:44 +01:00
2acd6ce884 2.0.0 beta 2 2016-12-20 11:57:34 +01:00
af530be346 1.5.3dev2 2016-12-20 11:48:55 +01:00
9c3cfc4f4e 1.5.3 rc1 2016-12-20 09:30:52 +01:00
4eed9acbd5 Merge branch 'master' into 2.0 2016-12-20 09:22:47 +01:00
c7d878ed9e Fix TypeError: __init__() got multiple values for argument 'handler' with recent aiohttp
Fix #841
2016-12-20 09:21:02 +01:00
49f1ee2e32 Support aiohttp 1.2 (but not compatible with previous versions)
Fix #840
2016-12-20 09:17:45 +01:00
52adf45740 Fix an error when docker hub failed to anwser
Fix #843
2016-12-20 09:15:28 +01:00
2011aca43a Fix an issue with Docker and IOU packet capture
Fix https://github.com/GNS3/gns3-gui/issues/1727
2016-12-19 12:26:34 +01:00
3bc78f61df Fix TypeError: __init__() got multiple values for argument 'handler' with recent aiohttp
Fix #841
2016-12-19 11:12:15 +01:00
572fa08049 Support aiohttp 1.2 (but not compatible with previous versions)
Fix #840
2016-12-19 10:10:47 +01:00
7ba7c89594 Support UDP cloud from 1.5
Fix #822
2016-12-19 09:46:34 +01:00
f86358ad71 Relax permission check on OSX, it seem returning wrong info for setuid 2016-12-19 09:28:27 +01:00
8f6d25cc2b Fix start all create error if a docker container is already running
Fix #839
2016-12-16 16:19:23 +01:00
3259ec1220 Close project if one one the compute of the project is down
Fix #836
2016-12-15 21:57:59 +01:00
60eea1f171 Fix error when you upload an empty file
Fix #838
2016-12-15 17:12:54 +01:00
b79235afb7 Fix KeyError: 'color' when converting some 1.3 topologies
Fix #837
2016-12-15 16:52:01 +01:00
f3e9917479 Fix move a docker restart it
Fix #832
2016-12-14 19:21:50 +01:00
74a7e630d3 Fix export of projects with docker with a / in the image name
Fix #834
2016-12-14 18:57:59 +01:00
1b6411f88e Fix an error on Linux during export
Fix #826
2016-12-14 18:44:32 +01:00
46b6e7c5ee Fix hot link issues in Docker
Fix #817
2016-12-14 16:53:20 +01:00
d0f65aebff Fix Can't delete link between docker VM after they were in use
Fix #818
2016-12-14 12:01:34 +01:00
30f29d00c4 Fix hardware virtualization detection when an ethernet switch is running
Fix https://github.com/GNS3/gns3-gui/issues/1722
2016-12-14 11:04:13 +01:00
81a9b63dbc Trust user for host binding of link adress 2016-12-13 17:34:41 +01:00
d4603ee346 Update sphinx from 1.5 to 1.5.1 (#830) 2016-12-13 17:14:06 +01:00
668c479ef6 Temporary fix for tunnel binding for Daniel from SWI 2016-12-13 16:46:09 +01:00
a3495304ad Code cleanup for docker interface creation
Fix #819

Signed-off-by: Julien Duponchelle <julien@gns3.net>
2016-12-13 16:07:59 +01:00
9f6f830418 Fix TypeError: __new__() got multiple values for argument 'node_type'
Fix #827
2016-12-13 09:36:45 +01:00
1cf987a548 Fix a rare crash when writing a file on a remote server
Fix #829
2016-12-13 09:25:44 +01:00
8f42122702 Fix 'EthernetSwitch' object has no attribute 'hw_virtualization'
Fix #828
2016-12-13 09:21:06 +01:00
89537204df Fix delete project on remote compute server
Fix https://github.com/GNS3/gns3-gui/issues/1714
2016-12-12 22:41:43 +01:00
1106a1af47 Typo 2016-12-12 21:34:00 +01:00
d2f0cddbd7 Fix trouble with builtin devices when we free ports
Fix #825
2016-12-12 19:17:06 +01:00
9872fc09b7 When a dynamips command failed display the full command to the user
Ref #825
2016-12-12 16:38:55 +01:00
35c2e2fcc4 Fix a wrong error message 2016-12-12 16:29:56 +01:00
922da7c90f Raise error when we can't found VboxManage at GNS3 VM startup
Fix #824
2016-12-12 15:03:56 +01:00
e2fd339f35 Catch auth errors when adding a compute
Fix #813
2016-12-12 11:27:18 +01:00
897a94f343 Do not block server startup if one project use non implemented conversion
Ref #822
2016-12-12 11:18:17 +01:00
063087f6fb Fix an error when deleting a compute already deleted
Fix #815
2016-12-12 11:09:07 +01:00
d16e3bb37b Catch cancelled error when you Ctrl-C during server initalisation
Fix #820
2016-12-12 10:17:45 +01:00
4cd08c8955 Handle OSerror when listing images
Fix #823
2016-12-12 10:14:34 +01:00
4bb990bf0c Fix JSONDecodeError
Fix #814
2016-12-12 10:03:40 +01:00
508edf5cc5 Fix a rare crash when stopping qemu
Fix #821
2016-12-12 09:16:29 +01:00
c4327ec74c Improve docker HTTP console
Fix #816
2016-12-09 16:41:15 +01:00
846041a59c Fix configuration lost during save as on remote server
Fix https://github.com/GNS3/gns3-gui/issues/1704, https://github.com/GNS3/gns3-gui/issues/1705
2016-12-08 16:55:16 +01:00
5ba5c62670 Add support for bios images
Ref https://github.com/GNS3/gns3-gui/issues/1700
2016-12-08 16:18:30 +01:00
bd1560ae50 Fix error when controller config file is corrupted
Fix #812
2016-12-08 10:52:21 +01:00
1d1861fe51 2.0.0dev6 2016-12-08 10:33:09 +01:00
d006ea0f56 2.0.0 beta 1 2016-12-07 19:41:07 +01:00
52260cba53 Fix crash if at controller loading the remote server is not a GNS3 server
Fix #810
2016-12-07 11:01:26 +01:00
d55c73bc8e Fix grammar (#808)
* Fixed small grammatical error

* Fixed small grammatical error
2016-12-05 17:30:09 +01:00
97391185e6 Update pytest from 3.0.4 to 3.0.5 (#809) 2016-12-05 17:29:28 +01:00
9a632fb823 Update the way we start controller to avoid hiding crash reports 2016-12-05 10:29:20 +01:00
cb02046e01 Update sphinx from 1.4.9 to 1.5 (#807) 2016-12-05 08:52:09 +01:00
c53201b753 Fix when you switch console from VNC to telnet it's fail
Fix #805
2016-12-01 11:47:05 +01:00
95e944257a AttributeError: 'Project' object has no attribute 'emit'
Fix #804
2016-12-01 10:27:05 +01:00
e3b1eee85b Improve autostart logging 2016-12-01 09:24:52 +01:00
5efc5684ba Fix warning when vmware is not installed 2016-11-28 20:28:19 +01:00
433f620905 If a VMware command fail retry
Ref #1671
2016-11-28 20:00:20 +01:00
49315adf79 Do not recurse scan for images in standard image directory
Fix https://github.com/GNS3/gns3-gui/issues/1680
2016-11-28 19:49:50 +01:00
a36fc37250 When we restore snapshot on a fail project do not crash
Fix #800
2016-11-28 13:49:09 +01:00
2b15da3d19 Catch error when qemuy can't connect to his console
Fix #803
2016-11-28 13:18:04 +01:00
b3d83b1b0b Catch error when no space left on disk during export
Fix #801
2016-11-28 12:53:50 +01:00
60a145afbb Improve vmware error message for easier copy paste 2016-11-28 09:59:38 +01:00
a776b36e98 Improve vmware vmrun error error message 2016-11-28 09:51:06 +01:00
40263e14ca Catch error if you export a project deleted from disk
Fix #793
2016-11-25 17:18:23 +01:00
9b6b989d1b Qemu UDP listen on all ips 2016-11-25 15:21:35 +01:00
794dac31f5 UDP tunnel debuging
Fix #1562
2016-11-25 15:11:31 +01:00
ff47fd31e2 Force yarl version >= 0.7.0
Fix #796
2016-11-25 12:14:39 +01:00
2215702ae8 Ask user to refresh is user session if he just installed ubridge
Ref https://github.com/GNS3/gns3-server/issues/796
2016-11-24 15:16:25 +01:00
03555a3489 2.0.0dev5 2016-11-24 12:53:31 +01:00
35d5a4a21c Add the date to the changelog 2016-11-24 12:08:10 +01:00
abcddb99b8 2.0.0a4 2016-11-24 12:05:10 +01:00
62db0b628b Update sphinx from 1.4.8 to 1.4.9 (#794) 2016-11-23 21:23:13 +01:00
38d9555f72 Do not block traffic originating from an Ethernet interface in the cloud. Ref #771. 2016-11-23 22:06:44 +11:00
7754d7f211 Revert "Make the Ethernet side the source in uBridge connection and UDP tunnel the destination. Ref #771."
This reverts commit 31c04cc95b.
2016-11-23 21:55:26 +11:00
875051d05e Prevent capture on non running node
Fix https://github.com/GNS3/gns3-gui/issues/1656
2016-11-22 16:05:57 +01:00
31c04cc95b Make the Ethernet side the source in uBridge connection and UDP tunnel the destination. Ref #771. 2016-11-22 21:57:55 +11:00
a853e87fa5 IOURC is a text box instead of a file path
Fix https://github.com/GNS3/gns3-gui/issues/1662
2016-11-21 18:16:50 +01:00
9be293909e Use vnetlib64.exe when possible
Fix https://github.com/GNS3/gns3-gui/issues/1648
2016-11-21 17:49:40 +01:00
1beae95443 Multiple improvements around starting the GNS3 VM
* avoid concurrent start
* proper catching of the TimeOut error

Ref #754
2016-11-21 09:59:25 +01:00
40af2a35e0 Wait for the end of project loading before making new change
Fix #790
2016-11-18 17:35:28 +01:00
5ab85e5c9e Avoid crash due to persmission error on the .backup file 2016-11-18 17:17:14 +01:00
8ad5670eeb For security reason debug informations can only be exported from local server
Ref #1562
2016-11-18 16:38:27 +01:00
d2564cee9b Add more debug informations if VM failed to start
Fix #754
2016-11-18 16:19:58 +01:00
434f6a70dd Fix tests on Python 3.5 >= 2016-11-18 12:08:29 +01:00
a872f0328d Fix closing console of VBox on NIX systems 2016-11-18 11:27:50 +01:00
11f290482d Remove debug 2016-11-18 10:44:57 +01:00
e4fdfbd091 Code cleanup around ubridge 2016-11-17 18:11:56 +01:00
dcff51eb75 Use wait_for for waiting a process with python 3.5 2016-11-17 18:09:46 +01:00
a14ad2fc99 Fix tests 2016-11-17 14:08:00 +01:00
14fd8104b8 Fix opening a project whith the same non linked VM as current project
Fix https://github.com/GNS3/gns3-gui/issues/1646
2016-11-17 12:21:38 +01:00
75890c8f5a Prevent double start of VirtualBox VM and VMware VM
Fix https://github.com/GNS3/gns3-gui/issues/1664
2016-11-17 10:38:29 +01:00
81b2894658 Fix KeyError: 'linked_clone'
Fix #792
2016-11-17 10:17:23 +01:00
94ceb2dda0 No connection limit / No keep alive for connection to compute
Fix #779
2016-11-16 15:04:10 +01:00
8850265cb6 Improve random queries to start/stop nodes
It's confirm the issue  #779
2016-11-16 14:54:09 +01:00
66a237628a Return default symbol if user asked for a non existing symbol 2016-11-16 13:17:58 +01:00
928d9f13f4 Do not log warning at qemu exit on windows if it's normal
Fix #777
2016-11-16 13:06:43 +01:00
ecfa89cba8 Speed up interfaces listening on Windows
Fix #788
2016-11-16 12:28:02 +01:00
6e5e9e3df9 Fix filtering special interfaces on Windows 2016-11-16 12:21:43 +01:00
56c580dc44 On windows filter VMware and VirtualBox adapters by default
Ref #788
2016-11-16 12:16:46 +01:00
0250547479 If server answer not found explain this could be due to the usage of 1.X server 2016-11-15 18:36:04 +01:00
89bbe0ef1b Fix stack when looking for GNS3 VM with player installed
Fix #778
2016-11-15 18:17:34 +01:00
3c384a7bf0 Try to fix VPCS and loobpack adapters not working together. Ref #771. 2016-11-15 17:36:51 +11:00
5166d894eb Do not reload a project via /load if the project is already opened
Fix #785
2016-11-14 18:45:44 +01:00
e996b825c6 Fix you can not pass auto close at project creation 2016-11-14 16:10:19 +01:00
5e4f5fe2d1 Script for sending random query to the GNS3 server
The purpose of this script is to replicate weird
issues by sending a large number of queries.

* Ref https://github.com/GNS3/gns3-gui/issues/1654
* Ref https://github.com/GNS3/gns3-gui/issues/1659
2016-11-14 14:02:58 +01:00
a8b78a9b0a Fix traceback when sending invalid parameters to the server
Fix #783
2016-11-14 14:00:11 +01:00
2c6063569a Update pytest from 3.0.3 to 3.0.4 (#781) 2016-11-14 09:45:22 +01:00
fdc9283e04 Generic code the bind an Ethernet interface with uBridge. Ref #771. 2016-11-13 20:28:14 +11:00
63a92c4a16 Require ubridge 0.9.7 this fix error with IOL bridge creation
Fix https://github.com/GNS3/gns3-gui/issues/1651
2016-11-11 17:07:20 +01:00
8dd4f63aca Make sure IOU licence is dump in ~/
Fix #780
2016-11-11 16:18:39 +01:00
3bc4e951b8 Fix a None error when creating link 2016-11-11 16:08:52 +01:00
8db9b89318 Fix IOL bridge errors
Fix https://github.com/GNS3/gns3-gui/issues/1651
2016-11-11 15:16:46 +01:00
52577b55b2 Typo 2016-11-11 14:44:27 +01:00
3bb4f6f133 Display path of vnetlib during interface creations
Ref https://github.com/GNS3/gns3-gui/issues/1648
2016-11-11 14:26:09 +01:00
c5ef6b310d Use last aiohttp 2016-11-11 13:19:44 +01:00
1bb760d3f0 Make logs for searching GNS3 VM vmware IP less noisy
Fix #765
2016-11-11 11:41:16 +01:00
65090c6f87 Catch errors when listing images
Fix #764
2016-11-11 11:24:41 +01:00
477091207d Better handle compute unavailable errors
Fix #775
2016-11-11 10:38:59 +01:00
f968f6616f Fix NameError: name 'available_ram' is not define
Fix #767
2016-11-11 10:25:37 +01:00
0f0dff3bbb Update pytest-timeout from 1.0.0 to 1.2.0 (#774) 2016-11-10 22:54:17 +01:00
57e2fd9943 If we can found a common subnet we return the host binding for link
creation

Fix #773
2016-11-10 22:39:16 +01:00
ca6f014207 Do not connect GNS3 to remote server via 169.254.X.X 2016-11-10 14:46:25 +01:00
5f988bae2f Expose debug informations about links 2016-11-10 14:18:24 +01:00
bddf9ec2ac Qemu telnet support multiple client connected
Fix #770
2016-11-09 09:47:48 +01:00
69f154d9cc Correctly initialize connection to VPCS console 2016-11-08 20:10:17 +01:00
db8296f548 Support multiple client connected to the same VPCS console
Ref #770
2016-11-08 19:44:12 +01:00
3754a49cc0 Drop IOUCON
Fix #747
2016-11-08 10:21:20 +01:00
15d190d911 Increase timeout for link creation 2016-11-08 09:54:59 +01:00
553e137a13 Support for serial console for Virtual BOX and VMware using asyncio
Ref #747
2016-11-07 23:43:20 +01:00
3c5cbebfb4 Fix timeout issues when starting VMware or VBox
Fix https://github.com/GNS3/gns3-gui/issues/1632
2016-11-07 17:34:51 +01:00
a35eaa8e60 Ask for reboot if VBoxManage is not found 2016-11-07 15:49:25 +01:00
7931ee01b3 Fix a crash with VirtualBox linked clone 2016-11-07 14:10:44 +01:00
4fe2b746d0 Fix IOU tests 2016-11-06 21:22:48 +01:00
183f602fc0 Replace iouyap by ubridge to handle IOU connections. Fixes #614. 2016-11-06 21:27:49 +11:00
c271ef8c6a Tool to add, configure and remove Windows loopback adapters.
New dependency: wmi (not added to requirements.txt).

Usage (must be running with admin rights):
gns3loopback.exe --add MY_LOOPBACK 10.0.0.1 255.0.0.0
gns3loopback.exe --remove MY_LOOPBACK
2016-11-05 15:10:05 +11:00
0c87d8e1bd Lock VMware by VM instead of globally
Ref https://github.com/GNS3/gns3-gui/issues/1632
2016-11-04 19:39:17 +01:00
7255754fef Bridge support in cloud is more robust
Fix #761
2016-11-04 17:40:44 +01:00
cf723962af Support bridge in cloud
Nat take advantage of that and the code is more simple.

Fix #761
2016-11-04 17:32:16 +01:00
1b3e47ce83 Add a test of cloud raw ethernet interface
Before touching it for the bridge support a test to prevent regressions.

Ref #761
2016-11-04 16:52:29 +01:00
74695efe90 Fix tests checking the local flag 2016-11-04 15:42:29 +01:00
ea94731418 Fix support of IOS images outside standard directories
Fix https://github.com/GNS3/gns3-gui/issues/1630
2016-11-04 15:26:13 +01:00
5dee4eb052 Raise clean error when node timeout when stopped 2016-11-04 11:40:55 +01:00
dc26be43c2 Fix random VirtualBox creation error when using linked clone
Fix #760
2016-11-04 11:07:43 +01:00
6f43f988c3 Update documentations 2016-11-03 18:20:51 +01:00
4e15f89604 Drop console_type serial, and enable_remote_console for Vbox and VMware
Ref #748
2016-11-03 18:17:50 +01:00
382d8887d5 Fix a test failure when test run and gns3server is running 2016-11-03 14:27:03 +01:00
0d6adb0620 Fix a rare crash when a failed node is garbage collected 2016-11-03 14:21:28 +01:00
1e73962e33 Do not dump iourc_content to .gns3 file
Fix #759
2016-11-03 13:35:44 +01:00
3df3aa84ff Try to disable enable remote console for VMware to see if it's the source of timeout errors
Ref https://github.com/GNS3/gns3-gui/issues/1632
2016-11-03 10:40:00 +01:00
7c981f9322 Try to disable enable remote console for VMware to see if it's the source of timeout errors
Ref https://github.com/GNS3/gns3-gui/issues/1632
2016-11-02 18:59:09 +01:00
21ec2a6271 Fix No such file or directory when duplicate a project using Vbox linked clone hdd_info.json
Fix #1185
2016-11-02 12:50:53 +01:00
ce5ff93242 Catch FileNotFound error for builtin symbols if erase them from disk
Fix #752
2016-11-02 12:07:25 +01:00
c254011b33 Upgrade aiohttp 2016-11-02 11:55:47 +01:00
0d022a4d33 Forward server disconnected errors
Fix #758
2016-11-02 11:06:45 +01:00
b85b4b73cc Fix a crash when vboxmanage is not found
Fix #755
2016-11-02 10:22:36 +01:00
308706e3d4 Raise error if IOU image is not configured
Fix #757
2016-11-02 10:20:43 +01:00
7c1a079ee8 Add a test for unicode characters in /images
Ref #756
2016-11-02 10:08:49 +01:00
ae76a4f778 Fix crash when getting font 2016-11-01 18:18:51 +01:00
94ebd732a8 Fix a crash when default font is missing
Fix #750
2016-10-31 11:37:39 +01:00
9bceaa89b7 Fix a crash when vmrun is not found
Fix #753
2016-10-31 11:20:35 +01:00
8150c3007e 2.0.0dev4 2016-10-28 19:38:01 +02:00
21c83de445 2.0.0 alpha 3 2016-10-28 19:19:29 +02:00
6be5b6ffad Fix uuid of VirtualBox VM after a save as
Fix #1185
2016-10-28 16:00:26 +02:00
9d94c47fc8 Merge branch 'master' into 2.0 2016-10-28 11:39:16 +02:00
bd4de862c8 Explain that segfault on IOU is a issue with the image
Fix #739
2016-10-28 11:25:14 +02:00
53e6ee1b3a Fix crash when you import a corrupted SVG
Fix #746
2016-10-28 10:06:02 +02:00
4a5066c2a5 Fix Error while creating link: Port 0 is not allocated. when you have an invalid interface
Fix #744
2016-10-27 19:09:27 +02:00
ea1c525181 Fix computes tests 2016-10-27 16:54:05 +02:00
0cfdde7b7e Fix random password lost of remote GNS3VM 2016-10-27 16:50:00 +02:00
ae1a9d9a5f No timeout for listing images
Fix #1617
2016-10-27 15:34:17 +02:00
eff23eefe9 Handle 408 HTTP status code (request timeout)
Fix #743
2016-10-27 15:32:07 +02:00
620de3ff25 Move code for exposing VM ip to the VM itself. And display VM starting status
Fix #1621
2016-10-26 18:32:01 +02:00
fd911542f7 Fix a crash when we have error during export project 2016-10-26 16:50:01 +02:00
eabe4eb97e Improve remote server console host support when binding to 0.0.0.0
Fix https://github.com/GNS3/gns3-gui/issues/1574
2016-10-26 14:43:47 +02:00
afb7eca27a Fix port naming for atm switch
Fix #735
2016-10-26 12:03:54 +02:00
cf3ed5a329 Fix port naming for FrameRelay switch
Fix #735
2016-10-26 11:59:16 +02:00
048d2c12d0 Catch permission errors when listing images
Fix #1608
2016-10-26 10:53:14 +02:00
1080147cf5 If we can't found the VMware version we use workstation
Fix #742
2016-10-26 10:36:34 +02:00
b50246fc2b CURL API sample for creating a dynamips router 2016-10-25 19:38:47 +02:00
0f9df6a2f8 Fix crash in idlePC compute 2016-10-25 19:32:07 +02:00
49c3ecf02e Add sample api call for creating a qemu node 2016-10-25 19:29:05 +02:00
9e861a7340 Try a different method in order to retrieve IP from VMware
Ref https://github.com/GNS3/gns3-gui/issues/1589
2016-10-25 18:44:40 +02:00
1f44e08cdd Fix naming of IOU serial interfaces
Fix #737
2016-10-25 15:26:36 +02:00
9799dabb98 Improve timeout management
Fix #741
2016-10-25 14:41:33 +02:00
f8cba8cd50 Fix crash in tests 2016-10-25 12:13:42 +02:00
4fe293f1d5 Fix tests crash on travis 2016-10-25 12:00:17 +02:00
59dcdcc141 When exporting debug information export GNS3 VM vmx content
Fix #740
2016-10-25 11:56:24 +02:00
4815904737 /debug for exporting debug informations
Ref #740, https://github.com/GNS3/gns3-gui/issues/1562
2016-10-25 11:40:57 +02:00
ae1e027031 Raise error if using a non linked clone VM twice
Fix https://github.com/GNS3/gns3-gui/issues/1593
2016-10-24 21:39:35 +02:00
597e1e618d Fix a possible deadlock at exit 2016-10-24 18:02:50 +02:00
acd1d95a8e Fix import of some old dynamips topologies
Fix #734
2016-10-24 17:57:23 +02:00
0caf74443b Fix a crash with some old virtualbox topologies
Fix https://github.com/GNS3/gns3-gui/issues/1605
2016-10-24 16:47:45 +02:00
786159110e Fix conflict issue between the GNS3VM and a remote server 2016-10-24 15:24:45 +02:00
b9e7ccc14f Fix typo in error message about the GNS3 VM 2016-10-24 15:16:53 +02:00
10e7b32409 Fix an error when importing old topology without color for label
Fix #736
2016-10-24 14:58:14 +02:00
ac1eef256f Use tap adapter instead of veth for docker (allow usage of vlan)
Ref #716
2016-10-24 12:35:50 +02:00
00fc2fa007 Avoid crash during tests if VNC server run on host PC 2016-10-24 12:21:57 +02:00
19d184e04c 2.0.0dev3 2016-10-20 22:13:10 +02:00
db6485e702 2.0.0a2 2016-10-20 21:30:41 +02:00
106915f419 Return md5sum and filesize in the list of images
Ref https://github.com/GNS3/gns3-gui/issues/1590
2016-10-20 17:24:05 +02:00
69fcf801c3 Update api documentations 2016-10-20 10:54:07 +02:00
dc363bbd38 Disable binding to an IPV6
Ref https://github.com/GNS3/gns3-server/issues/725
2016-10-20 09:56:27 +02:00
43236746f9 Support symbol None (from old versions)
Fix #732
2016-10-20 09:44:24 +02:00
f038735595 Fix an issue with finding vmrun and vboxmanage
Ref #1575
2016-10-19 17:44:55 +02:00
66a789672d Merge branch 'master' into 2.0 2016-10-19 17:06:43 +02:00
a4f8675c93 Support named remote servers for VPCS
Fix #722
2016-10-19 16:55:33 +02:00
3ecdd1d30c Improve vmrun error messages 2016-10-19 12:03:42 +02:00
97cc60fad4 If vmware raise an error about invalid host type we retry with player 2016-10-19 11:57:14 +02:00
8adc010ba0 Do not trust client for the type of VMware host
Ref https://github.com/GNS3/gns3-gui/issues/1579
2016-10-19 11:40:16 +02:00
7d35d1a34f Improve error when default vm directory is not found 2016-10-19 10:38:21 +02:00
fbd3a54877 Merge branch 'master' into 2.0 2016-10-19 09:13:28 +02:00
da71f29208 Merge pull request #726 from GNS3/port_check
When checking for a free port check if the host and 0.0.0.0 are available
2016-10-18 21:02:28 -06:00
1eb423c204 Add a clear warning about /upload deprecated
Fix #728
2016-10-18 22:57:02 +02:00
2a4b68d3b7 /duplicate support non opened projects
Ref https://github.com/GNS3/gns3-gui/issues/1585
2016-10-18 16:50:41 +02:00
19be2d85b7 Fix Snapshot restore does not work with IOS routers
Fix https://github.com/GNS3/gns3-gui/issues/1583
2016-10-18 16:19:14 +02:00
8055547936 Use last zipstream version 2016-10-18 16:18:18 +02:00
40ae563da1 Update dependencies from pyup
* Update sphinx from 1.2.3 to 1.4.8
* Update pytest from 2.8.2 to 3.0.3
* Update pytest-timeout from 0.5 to 1.0.0
* Update pytest-cov from 2.2.0 to 2.4.0
* Update pep8 from 1.5.7 to 1.7.0
2016-10-18 15:21:01 +02:00
dd849f7945 Strip space from all nodes names
Fix #727
2016-10-18 11:11:45 +02:00
b53b34d485 When checking for a free port check if the host and 0.0.0.0 are available
Because some emulators will listen on 0.0.0.0 and not on the host.

Fix #721
2016-10-18 09:59:31 +02:00
a8ffaa9cb5 If listen on all interface do not return localhost as console
Fix https://github.com/GNS3/gns3-gui/issues/1574
2016-10-17 18:20:29 +02:00
f737989e44 Fix HTTP console not working for docker containers
Fix #1568
2016-10-17 14:29:29 +02:00
b9b0feed62 Fix IPV6 server support
Fix #717
2016-10-17 14:10:25 +02:00
421e127603 Merge branch 'master' into 2.0 2016-10-17 10:41:55 +02:00
e63da227d0 Try pyup.io 2016-10-17 10:27:35 +02:00
780b00f095 Fix validation error with auxilary console
Fix https://github.com/GNS3/gns3-gui/issues/1569
2016-10-17 10:10:59 +02:00
cb0a7c6a3f Fix connection issue with IOU when a device as serial link
Fix https://github.com/GNS3/gns3-gui/issues/1566
2016-10-17 00:06:34 +02:00
b43a0f7dac Turn off python 3.6 build 2016-10-14 19:11:09 +02:00
ec3660c979 Catch an error when docker is not running 2016-10-14 19:06:12 +02:00
fbdcf67d29 If docker container state failed to return we consider the container stopped 2016-10-14 19:00:25 +02:00
a9c7c3ca3b Enable test on 3.6 because future is now implemented in C 2016-10-13 20:04:55 +02:00
241c9b0c11 Fix Error when converting some dynamips topologies from 1.3 => 2.0
Fix #718
2016-10-07 12:33:46 +02:00
b6fa14454e After conversion from 1.X check the topology before save to disk 2016-10-07 11:56:55 +02:00
a437760f5d Keep forever .gns3 backup before version upgrade 2016-10-07 11:29:11 +02:00
98480881a3 Update crash report key 2016-10-07 10:29:06 +02:00
d60b606d5e Fix save of topology size
Fix https://github.com/GNS3/gns3-gui/issues/1561
2016-10-05 15:52:44 +02:00
5a695d2651 Missing busybox for docker 2016-10-05 14:57:58 +02:00
54c45f0b98 GNS3 server can't be keep as zipped egg 2016-10-05 14:56:11 +02:00
46e1fbda60 Merge pull request #712 from GNS3/set_qemu_uuid
Set Qemu uuid for csr1000v
2016-10-04 20:55:11 -06:00
5a7f5d2950 Check if GNS3 has access to all docker resssources
Ref #702
2016-10-04 21:14:19 +02:00
4b4053dc2b Return the platform of a compute
Ref https://github.com/GNS3/gns3-gui/issues/1550
2016-10-04 18:48:29 +02:00
2b9c190bcf Handle errors when startup config path is wrong
Fix #715
2016-10-04 17:16:52 +02:00
7baf584367 Merge branch 'master' into 2.0 2016-10-04 14:53:50 +02:00
c7d9af121f smm=off is only for 64bits
Fix #714
2016-10-04 14:53:09 +02:00
04aec4619f Fix uploads of large images
Fix https://github.com/GNS3/gns3-gui/issues/1552
2016-10-04 10:56:38 +02:00
8299ce800d Stop raising error if VMware has not enough ram. Not working on some system
Fix #713
2016-10-04 10:15:33 +02:00
4aa7a0a9df Increase creation timeout for docker container 2016-10-03 22:31:34 +02:00
48a73f9ab5 Fix a rare crash in vbox
Fix #710
2016-10-03 21:39:43 +02:00
780086cd5b Remove a debug 2016-10-03 18:40:59 +02:00
fb8a942620 Fix errors where free port as marked as used after an error 2016-10-03 16:37:58 +02:00
6fa8c52482 Fix a bug when selecting a topology and deleting multiple linked device
Fix https://github.com/GNS3/gns3-gui/issues/1554
2016-10-03 16:36:16 +02:00
f3d255756b Set Qemu uuid for csr1000v
Fix #711
2016-10-03 15:54:20 +02:00
99bdf37ec3 Prevent connect a node to himself
Fix https://github.com/GNS3/gns3-gui/issues/1553
2016-10-03 12:31:01 +02:00
420168015c Fix BadZipFile: File is not a zip file 2016-10-03 10:33:56 +02:00
bfb82a9618 The gns3_controller.conf is located in the same directory of gns3_server.conf
Fix #701
2016-09-30 17:34:28 +02:00
1e0b724e47 Make sure the compute has an id 2016-09-30 11:20:25 +02:00
4d6d0e96c6 Fix crash if you manually delete the project directory and use the delete button in interface
Fix #697
2016-09-30 10:47:37 +02:00
36175f7c26 Catch timeout error when closing project
Fix #698
2016-09-30 10:40:10 +02:00
a8c32e6b8e Fix a crash when importing some old topologies.
Fix #699
2016-09-30 10:36:18 +02:00
a01b55f07b Fix a crash if font information is missing
Fix #700
2016-09-30 10:30:24 +02:00
a7184f32bd Make test of topology conversion independent of the version 2016-09-30 10:29:55 +02:00
a5ff0b8579 2.0.0dev2 2016-09-29 20:42:23 +02:00
6ac595a38c 2.0.0 alpha 1 2016-09-29 16:59:17 +02:00
f6b34e2434 Bug fixes on Hub 2016-09-29 16:01:18 +02:00
74dd212def One less exit deadlock 2016-09-29 15:07:17 +02:00
462238a335 Fix a crash when adding builtin switch and hub 2016-09-29 15:07:05 +02:00
2b1fab6742 Conversion issue for switch & hub from 1.5 to 2.0
Fix #694
2016-09-29 14:59:11 +02:00
68725778e8 Return all ports for hub & switch 2016-09-29 14:40:56 +02:00
8f6d24ae5e Prevent a dead lock when closing server 2016-09-29 14:40:39 +02:00
cfd74a8164 Fix crash when loading as GNS3 a non topology
Fix #692
2016-09-29 14:08:07 +02:00
79d376652c Fix tests on Unix for interfaces 2016-09-28 14:34:13 +02:00
c38dd004b8 Extract netmask of interfaces on windows 2016-09-28 10:48:28 +02:00
fb2dac6ef1 All tests pass on windows 2016-09-28 10:27:30 +02:00
e01931269f Fix import project tests 2016-09-27 18:44:32 +02:00
c2420318ba Fix test of drawings under windows 2016-09-27 18:03:44 +02:00
fd3ac65eb5 Qemu fixes for windows 2016-09-27 18:01:50 +02:00
20772a310b Change seperator for additonnal images directory otherwise bug on windows 2016-09-27 17:15:59 +02:00
2c73d40551 Update documentations 2016-09-27 17:15:40 +02:00
be5d543f20 Fix some bugs on windows 2016-09-27 17:05:03 +02:00
3a8ca1071e Support 0.0.0.0 as host when creating local compute 2016-09-27 11:54:23 +02:00
7df645f742 Fix a crash in NAT 2016-09-27 11:54:07 +02:00
3ea5df7462 Make better error when we have no netmask
Fix #1541
2016-09-27 11:47:18 +02:00
5555662b2c Fix If I change the content of cloud the cloud no longer work
Fix #1540
2016-09-27 11:21:40 +02:00
4ea3690951 Merge branch 'master' into 2.0 2016-09-27 10:47:18 +02:00
15babb137d Fix set hostname on remote server
Fix #691
2016-09-27 10:40:58 +02:00
eccee6b629 Support unstable ppa for remote install 2016-09-27 10:35:24 +02:00
c91999c532 Disallow running IOU on multiple server
Fix #690
2016-09-26 15:35:58 +02:00
f3596767c1 Merge branch 'master' into 2.0 2016-09-26 15:17:05 +02:00
ef95ba1ed8 Fix sending smm option to qemu
Fix #689
2016-09-26 15:15:38 +02:00
79b4926cad Fix the nat node
Ref #686
2016-09-26 15:08:55 +02:00
dc798dafd0 Cloud support multiple interfaces 2016-09-23 10:56:37 +02:00
4c900ce639 Cleanup port when cloud failed to create 2016-09-23 10:52:08 +02:00
87e2326363 Fix cannot recreate a deleted project
Fix #1539
2016-09-23 10:22:33 +02:00
41f12457e7 Fix a crash in cloud 2016-09-22 18:29:46 +02:00
29563ed7bc Fill cloud interface server side
Fix https://github.com/GNS3/gns3-gui/issues/1535
2016-09-22 17:46:32 +02:00
286112ced4 Fix port name in the cloud
Fix #1534
2016-09-22 17:11:40 +02:00
6837cc8e23 Fix for nat node
Ref #686
2016-09-22 15:58:31 +02:00
5631e1bd86 Update crash report key 2016-09-22 10:53:02 +02:00
4bd9556767 Merge branch 'master' into 2.0 2016-09-21 19:27:44 +02:00
2bbdbeaa82 Workaround a bug with KVM, Qemu >= 2.4 and Intel CPU
Fix #685
2016-09-21 19:25:15 +02:00
056ae41d56 Fix invalid content in the dynamips export
Fix #1527
2016-09-21 17:49:25 +02:00
4cd164fc24 Better management of the GNS3 VM with VirtualBox 2016-09-21 17:01:50 +02:00
896d279ded Support configuration of ram and vcpus of GNS3 VM in setup wizard
Ref #1445
2016-09-21 15:46:56 +02:00
d2b0321419 Improve ASA 8 warning 2016-09-21 12:37:25 +02:00
14416afbba Use last aiohttp version 2016-09-20 16:24:53 +02:00
64139387c4 Return size of the scene of the project
Ref #683
2016-09-20 12:46:39 +02:00
77eae35778 API method for getting a node 2016-09-20 10:14:30 +02:00
9fbe23e09b Fix a test error 2016-09-19 16:55:48 +02:00
5fd04e1f9e Fix a warning when export 2016-09-19 16:51:15 +02:00
f0af7d3c7a Change node_id when I save as
Fix https://github.com/GNS3/gns3-gui/issues/1519
2016-09-19 16:36:19 +02:00
cf10f02a8d Fix utf8 errors
Fix #681
2016-09-18 22:23:52 +02:00
ac8bd3fec4 Fix error when importing some old topologies
Fix #680
2016-09-18 22:20:29 +02:00
b7bd73e8c9 Fix AttributeError: 'Cloud' object has no attribute '_ports'
Fix #682
2016-09-18 22:16:14 +02:00
c90df05e8c Fix error when deleting node after link creation failed
Fix #1514
2016-09-15 19:08:57 +02:00
ee50790ab5 Dissallow export when node are running and are not always running
Fix #677
2016-09-15 18:48:14 +02:00
37f972dea1 Fix an issue with old symbols paths 2016-09-15 18:21:39 +02:00
da5e3d0e54 Dissallow serial to ethernet connection
Fix #678
2016-09-15 14:51:40 +02:00
5d12a91268 Fix Serial interface not available for IOU
Fix https://github.com/GNS3/gns3-gui/issues/1512
2016-09-15 11:49:41 +02:00
ba148df159 Fix documentation formatting 2016-09-15 08:10:41 +02:00
5b1ec3bec2 Raise an error if the destination of import contain a .gns3 in path
Ref https://github.com/GNS3/gns3-gui/issues/1503
2016-09-14 18:53:26 +02:00
84a2f8b4a3 Return flag for special interface that you can use in the cloud
Fix https://github.com/GNS3/gns3-gui/issues/1509
2016-09-14 17:15:06 +02:00
803064d5cf Rebuild documentation 2016-09-14 15:31:58 +02:00
2f0e2260ab Move the generation of the list of ports to the server
Ref #676
2016-09-14 15:21:37 +02:00
f06c00fdb8 Fix Can't remove a slot from dynamips device
Fix https://github.com/GNS3/gns3-gui/issues/1510
2016-09-14 11:40:45 +02:00
b8909c54cf Merge pull request #649 from GNS3/bind_qemu_all_host
Bind qemu UDP tunnels on all hosts
2016-09-12 11:04:08 -06:00
de2dad20d5 Renable sleep at Vbox exit bug seem to be back
Fix https://github.com/GNS3/gns3-gui/issues/1444
2016-09-08 18:37:34 +02:00
a17ae316c7 Fix asyncio reactor on Windows
Fix #672
2016-09-08 17:21:38 +02:00
83b72d762c Download link for the VM
Ref https://github.com/GNS3/gns3-gui/issues/1489
2016-09-08 16:00:32 +02:00
1412462229 Suspend the GNS3 VM
Fix #656
2016-09-08 15:32:35 +02:00
cfe834afc4 Merge branch 'master' into 2.0 2016-09-08 11:52:16 +02:00
84c0a17572 Support large project (> 2GB) during export
Fix #670
2016-09-08 11:41:12 +02:00
9bbb32400d Try to have a better server close cleanup
Fix #669
2016-09-08 11:23:13 +02:00
0910712657 Handle more topologie loading errrors
Fix #671
2016-09-08 10:56:08 +02:00
de526482e3 Fixes unknown nvram format for IOU. Fixes #594. 2016-09-07 12:41:13 -06:00
62377315dd English typo
Signed-off-by: Julien Duponchelle <julien@gns3.net>
2016-09-07 20:38:24 +02:00
436543d8b8 English fix profil => profile 2016-09-07 17:44:51 +02:00
67fc563d81 Merge branch 'master' into 2.0 2016-09-07 15:01:51 +02:00
f0edf799b7 Fix Deleting running telnet docker VM shows error in log
Fix #662
2016-09-07 14:24:56 +02:00
f1fe7246e7 Remove --controller
This add too much complexity and it can work
without it.

Fix https://github.com/GNS3/gns3-vm/issues/80, #645
2016-09-07 10:04:28 +02:00
9c6ee97ff2 Fix tests on Travis 2016-09-06 15:06:49 +02:00
0bbda4a5d7 Fix error during rotation
Fix https://github.com/GNS3/gns3-gui/issues/1474
2016-09-06 14:54:13 +02:00
bc5b5969eb Import GNS3VM settings from 1.5
Fix #643
2016-09-06 13:06:20 +02:00
0573c3f7d5 Port name format for 2.0
Ref #667, https://github.com/GNS3/gns3-gui/issues/1400
2016-09-06 11:30:08 +02:00
a7be4681d5 Create gns3server/symbols directory
This directory is use only in 2.0 but to simplify packaging
we create it in 1.5.
2016-09-06 09:45:29 +02:00
e40569a46f Fix When we select two node linked and delete them the link remain
Fix https://github.com/GNS3/gns3-gui/issues/1469
2016-09-05 19:00:42 +02:00
d772b6fbd7 Nat node work on any linux thanks to libvirt
Fix #599
2016-09-05 18:40:49 +02:00
4b891070d2 Ignore interface without netmask in udp tunnel 2016-09-05 18:02:49 +02:00
5ae456d6e2 Avoid to corrupt project in case of error during loading
Fix #651
2016-09-05 17:40:35 +02:00
75d5f6507d Catch more websocket errors 2016-09-05 17:01:39 +02:00
6e7f6a94ec Suspend for VPCS == stop
Fix #1465
2016-09-05 16:55:38 +02:00
1d70a18b11 Nat node use port 0 2016-09-05 11:43:20 +02:00
d7c60db2b9 Replace the internet VM by the Nat node
Ref #658
2016-09-05 11:11:23 +02:00
3ce3f925ae Fix creation of link when reloading a project
Fix https://github.com/GNS3/gns3-gui/issues/1457
2016-09-02 14:39:38 +02:00
0afd7b78b7 Avoid tasks lost during tests creating noisy warnings 2016-09-02 14:09:01 +02:00
2d86a7fdcf Fix invalid height for drawing images
Fix https://github.com/GNS3/gns3-gui/issues/1462
2016-09-02 12:11:15 +02:00
43afce740d Fix Error when cleaning image behind us #665 2016-09-02 11:46:08 +02:00
be0fee99e7 Test pcap streaming 2016-09-02 11:20:59 +02:00
947dcf1406 Prevent another deadlock at exit 2016-09-02 10:56:20 +02:00
6a259c7e06 Fix streaming of pcap file 2016-09-02 10:54:20 +02:00
4bbd8938ab Manage error when GNS3VM failed to start
Fix https://github.com/GNS3/gns3-gui/issues/1446
2016-09-01 15:36:41 +02:00
f216422d0f Debug shell support command history 2016-09-01 13:45:56 +02:00
4624c7433c Do not dump GNS3 VM config in the list of computes of config file 2016-09-01 11:28:35 +02:00
07b982d4db Fix when closing a container using VNC, root permission are not reset
Fix #659

Signed-off-by: Julien Duponchelle <julien@gns3.net>
2016-09-01 09:28:22 +02:00
483370b756 Do not ignore error when closing a project 2016-08-31 17:24:19 +02:00
662c8788c2 Fix auth for websocket between controller and computes
Fix #660
2016-08-31 15:19:53 +02:00
45471fc865 Make sure to drain notification feed
Ref https://github.com/GNS3/gns3-gui/issues/1447
2016-08-31 11:02:04 +02:00
238421c415 Drop another dead lock at exit 2016-08-31 11:01:42 +02:00
0a08ea05d6 Fix project loading 2016-08-31 10:42:45 +02:00
ff61f79a88 Catch 401 error when connecting to a compute websocket 2016-08-31 09:59:50 +02:00
9fc23f07f1 Fix traceback when a server is already running 2016-08-31 09:57:37 +02:00
03e31a2cb9 Fix crash when loading a topology without project id 2016-08-31 09:42:58 +02:00
7065988087 Raise an error if we use nat and eth1 doesn't exists
Fix #657
2016-08-30 18:27:04 +02:00
5fdd33fe3b Repair VirtualBox VM support
Fix #650
2016-08-30 16:39:03 +02:00
3bff094238 Remote GNS3 VM support
Fix #623
2016-08-30 10:19:01 +02:00
e0c5fdcf1c Avoid too much ressources usage during tests 2016-08-30 09:58:37 +02:00
919355abd8 Catch more error to avoid dead lock at project close 2016-08-29 18:59:13 +02:00
96f3cb0445 Reconnect to compute after compute update 2016-08-29 18:58:49 +02:00
36d2e80d0a Nat node is only on the GNS3 VM for the moment
Fix https://github.com/GNS3/gns3-gui/issues/1448
2016-08-29 18:31:33 +02:00
edae834e0e Monitor status of the compute 2016-08-29 17:36:24 +02:00
2c8b8540cd Upgrade aiohttp to last version 2016-08-29 16:22:46 +02:00
d121c201e4 Rebuild documentation 2016-08-29 15:58:29 +02:00
bbc1505274 Return what is supported by a compute node
Ref https://github.com/GNS3/gns3-gui/issues/1448
2016-08-29 15:53:10 +02:00
ffe6448534 Bring back test for the qcow2 file format 2016-08-29 14:23:25 +02:00
19e6d956df Drop unused endpoint POST /version on compute 2016-08-29 14:22:55 +02:00
72fe5d3489 Merge branch 'master' into 2.0 2016-08-29 14:08:23 +02:00
b7bf97039c Avoid dead lock if you can not close the GNS3VM at exit 2016-08-29 13:53:53 +02:00
da1cd9a3e7 Use $PATH also for dynamips and cleanup some $PATH usages
Fix #655
2016-08-29 11:27:35 +02:00
0eafb6f06c Fix a lock issue with some virtualbox vm
Fix  https://github.com/GNS3/gns3-gui/issues/1444
2016-08-29 10:51:50 +02:00
042a69eecf Raise proper error when you try to load an empty qcow2 file
Fix #637
2016-08-29 10:18:18 +02:00
1885fe62a6 Fix upload form crash
Fix #647
2016-08-29 09:25:02 +02:00
e481ffa94c Search bin from the $PATH for sample configuration file 2016-08-27 18:10:41 +02:00
937bbf0131 Merge pull request #653 from ehlers/master
Update 'Updated systemd unit file and added sample configuration file'
2016-08-27 18:09:35 +02:00
d58a6ccda9 Update 'Updated systemd unit file and added sample configuration file' 2016-08-27 02:00:26 +02:00
84fb108abb Change CR/LF line ending to unix style 2016-08-26 18:45:22 +02:00
f93e443548 Prevent close server process to be started twice
Fix #652
2016-08-26 14:14:19 +02:00
8352ff02a1 When you change settings of the GNS3 VM the VM is reloaded and project using it closed
Fix #644
2016-08-26 14:09:18 +02:00
5289c714f4 When you delete a compute all project using it are closed
Ref #644
2016-08-26 11:22:09 +02:00
7fd520c08b Bind qemu UDP tunnels on all hosts
Qemu is the only platform where we limit the binding of UDP
tunnel to a specific host. It's probably much secure and cleaner
but we have scenario where we need one port bind to an IP and
another bind to a different IP (Link between qemu and and a VM on the
GNS3 VM)

This allow the use of 134fed8fc5
2016-08-26 10:40:11 +02:00
4455499e00 Merge pull request #648 from ianc1215/master
Updated systemd unit file and added sample configuration file
2016-08-26 09:28:40 +02:00
763f258465 Updated systemd unit file and added sample configuration file
Rewrote the systemd unit file to fix an issue where the system was not able to create a PID file inside /var/run.

I fixed this by having systemd create a new directory called /var/run/gns3. Then I had systemd change ownership of the directory to gns3:gns3 so the gns3server executable could read and write the PID file. I have tested these changes against Ubuntu 16.04.1 LTS.
2016-08-25 19:24:09 -04:00
134fed8fc5 Smart choice of host for UDP link 2016-08-25 19:14:29 +02:00
c01bb2436e Return netmask with list of interfaces 2016-08-25 17:22:22 +02:00
9511c34b4f Rebuild documentation 2016-08-25 14:43:19 +02:00
9255dc07b7 Support auto stop for the GNS3 VM
Ref https://github.com/GNS3/gns3-gui/issues/1254
2016-08-25 14:26:01 +02:00
fc8b4c3216 Start GNS3 VM with the controller
Ref https://github.com/GNS3/gns3-gui/issues/1254
2016-08-25 11:49:06 +02:00
21b99ad9f9 Support for sendings settings for the GNS3VM from the GUI
Ref https://github.com/GNS3/gns3-gui/issues/1441
2016-08-25 09:32:06 +02:00
6cad685a08 Prevent connection from Cloud to Cloud connection
Ref #1429
2016-08-23 23:33:19 +02:00
bfabf3ddc8 Fix tests about local compute node 2016-08-23 22:40:26 +02:00
9231b8e991 Fix Exception when opening project that contains an IOU node
Fix #636
2016-08-23 22:38:44 +02:00
147bb8758a Fix log error when closing server websocket
Fix #635
2016-08-23 21:29:46 +02:00
ab38edf7ca Merge branch 'profil_support' into 2.0 2016-08-23 10:06:40 +02:00
897455d5e9 Return computer name instead of local. It's more logic when using remote controller 2016-08-22 18:49:25 +02:00
46910a183e Allow to use the local node even without --local 2016-08-22 18:37:32 +02:00
5bb1abb2a9 Support for profil settings 2016-08-22 17:21:03 +02:00
cde28c849e Return status when you start / stop / suspend a node
Should avoid sync issues
2016-08-22 11:26:51 +02:00
324962def5 You can validate a topology from command line 2016-08-22 10:31:57 +02:00
fe9e824f1c Merge pull request #638 from GNS3/nat
Nat node for only the GNS3 VM
2016-08-21 21:45:11 -06:00
a53a972135 Nat node for only the GNS3 VM 2016-08-21 21:46:49 +02:00
22fcfffce7 Fix a typo 2016-08-21 21:44:05 +02:00
faae248487 Cosmetic changes. 2016-08-20 11:10:34 -06:00
8f7be87b1e Use timemout for project auto close to avoid issue when client / connect 2016-08-19 17:40:07 +02:00
39db35c3ff Send notification when snasphot is restored
Ref https://github.com/GNS3/gns3-gui/issues/1417
2016-08-19 17:07:56 +02:00
0226bb663f Fix start all node is broken
Fix #633
2016-08-19 11:32:11 +02:00
fa76b89731 Fix websocket error when closing the server
Fix #634
2016-08-19 11:20:56 +02:00
f0fad5289c Correclty cleanup packet capture objects when closing server
Fix #592
2016-08-19 11:05:54 +02:00
8eab94f01e Merge branch 'master' into 2.0 2016-08-18 22:16:29 +02:00
d447a04c6a 1.5.3dev1 2016-08-18 22:16:01 +02:00
f358cb45a2 1.5.2 2016-08-18 22:00:39 +02:00
3e3e7b93ae Merge branch 'master' into 2.0 2016-08-18 21:34:52 +02:00
1c2a56ee8e Filter images starting by . 2016-08-18 19:29:09 +02:00
7777407c4b Filter md5sum files from the list of images 2016-08-18 19:26:17 +02:00
2842904769 Clean exit when you Ctrl+C the server and client are still connected 2016-08-18 15:04:43 +02:00
5de27a95f9 Center label when hostname change
Fix #1404
2016-08-17 17:12:23 +02:00
f82527e253 Compute node size on server
Fix #620
2016-08-17 11:58:19 +02:00
938696032c Fix tests 2016-08-17 11:05:16 +02:00
4d8cf8460e Function for computing size of symbols 2016-08-17 10:49:31 +02:00
796ebf7210 Optimize project closing by avoiding closing unused modules
Fix #627
2016-08-16 19:41:59 +02:00
a4023c0298 By default project auto close when you exit client 2016-08-16 19:16:05 +02:00
9694850465 Option for auto close project when no client listen
And fix websocket not correctly detected has closed.

Ref https://github.com/GNS3/gns3-gui/issues/1331
2016-08-16 17:35:43 +02:00
9e81994adc Reset project auto start, auto close, auto open at project import 2016-08-16 16:09:59 +02:00
ac085126fc Support for auto open projects
Fix #1418
2016-08-16 16:04:20 +02:00
12735ff36e Bring back the auto_start
Fix #582
2016-08-16 15:45:06 +02:00
017202d151 Allow to delete a non opened project 2016-08-16 13:30:10 +02:00
0613efa297 Support for auto open project 2016-08-15 20:51:59 +02:00
e710eff22e Update documentation 2016-08-15 17:39:08 +02:00
3ca4edef93 Update project API 2016-08-15 16:44:09 +02:00
431bd789cb Do not send project closed event when it's a snapshot restore
Ref #602
2016-08-15 13:30:02 +02:00
937ffc7b73 Rebuild documentation 2016-08-15 12:11:36 +02:00
16c2305b33 Send a project closed event when project close
Ref #602
2016-08-15 12:06:26 +02:00
225e4f7528 Finish support of VMware based GNS3 VM. 2016-08-11 15:58:29 -06:00
6b8e93f847 Merge pull request #630 from athmane/master
Move utils.vmnet to gns3 namespace
2016-08-03 17:30:12 -06:00
db95cb5c46 Move utils.vmnet to gns3 namespace 2016-07-29 17:53:48 +00:00
45af721164 Support convertsion of 1.5 snapshots
Fix #618
2016-07-28 18:11:52 +02:00
0c3a2c660a Merge branch 'master' into 2.0 2016-07-28 15:05:21 +02:00
d6f63d3b7d Fix Exporting portable projects with QEMU includes base images even when selecting no.
Fix https://github.com/GNS3/gns3-gui/issues/1409
2016-07-28 15:00:04 +02:00
7d90a73ed2 Catch error when md5sum file is corrupted
Fix #622
2016-07-28 12:35:23 +02:00
fc6b220c7c Strip endpoint for configs files because now we use the /files API 2016-07-28 11:56:29 +02:00
7e40eb02e6 API for editing a file on a Node 2016-07-27 18:46:10 +02:00
11af6f4f82 Remove save config endpoint because in 2.O we auto save 2016-07-27 13:33:30 +02:00
0be973f2c5 Support Host node from 1.X topologies
Fix #626
2016-07-26 21:40:11 +02:00
c96bd5f2a9 Update documentation 2016-07-26 19:57:53 +02:00
68eca6c111 Replace snapshots by import / export
Fix #1042
2016-07-26 19:52:58 +02:00
814fd1fcfb Fix /settings 2016-07-26 14:00:19 +02:00
0f7037bb32 Fix Transport selection via DSN is deprecated 2016-07-25 19:34:08 +02:00
e50eae19e6 Support parameters for import 2016-07-25 18:58:34 +02:00
e50acf811c If we don't have a GNS3 VM on linux don't move file to it 2016-07-25 18:03:22 +02:00
f357879186 API for duplicate a project
Ref https://github.com/GNS3/gns3-gui/issues/995
2016-07-25 16:26:33 +02:00
fb3b6b62f5 Support a name and path during the import
Not exposed to the client for the moment.
2016-07-25 09:41:41 +02:00
786f9c87c9 Fix a crash when reloading a project with Docker 2016-07-22 18:02:40 +02:00
9bdc0b78eb Now import project on VM work 2016-07-22 18:02:11 +02:00
fec3694710 Import project on the GNS3VM should work 2016-07-22 16:05:22 +02:00
19b035d7e4 Update documentation 2016-07-22 13:54:57 +02:00
ce557ecd23 Change the compute id to the GNS3 VM if it's not a Linux host 2016-07-22 13:50:15 +02:00
eff6a9154d Strip computes info at project export 2016-07-22 13:39:57 +02:00
e6831c25e2 Fix tests 2016-07-22 13:24:44 +02:00
d58bcddbcc Avoid warning when running docker test on travis 2016-07-22 12:12:58 +02:00
94a262cd46 When importing a project fix the GNS3 version 2016-07-22 11:52:59 +02:00
9b499dc51e Export project with the GNS3VM 2016-07-21 20:17:36 +02:00
88ffd43c97 Strip the old / import export project code controller will do everything 2016-07-21 18:23:31 +02:00
3300e9ec48 Reorganize export project code in order to move it to his own file 2016-07-21 18:15:35 +02:00
487e99bea5 Import with images 2016-07-21 17:55:37 +02:00
0f85fbd5f2 Avoid leaving unfinished task behind us 2016-07-21 15:10:11 +02:00
b5ab53bbe9 Early import project api 2016-07-21 14:48:13 +02:00
14f6bd60fb Disallow export of running topologies 2016-07-21 09:47:09 +02:00
e557ccd078 API for editing files on the controller
Ref https://github.com/GNS3/gns3-gui/issues/1401
2016-07-20 21:52:12 +02:00
bc8a319142 Avoid a warning at the end of the test suite 2016-07-20 18:09:17 +02:00
ff4fc5eb8b Return proper JSON error when something goes wrong on any endpoint 2016-07-20 17:17:42 +02:00
f68c1f0bde When exporting project raise error if export is not possible 2016-07-20 16:58:58 +02:00
08c35f5558 Export non remote server work 2016-07-20 14:50:15 +02:00
7c4c03cf17 If the connection between the controller and compute is closed reopen it 2016-07-20 12:43:23 +02:00
b1b2bbd581 Merge pull request #625 from fcolista/master
requirements.txt : added support for newer aiohttp version
2016-07-19 17:07:30 +02:00
da7074ea74 requirements.txt : added support for newer aiohttp version 2016-07-19 16:59:47 +02:00
73d5066392 Merge branch 'master' into 2.0 2016-07-19 16:41:12 +02:00
44307b43b9 Improve compaction of .gns3project
Ref #624
2016-07-19 16:38:32 +02:00
dd63ca6ef1 Temporary fix for remote GNS3 VM support
Ref #623
2016-07-19 13:38:15 +02:00
2977b1059e Fix a crash at startup due to an error with VMware
Fix #619
2016-07-19 13:08:06 +02:00
3b70b4f217 Raise an error if you overwrite an existing project 2016-07-18 21:30:30 +02:00
c12413e0ce Fix duplicate name for VM 2016-07-18 19:30:38 +02:00
bda1812811 Avoid duplicate node name when reloading a project 2016-07-18 19:09:08 +02:00
c9bdd76922 IOU support for conversion from 1.5 2016-07-18 18:55:47 +02:00
96eceed8ba Fix creation of IOU nodes 2016-07-18 18:43:55 +02:00
11197e8dee Make topologies test independent of the version of GNS3 2016-07-14 15:34:03 +02:00
b5cb625169 Rebuild doc 2016-07-14 15:33:09 +02:00
b745397a3a Import server config from 1.X GUI 2016-07-14 15:15:28 +02:00
45591aa74b Support for 1.3 topologies 2016-07-13 18:31:12 +02:00
c0abe0edfd Merge branch 'master' into 2.0 2016-07-13 17:48:18 +02:00
b841a0f57b Support image in conversion from old topologies 2016-07-13 16:37:05 +02:00
8be1e77a2e Optimize storage of drawing
If the drawing contain an image we extract it

Fix #591
2016-07-13 16:18:22 +02:00
3dccfbb852 Migration to 2.0 rename instructions.txt to README.txt
Fix #612
2016-07-13 09:58:53 +02:00
2c62b1eeb8 Cloud support for old topologies 2016-07-12 18:48:01 +02:00
7c7662f1b6 Correctly forward the 409 from compute to client 2016-07-12 18:16:50 +02:00
3d52e18fa5 Raise an error if uBridge is not installed 2016-07-12 17:38:13 +02:00
ee533943c8 Start of support for topologies before 2.X
Missing part:
* GNS3 VM
* Cloud
* Image

Ref #564

Early support of conversion from 1.5
2016-07-12 17:14:35 +02:00
fd0e8f89db Fix VMware support 2016-07-12 16:29:58 +02:00
b98d4cb042 Fix Virtualbox support 2016-07-12 16:22:55 +02:00
febf0f7839 Fix crash when winpcap is not installed
Ref https://github.com/GNS3/gns3-gui/issues/1380
2016-07-12 13:43:08 +02:00
9cd3231de3 Fix docker support in 2.0 2016-07-12 12:17:19 +02:00
234f199558 Load/save GNS3 VM settings on controller side. 2016-07-11 21:43:01 -06:00
13deecea4e Basic API for GNS3 VM. 2016-07-11 17:01:18 -06:00
27269fb13a Update documentation 2016-07-11 15:37:57 +02:00
91ec61b88d Check topology schema when loading/saving it
Fix #583
2016-07-11 15:36:52 +02:00
1f2ce48fc8 Fix /network/interfaces broken test 2016-07-11 14:21:33 +02:00
9bf4c22a50 Fix HTTP errors not forwarded from compute to client
Fix #615
2016-07-11 09:33:55 +02:00
50aa198ba7 Mark interface type upstream. 2016-07-10 14:54:31 -06:00
d159cbcc6d Rename /interfaces entry point to /network/interfaces. Ref #615. 2016-07-10 11:22:08 -06:00
d99c050705 Fix schema error in qemu 2016-07-08 11:27:22 +02:00
7e91a5cb11 Raise error if not started with --local
If you try to use a local server but you don't have started
it with --local we raise an error.
2016-07-08 11:17:17 +02:00
05df0a9bb6 Fix tests when run without local network
Fixed in the train :)
2016-07-08 11:03:52 +02:00
26d49f19c1 1.5.2dev1 2016-07-07 18:58:23 +02:00
e1a7efad60 1.5.1 2016-07-07 18:58:23 +02:00
08956e438c Add NIO TAP support for Docker and VMware. Fixes #603. 2016-07-06 22:00:39 -06:00
7a4c01e737 When you delete a node all link connected are destroyed
Ref #608
2016-07-05 16:07:05 +02:00
ca4d09ea40 Merge branch 'master' into 2.0 2016-07-05 15:41:53 +02:00
e175650fb0 Increase the number of interface for docker
Fix #593
2016-07-04 17:22:54 +02:00
5f88db93ff Add the method in the bad request answer 2016-07-04 15:00:46 +02:00
e0a2553be4 Fix a rare crash in IOU
Fix #604
2016-07-04 14:46:06 +02:00
b905760635 Fix a crash when docker is used but not installed
Fix #605
2016-07-04 14:12:39 +02:00
f9bc745ddb Backport Docker node hot linking
Fix #596
2016-07-04 11:18:03 +02:00
ead8a6caa2 Allows hot-linking for Docker containers. Ref #267. 2016-07-04 10:58:00 +02:00
7fee90805b Ensure we update all the label of a link with only one update notif 2016-07-01 21:56:42 +02:00
9d2f4168ff Correctly restore label position for link 2016-07-01 21:33:39 +02:00
5bf6011429 Rotation for label of interfaces 2016-07-01 19:54:44 +02:00
fea1e3ba61 Support update link on controller
Ref https://github.com/GNS3/gns3-gui/issues/1300
2016-07-01 17:38:32 +02:00
71d4c0a13a Store rotation for labels 2016-07-01 15:30:38 +02:00
818174824b Breaking change for 2.X topologies! Store width and height for nodes & a
style properties
2016-07-01 14:38:42 +02:00
fe7bcae6a1 Send node.updated notif only if object changed 2016-06-30 18:29:17 +02:00
758a427a76 Add documentation about notifications 2016-06-30 11:08:01 +02:00
543b423e03 Send compute usage via in the compute.updated notification
Ref https://github.com/GNS3/gns3-gui/issues/1261
2016-06-30 09:55:59 +02:00
66959ee4e9 Fix error when installing using setup.py
Revert "Unused information in setup.py"

This reverts commit deb97f8ec0.

Fix #598
2016-06-29 17:57:41 +02:00
68b7f81601 Dissalow duplicate name for compute and project
Fix #541
2016-06-29 17:39:41 +02:00
d8317e8128 Add documentation 2016-06-29 15:17:02 +02:00
22f9effede Save to disk when config change 2016-06-29 15:15:22 +02:00
224708e451 Update documentation 2016-06-29 14:18:38 +02:00
c4d7a0b8fc A settings API
Ref #589
2016-06-29 14:16:29 +02:00
8ec11619cd Full symbol support on server
Fix #496
2016-06-28 22:23:34 +02:00
e77445e860 API for uploading symbols 2016-06-28 21:15:22 +02:00
bf154049d2 Suppport ~/GNS3/symbols 2016-06-28 19:58:57 +02:00
5b4e668eb5 Move symbol static to /symbols 2016-06-28 18:17:48 +02:00
c5fa699b9e New crash report key 2016-06-27 20:42:50 +02:00
5fab48ba75 1.5.1dev1 2016-06-27 20:35:08 +02:00
2739483751 1.5.0 2016-06-27 20:24:53 +02:00
b66f7daa28 Beginning of the symbols from controller
Ref #496
2016-06-27 18:37:20 +02:00
deb97f8ec0 Unused information in setup.py 2016-06-27 14:54:05 +02:00
e830356e62 Fix tests for VPCS 2016-06-27 14:34:34 +02:00
c0b09ae76a Merge branch '1.5' into 2.0 2016-06-27 14:24:48 +02:00
1f0fe6d304 Fix import of project with no disk
Ref #590
2016-06-27 12:38:18 +02:00
5898b86dfc Fix docker test for no free interface 2016-06-27 12:11:18 +02:00
fa769cd41d Restore the veth- prefix for docker otherwise it's conflict with network
manager

See #593, #440
2016-06-27 12:09:46 +02:00
6b5822905c Typo fixed 2016-06-27 10:15:18 +02:00
379c216109 Allow for (a lot) more docker container ports. Fixes #593. 2016-06-26 21:50:08 -06:00
d79fb231d3 Use uBridge for VirtualBox connections plus some cleaning. Ref #267. 2016-06-24 18:35:39 -06:00
d28fad223f Allows hot-linking for Docker containers. Ref #267. 2016-06-24 17:26:40 -06:00
ce3276d374 Option to deactivate using uBridge globally. 2016-06-24 15:04:58 -06:00
abfb51baa8 Base for GNS3 VM controlled by the controller. 2016-06-23 21:56:42 -06:00
04022677bd Use uBridge for Qemu connections. Ref #267.
Handle packet captures for VPCS & Qemu nodes. Fixes #548.
2016-06-23 16:56:06 -06:00
4eb03b5a99 Allows the creation of non-existent TAP interfaces when using the cloud. 2016-06-23 11:36:32 -06:00
c8f37381f4 Rebuild doc for drawing 2016-06-23 12:29:15 +02:00
5a410155f7 Create the controller config at first controller start 2016-06-23 12:17:44 +02:00
4c3bfde97e Fix test suite after VPCS changes for using ubridge 2016-06-23 12:10:18 +02:00
852d8e411e Shape => Drawing 2016-06-23 11:17:23 +02:00
c847755f1b Small architecure schema in the doc 2016-06-23 10:09:40 +02:00
00da15e4af Use uBridge for VPCS connections. Ref #267. 2016-06-22 19:40:46 -06:00
b456a363ca Sample curl with shapes 2016-06-22 18:14:14 +02:00
bc613e9fd8 Send SVG in shape update only when change 2016-06-22 17:46:00 +02:00
7422d06c1d Merge pull request #586 from AJNOURI/patch-1
Update __init__.py
2016-06-22 17:12:48 +02:00
5daff17911 Update __init__.py
Missing sys import.
Solves issue #585
2016-06-22 15:27:23 +02:00
8296621320 Merge pull request #584 from GNS3/kill_ghosts
Kill ghosts process at startup (Dynamips, VPCS, Ubridge)
2016-06-21 22:20:56 -06:00
03e9eac55b Rotation support 2016-06-21 19:39:00 +02:00
4f78efa0c8 Return the svg field in shape API
Ref #498
2016-06-21 12:19:12 +02:00
51dbe59e99 Fix links into the documentation 2016-06-21 10:49:22 +02:00
027d3687a7 Split documentation 2016-06-21 10:47:22 +02:00
f55398fe99 Add shape documentation 2016-06-21 10:35:43 +02:00
679774430a Update documentation 2016-06-21 10:31:00 +02:00
32252e5193 Merge branch '1.5' into 2.0 2016-06-21 09:58:28 +02:00
42ff398f05 Raise an error if you try to use Docker on non Linux host 2016-06-21 09:57:47 +02:00
116135b9dc Item => Shape 2016-06-21 09:49:16 +02:00
85ebac7eb3 API for rectangle & co
Ref #498
2016-06-20 18:45:31 +02:00
6949976d12 Merge branch '1.5' into 2.0 2016-06-20 12:45:56 +02:00
d1de665939 Fix a crash in Docker if daemon stop to respond
Fix #580
2016-06-20 11:46:10 +02:00
f151181409 Fix a crash if Dynamips router has no initial configuration
Fix #572
2016-06-20 11:41:39 +02:00
07395c9cf2 Kill ghosts process at startup (Dynamips, VPCS, Ubridge)
This is done only if you lock by pid to avoid killing process
of another server.

Fix #581
2016-06-20 09:55:59 +02:00
3132d51694 Do not reload a project if project is already opened
Ref https://github.com/GNS3/gns3-gui/issues/1251
2016-06-17 17:50:06 +02:00
4783691c87 Drop /upload
Fix #552
2016-06-17 17:25:59 +02:00
49eb7d8ce7 Atomic save of the .gns3
Fix #579
2016-06-17 17:13:36 +02:00
627ebdb322 Fix issue with reloading a topologie with dynamips 2016-06-17 15:56:35 +02:00
186adff2ef Update documentation 2016-06-17 11:13:36 +02:00
6dff8af235 Update documentation 2016-06-17 11:12:22 +02:00
ba05ca029e Fixes conflicting argument vs config file option. 2016-06-16 12:03:48 -06:00
a289c9c685 Change option from udp_discovery to server_discovery. 2016-06-16 11:27:10 -06:00
da58a65075 Merge remote-tracking branch 'origin/2.0' into 2.0
Conflicts:
	gns3server/web/web_server.py
2016-06-16 11:19:03 -06:00
32907ccac3 Use a classic thread for UDP server discovery. Closes #545. 2016-06-16 11:17:12 -06:00
c66ef9d218 Support filename for project in the controller 2016-06-16 16:57:54 +02:00
411ca56b94 Fix Exception when closing local server (started by GUI)
Fix #578
2016-06-16 15:00:32 +02:00
45d7e09cbd Add a settings in command line and config file to enable discovery 2016-06-16 09:53:32 +02:00
f45901e861 Merge branch '2.0' of github.com:GNS3/gns3-server into 2.0 2016-06-16 09:19:48 +02:00
2bc30e207e Comment about API V1 2016-06-16 09:11:50 +02:00
56051b1142 UDP server discovery. Ref #545. 2016-06-15 17:37:43 -06:00
2a1c5cfd9c Merge branch '1.5' into 2.0 2016-06-15 19:14:03 +02:00
ae076c7ca9 Merge branch 'master' into 1.5 2016-06-15 19:11:26 +02:00
6982e118c0 How to report security issues 2016-06-15 19:10:38 +02:00
38a41a1cfd 1.5.0dev6 2016-06-15 18:53:04 +02:00
8fbfae6a98 1.5.0rc2 2016-06-15 18:51:31 +02:00
aa5988788d Strip user from compute in topology and return project filename 2016-06-15 18:22:11 +02:00
c4d619ce3c API for loading a project from a .gns3 2016-06-15 16:43:03 +02:00
6d36429870 Reload a topology work 2016-06-15 16:26:16 +02:00
524f8991bc Project status (opened / closed) 2016-06-15 16:26:16 +02:00
0569480953 Create link when loading topology on controller 2016-06-15 16:26:16 +02:00
742243e9df Method for reloading a topology (not bind to an api handler)
Ref https://github.com/GNS3/gns3-gui/issues/1243
2016-06-15 16:26:16 +02:00
5ca9becdf9 Do not crash if we can not cleanup a temporay project
Fix #576
2016-06-15 11:08:31 +02:00
bb0db7846f Fix black screen with Qt app in Docker container
Fix #556
2016-06-15 11:01:03 +02:00
e82862c69f Detect when command in the container exit
Fix #571
2016-06-15 10:32:38 +02:00
d98a7aac19 Docker when exit aux console restart it
Ref #571
2016-06-15 10:21:30 +02:00
43a3584a5c Pass by default the environment variable container=docker
Fix #573
2016-06-15 10:12:32 +02:00
049c348709 Fix busybox binary location
Fix #570
2016-06-14 23:09:28 +02:00
3aea16c527 Merge pull request #568 from GNS3/watch_dynamips_change
Watch for dynamips rom & nvram change
2016-06-14 11:58:42 -06:00
d815d25bdf Write .gns3 on server
Ref https://github.com/GNS3/gns3-gui/issues/1243
2016-06-14 12:04:23 +02:00
b62a03d7e2 Add a documentation about GNS3 file formats 2016-06-14 10:36:54 +02:00
27624acd06 Update documentation 2016-06-14 10:24:55 +02:00
3255be0ae2 Drop the commit system
Ref https://github.com/GNS3/gns3-gui/issues/1243
2016-06-14 10:16:33 +02:00
52f852bc6d Merge branch '1.5' into 2.0 2016-06-14 09:50:07 +02:00
7beadd03a6 Merge remote-tracking branch 'origin/2.0' into 2.0 2016-06-13 15:07:40 -06:00
31f4b52631 Add zeroconf. Ref #545. 2016-06-13 15:07:20 -06:00
343f2b574d Avoid loosing console port for Docker
Fix #569
2016-06-13 21:20:29 +02:00
016c3e515b Workaround a crash in x11vnc
Fix? #569
2016-06-13 20:12:42 +02:00
70431a5fa6 Send update of properties from controller only for controller stuffs
Fix #566
2016-06-13 18:46:30 +02:00
4f03c3011e Delete volume when dropping the container
Fix #567
2016-06-13 17:39:04 +02:00
e183e7da27 Catch connection reset in ioucon 2016-06-13 16:28:26 +02:00
67c04a7855 Watch for dynamips rom & nvram change
This monitor for change the file from dynamips by computing a
hash of the watched file.

The way dynamips work prevent the update of the modification time.

We can improve that by using native system for watching file but:
* it's require dependencies specific for each OS
* dependencies use C extensions
* this is only a backup if your router is cleanly shutdown we export
stuff
2016-06-13 15:57:36 +02:00
2bde02d459 Controller side unique node name allocation. Ref #541. 2016-06-11 17:31:30 -06:00
6cd136b423 Merge pull request #565 from GNS3/watch_iou
Monitor IOU NVRAM changes.
2016-06-10 22:33:56 -06:00
b079cf9546 Fixes typo. 2016-06-10 22:33:07 -06:00
c3c5eb533f Detect Wifi adapters on OSX. Fixes #549. 2016-06-10 12:36:41 -06:00
69334665d2 Monitor IOU nvram for change
With the save as you go we need to save the startup config
when a change appear instead of the old commit system.
2016-06-10 18:26:01 +02:00
182a979e71 Generic class for watch file change 2016-06-10 17:51:19 +02:00
1c6de3ff39 Fix an error when updating IOU node 2016-06-10 16:39:54 +02:00
2a5cf18d20 When using pool raise again exception received 2016-06-10 14:42:46 +02:00
e46171b826 Merge branch '1.5' into 2.0
Conflicts:
	gns3server/handlers/api/compute/iou_handler.py
2016-06-09 19:35:59 -06:00
3c9e8507d1 Handle vmnet interfaces in the cloud on OSX. Fixes #554. 2016-06-09 19:00:33 -06:00
a35f41e4dc Prevent users to connect the cloud to Wireless adapters on OSX. Fixes #549. 2016-06-09 18:42:14 -06:00
313226786f Delete vlan.dat for L2IOL during config import. Fixes #1285. 2016-06-09 17:47:45 -06:00
dee9d423a3 Support for x,y,z,symbols,label in node object on controller
https://github.com/GNS3/gns3-gui/issues/1297
2016-06-09 16:47:58 +02:00
3deb555981 Update the doc for GNS3 2.0
Fix #495
2016-06-08 18:12:22 +02:00
70345abc2a Try cleaner close of the compute node
Ref #547
2016-06-08 17:18:40 +02:00
fe98163bd0 Send controller images only for qemu, iou and dynamips 2016-06-08 15:59:54 +02:00
1b530bde3f Fix Compute name is lost at save
Fix #562
2016-06-08 14:25:11 +02:00
add546158f List images return images on compute and controller
Fix #506
2016-06-08 14:14:03 +02:00
08e482004f Auto upload missing images 2016-06-07 19:38:01 +02:00
972cbd0594 Cleanly forward exception from compute to controller 2016-06-07 16:06:37 +02:00
d8bdd16e13 Raise an error if image is missing on compute 2016-06-07 15:34:04 +02:00
dcebaf61b8 Do not timeout forwarded calls 2016-06-07 11:21:47 +02:00
d30abeca21 Merge branch '1.5' into 2.0 2016-06-07 10:56:55 +02:00
df7d26e418 Fix for copy VOLUMES by @ehlers 2016-06-07 09:27:37 +02:00
c829a250a9 Revert "Integrate fixes from @ehlers"
This reverts commit 775ee4259e.
2016-06-07 09:26:27 +02:00
8909c4211c Support upload images 2016-06-06 19:55:54 +02:00
582e3c72ff Forward post with large content to compute 2016-06-06 19:51:35 +02:00
775ee4259e Integrate fixes from @ehlers 2016-06-06 18:27:49 +02:00
d108fc6e94 Support all path for forward to compute 2016-06-06 18:26:13 +02:00
06b54d82dc Support forwarding POST request to compute nodes 2016-06-06 15:45:32 +02:00
61ac8763f2 Merge branch '1.5' into 2.0 2016-06-06 14:28:21 +02:00
e80dd40121 Update docs 2016-06-06 14:24:13 +02:00
e335015520 Copy original ressources from VOLUMES
Fix #561
2016-06-06 12:39:29 +02:00
65bfb4b907 Remove debug print. 2016-06-02 21:32:46 -06:00
8c760f3ccc Fix some compute_id detection 2016-06-02 19:55:10 +02:00
eaf621cc57 Generic forward call to compute node (especially for qemu with require a
lot of call)
2016-06-02 19:38:16 +02:00
e05b0a396e Disallow / in compute_id because it was a stupid idea 2016-06-02 18:38:47 +02:00
917c1c7f84 Expose /virtualbox/vms /vmwares/vms and /images via controller
Ref #1192, #537
2016-06-02 18:02:48 +02:00
fecd81655e Support recursive image search
Fix #546
2016-06-02 16:44:38 +02:00
a702155230 Support multiple images location
Ref #546
2016-06-02 15:34:40 +02:00
cb7dbfb256 Merge branch '1.5' into 2.0 2016-06-02 13:47:40 +02:00
4afa5994e8 Fix stacktrace when exiting with Ctrl + C
Fix #547
2016-06-02 13:44:52 +02:00
f47eb326c7 Revert move "/version" endpoint to "/server/version".
Move "/server/shutdown" endpoint to "/shutdown".
2016-06-01 18:21:07 -06:00
cd07a99118 Some cleaning + move "/version" endpoint to "/server/version". 2016-06-01 17:50:31 -06:00
469187c584 1.5.0dev5 2016-06-01 20:32:23 +02:00
ad7ecb8850 1.5.0rc1 2016-06-01 20:24:48 +02:00
9b99a03cbf Fix working dir when starting a docker container 2016-06-01 20:13:48 +02:00
3aed651062 Always use busybox for docker permission fix 2016-06-01 20:09:15 +02:00
435dc82873 Save an restore docker permission
Fix #550
2016-06-01 18:16:56 +02:00
87f15eafe0 Shutdown on controller
Ref https://github.com/GNS3/gns3-gui/issues/1191
2016-06-01 15:41:13 +02:00
ae687346f1 Export the list of volumes to a env variable accessible in the container
Ref #550
2016-06-01 11:39:42 +02:00
f9d88d902a Remove NIOVMNET. 2016-05-31 19:16:55 -06:00
f2eb2a4bdc Remove NAT NIO. 2016-05-31 19:06:48 -06:00
d3436756b2 Fix permissions and ownership when stopping container
Fix #550
2016-05-31 21:08:41 +02:00
6f7b06e66f Fix a crash when docker start command is None
Ref #550
2016-05-31 16:32:12 +02:00
009ffcb4ef Ubridge 0.9.4 is require
Ref #551
2016-05-31 15:46:07 +02:00
f0e0988d6a Includes uBridge stdout in case of error. 2016-05-30 22:07:37 -06:00
3f61fbeb0e Generate a MAC address using the project + node UUID. Ref #522. 2016-05-30 11:52:08 -06:00
d42366a75a Merge branch '1.5' into 2.0 2016-05-30 15:34:38 +02:00
e65648398b Catch extra args in windows signal handler 2016-05-30 15:29:57 +02:00
6c1d7bad81 Catch extra args in windows signal handler 2016-05-30 15:29:17 +02:00
4c291f5051 Remove /config/reload
Fix #539, https://github.com/GNS3/gns3-gui/issues/1187
2016-05-30 15:24:38 +02:00
29127895b9 Fix the watch local server configuration file
Ref #539
2016-05-30 15:18:49 +02:00
7a80dd6cb3 Merge branch '1.5' into 2.0 2016-05-30 11:45:07 +02:00
94a709cb42 Fix tests around Qemu mac address
Ref #522
2016-05-30 10:53:09 +02:00
c1aad550fa Merge branch '1.5' into 2.0
Conflicts:
	gns3server/version.py
2016-05-29 19:52:15 -06:00
59f22cd346 Functional cloud. Fixes #402. 2016-05-29 16:35:07 -06:00
39a3f2fae2 Cloud schema and remove use_ubridge for VMware VM. 2016-05-28 21:46:48 -06:00
ea7754f1c8 Allow to block network traffic originating from the host OS for vmnet interfaces (Windows only). 2016-05-28 13:39:21 -06:00
914fe7e750 Randomize the 4th and 5th bytes when provided with a base mac address. Fixes #522. 2016-05-27 23:00:05 -06:00
8e3e3c08f8 Fix an import error when you have no GNS3 VM 2016-05-27 16:09:41 +02:00
e497e98ca1 Warn if you can not export a file due to permission issue
Fix #543
2016-05-27 14:45:02 +02:00
df654b40ff Add a test 2016-05-26 13:43:35 +02:00
fbc04e083b Allow empty password 2016-05-26 13:32:52 +02:00
84b12fd953 Support null in compute user and password 2016-05-26 10:11:11 +02:00
314a7cd8fb Generate an uuid for compute node if None is provided 2016-05-25 14:10:03 +02:00
6162d7e431 Generated compute name include the username when it's exists 2016-05-25 13:58:29 +02:00
d469a2060d Update a computes require only changed arguments 2016-05-25 11:48:09 +02:00
0063fb4615 Add 127.0.0.1:8080 in allowed CORS 2016-05-25 11:36:39 +02:00
dbda3fc8fc Add method to delete and update computes 2016-05-25 11:28:13 +02:00
2c72452c91 Drop useless test 2016-05-24 17:57:56 +02:00
a797038aeb Drop code for temporary projects
Fix https://github.com/GNS3/gns3-gui/issues/982
2016-05-24 17:57:04 +02:00
df73f80bf5 Auto create the local compute node 2016-05-24 15:45:06 +02:00
b126c396c9 Start all, with a controlled concurrency
Fix #536
2016-05-24 11:21:49 +02:00
da6cb13338 Merge branch '1.5' into 2.0 2016-05-24 10:13:53 +02:00
3fd0a6d638 Do not delete adapters when stopping a VMware VM. Ref #1066.
Allocate a new vmnet interface if vmnet 0 1 or 8 is set to a custom adapter.
Set adapter type to all adapters regardless if already configured or added by GNS3.
2016-05-23 15:53:03 -06:00
851ba074e7 Set default VMware VM adapter type to e1000. 2016-05-23 14:14:42 -06:00
0aa81b5fa5 Send event when adding compute node or modify it (for server sumary) 2016-05-23 18:44:20 +02:00
cdd54b951a 1.5.0 dev 4 2016-05-23 15:13:19 +02:00
1ddb16eca0 1.5.0b1 2016-05-23 15:08:23 +02:00
f6a3899603 Return a compute name it could be different of compute id 2016-05-23 11:27:47 +02:00
3e6aec016b Fix test for idlepc 2016-05-23 11:27:47 +02:00
7d055968e5 First step towards the cloud node re-factoring. 2016-05-22 19:24:14 -06:00
7bc0570735 Allow an IOS router to stop even the Dynamips hypervisor command fail to be sent. Ref #488. 2016-05-21 19:13:36 -06:00
1ae17b74df Extract private-config only when necessary (content is different than the default). Fixes #520. 2016-05-21 18:58:28 -06:00
cb6df28f59 Fixes disabling the VPCS relay feature. Fixes #521. 2016-05-21 17:42:34 -06:00
3e89543ab9 Fixes wrong exception in Docker VM implementation. 2016-05-21 15:19:32 -06:00
a2ebbaa322 Force Npcap DLL to be used first for Dynamips and uBridge (instead of the one from Winpcap if installed). 2016-05-21 14:43:10 -06:00
67e346ba92 Fixed startup-config is lost if you change any IOS router settings. Fixes #1233. 2016-05-21 13:20:18 -06:00
acdc1e5ebb Fixes check for NPF service and add check for NPCAP service on Windows. 2016-05-20 20:19:28 -06:00
6d5085910c Frame Relay and ATM switches migrated to the new API. 2016-05-20 17:59:59 -06:00
57fd72c35c Ethernet hub and Ethernet switch almost fully migrated to the new API. 2016-05-19 22:45:04 -06:00
672a617102 Compute IDLE PC via controller
Fix #1234
2016-05-19 16:22:15 +02:00
00f80f54e8 Merge branch '1.5' into 2.0 2016-05-19 13:32:30 +02:00
2bb062c61e Fix ProcessLookupError X11VNC
Fix #534
2016-05-19 13:23:53 +02:00
a741662636 Force tag latest for docker image if no tag is specified
Fix #533
2016-05-19 13:09:07 +02:00
b00a09efaa Test link.updated event 2016-05-18 21:28:37 +02:00
54747ee618 Support for link event, fix link not correctly deleted 2016-05-18 18:37:18 +02:00
fa0af7f4a2 Correctly process node.updated event on controller 2016-05-18 16:12:57 +02:00
694e1a2e68 Extract the notification part of controller to a dedicated class 2016-05-18 14:56:23 +02:00
d86cefaaeb Support node without console
Fix #532
2016-05-18 11:59:25 +02:00
d5895c3a47 Merge branch '1.5' into 2.0 2016-05-18 11:25:41 +02:00
871fea33e0 Cleanup unbreakable space 2016-05-18 11:23:45 +02:00
82f82f8cf9 Send updated event when you update the node 2016-05-18 11:03:13 +02:00
7ebbdcd47c Functional Ethernet hub with new API. Uses Dynamips backend by default for now. 2016-05-17 21:22:18 -06:00
f052299eb1 Return status in all cases 2016-05-17 19:51:06 +02:00
c4ebdc0e37 Allow cors from Github pages demo site 2016-05-17 17:51:22 +02:00
b07dcf552c Add an endpoint for listing the links of a project 2016-05-17 16:10:47 +02:00
ce0d715895 Fix Deleted node are still return by the API
Fix #529
2016-05-17 13:11:43 +02:00
342bcdb5b6 CORS support
Fix #530
2016-05-17 12:39:23 +02:00
b44c2ea713 Merge branch '1.5' into 2.0 2016-05-17 09:39:36 +02:00
8cb5cedb5d Do not raise error if vmrun.exe is named vmrun.EXE 2016-05-17 09:28:05 +02:00
da81b49fdc Delete the project on all node where the project is created 2016-05-16 21:59:40 +02:00
a496aaab9e Send node.updated event and tests are green
Fix #524
2016-05-16 21:12:32 +02:00
cb70cfecd7 Fix docker test 2016-05-16 19:37:47 +02:00
5c8b3f3f4c Avoid crash at capture startup with dynamips 2016-05-16 18:45:03 +02:00
1eb77a0b3f Fix docker support on 2.0
Fix #528
2016-05-16 18:32:29 +02:00
a9b95eb242 If the compute node is remote do not send project path 2016-05-16 18:17:24 +02:00
d97325b113 Fix you can not update Dynamips and IOU node
Fix https://github.com/GNS3/gns3-gui/issues/1239
2016-05-16 17:53:40 +02:00
26c7aedba6 Fix docker test about vm suspended 2016-05-16 17:39:32 +02:00
f76f417e52 Merge branch '1.5' into 2.0 2016-05-16 16:48:53 +02:00
bc33683e47 Load docker api only for Linux
Fix #525
2016-05-16 16:47:27 +02:00
ac24922300 Node deleted event
Fix #527
2016-05-16 14:31:00 +02:00
c88c67e8ef Updates Ethernet hub schema. 2016-05-15 21:01:33 -06:00
7a523990a6 Base for generic switch nodes. Ref #492. 2016-05-15 11:23:14 -06:00
5b604da33a Make sure nodes send the right notification when started, stopped or suspended. 2016-05-13 20:41:58 -06:00
51738e19c3 Some spring cleanup for Docker VM. 2016-05-13 19:28:53 -06:00
f1bc2f22c3 Start, stop, suspend and reload endpoints for all nodes belonging to a project. Fixes #1212. 2016-05-13 19:26:50 -06:00
6cea6c9162 Some more (spring) cleaning. 2016-05-13 18:48:10 -06:00
f81d35cc29 Handlers: cleanup and fixes. 2016-05-13 18:00:07 -06:00
885d93be02 Delete a node work 2016-05-13 17:50:07 +02:00
be1efe8327 Schemas review. 2016-05-12 19:07:25 -06:00
d21fa9e961 Update doc about node 2016-05-12 19:18:37 +02:00
2857d9a070 Send a field status in the node object 2016-05-12 19:15:46 +02:00
d43e78a1d7 Support all characters for compute ID 2016-05-12 16:41:05 +02:00
b46a0ff4ae Endpoint for getting information about a compute node 2016-05-12 16:35:14 +02:00
5280644327 Return command_line and node_directory via the controller 2016-05-12 10:39:50 +02:00
885a870ae8 Rebuild documentation 2016-05-12 08:44:38 +02:00
e457df1777 Test are OK 2016-05-12 08:42:11 +02:00
801b94a964 Fixes VirtualBox VMs list images. 2016-05-11 16:45:17 -06:00
ef7b4ef020 Fixes tests and some PEP8. 2016-05-11 15:19:00 -06:00
483431438a Merge remote-tracking branch 'origin/2.0' into 2.0
Conflicts:
	gns3server/controller/project.py
	tests/compute/test_project.py
	tests/controller/test_project.py
2016-05-11 11:41:45 -06:00
5a76f81271 Refactoring to use a common node class for all VMs and other (future) objects. 2016-05-11 11:35:36 -06:00
9ccb55206d Cleanup code for getting the default project directory 2016-05-11 18:42:55 +02:00
a0344576ba Show version for debug 2016-05-11 16:31:16 +02:00
95d2bd0065 Merge branch '1.5' into 2.0 2016-05-11 16:16:29 +02:00
fa140e991c Merge branch 'master' into 1.5 2016-05-11 16:16:11 +02:00
f4b79af45f Move tools for creating self signed certificate to clean repo 2016-05-11 16:13:32 +02:00
c2da568543 Protect controller and compute about path outside project directory
Fix #503
2016-05-11 15:59:32 +02:00
390401000f A client could not erase the local compute node config in the controller
Fix #499
2016-05-11 15:02:35 +02:00
4342b4346e Fix tests 2016-05-11 11:22:59 +02:00
cd836f146e Create the project on compute only when needed 2016-05-11 10:56:43 +02:00
ed0bae8689 Merge branch '1.5' into 2.0 2016-05-11 10:07:30 +02:00
a1bf9cdfd3 Keep the version.py untouched when merging 2016-05-11 10:06:21 +02:00
f414ce459a 1.5.0dev3 2016-05-11 10:03:03 +02:00
c3c7356ce3 Merge branch '1.5' into 2.0 2016-05-11 10:02:30 +02:00
366e9620dc Prepare 1.5.0 alpha 2 2016-05-10 19:14:50 +02:00
ab13f628f7 Minor changes on CHANGELOG 2016-05-10 10:10:56 -06:00
e108a9e136 Prepare alpha 1 2016-05-10 17:58:11 +02:00
9dca7dfe4a Merge branch '1.5' into 2.0 2016-05-10 17:51:40 +02:00
9e2043bfa8 Ensure that the connection to docker is closed when leaving server
Fix https://github.com/GNS3/gns3-gui/issues/1227
2016-05-10 12:14:48 +02:00
28f7c2a1cd Ensure in all cases the docker console is closed before restart
Fix https://github.com/GNS3/gns3-gui/issues/1226
2016-05-10 11:39:59 +02:00
c7d58eb3b3 Merge pull request #518 from GNS3/detect_eth
Wait for all interfaces available in container
2016-05-09 10:54:37 -06:00
41f02dad54 Merge pull request #516 from GNS3/improve_parse_version
Improve parse_version
2016-05-07 11:02:58 -06:00
76cc1d2750 Fixes call to export project. 2016-05-07 10:39:32 -06:00
2cdfd6c0d7 Wait for all interfaces available in container
Fix #511
2016-05-06 19:07:18 +02:00
57cf57b408 Improve parse_version
Ref #515
2016-05-06 17:09:03 +02:00
16b5bb8810 Workaround for exception when using gns3server.utils.parse_version. Fixes #513. 2016-05-05 10:15:51 -06:00
56c153af79 Make HTTP support more reliable with home made HTTP server 2016-05-04 16:32:45 +02:00
9beca700a5 PEP8 2016-05-04 16:32:37 +02:00
8e429ee4c1 Ban port dissalowed by chrome and firefox 2016-05-03 21:07:01 +02:00
f3095d94c1 Replace port in HTTP flow for docker 2016-05-03 18:01:23 +02:00
5fd385159c HTTP support for docker
Fix #509
2016-05-03 16:49:33 +02:00
dcbaa62df8 Better aux console for docker
Fix #472
2016-05-03 11:33:43 +02:00
e9fb7f4981 Make sure an image is not partially uploaded
Fix #505
2016-05-02 17:25:46 +02:00
d952718f30 Fix RuntimeWarning: You have iterated over the result of
pkg_resources.parse_version. This is a legacy behavior

Fix #504
2016-05-02 17:14:15 +02:00
a3b243c501 Merge branch '1.5' into 2.0 2016-05-02 17:08:15 +02:00
978ec1b5be Fix test 2016-05-02 17:06:51 +02:00
98b32cd9e2 Merge branch '1.5' into 2.0 2016-05-02 16:59:56 +02:00
d5a7561bc4 Merge branch 'master' into 1.5 2016-05-02 16:57:06 +02:00
c17e00204f Auto reconnect to docker if connection was closed
Fix #507
2016-05-02 16:55:05 +02:00
936faaba5a gns3z => gns3project 2016-05-02 10:33:04 +02:00
5c1522f24a Bump version to 1.5.0dev2 2016-04-28 23:47:17 -06:00
b92e64e507 pywin32 is not updated on pypi. 2016-04-28 16:21:14 -06:00
848120c354 1.4.7dev1 2016-04-28 18:38:11 +02:00
8a19afd618 1.4.6 2016-04-28 18:27:33 +02:00
815ef6066d Merge branch 'master' into 1.5 2016-04-28 16:52:29 +02:00
85f571ee8b Solve wintypes import 2016-04-28 16:35:58 +02:00
cf1b7ebe1f Raise error if qemu can not create backing image 2016-04-27 15:12:15 +02:00
4fc5364ab5 More robust save/restore for VirtualBox linked clone VM hard disks. 2016-04-26 15:44:11 -06:00
4a91d8a6a5 Prevent non linked cloned hard disks to be detached when using VirtualBox linked cloned VMs. Fixes #1184. 2016-04-26 15:06:22 -06:00
f98f6bf3ed Close doesn't exists when stopping the capture 2016-04-26 22:19:38 +02:00
b408f29726 Stricter checks to match VMware version to the right vmrun (VIX library) version.
Also checks the VIX library version when only using the GNS3 VM running in VMware.
2016-04-26 13:12:42 -06:00
92d1594afd Return link object when start capturing 2016-04-26 18:13:15 +02:00
76b2ca2bc0 Return the full path to the capture 2016-04-26 17:36:24 +02:00
264254e657 Captures written in the captures directory on the controller 2016-04-26 17:10:33 +02:00
9a1eeb57e9 Controll of the project directory in the controller 2016-04-26 14:34:49 +02:00
893b05d26b Removed unused code 2016-04-26 11:52:35 +02:00
bce439446e Merge branch '1.5' into 2.0 2016-04-26 11:50:41 +02:00
7390d833ba Merge branch 'master' into 2.0 2016-04-26 11:50:16 +02:00
1d08d4a5fa Merge branch 'master' into 1.5 2016-04-26 11:49:24 +02:00
8777e027b0 Merge branch '1.5' into 2.0 2016-04-26 11:48:43 +02:00
6d6e8196d2 Allow only .pcap to be downloaded from remote stream API
Fix #500
2016-04-26 09:52:18 +02:00
75196b8a55 Fix incrementation of qemu mac address
Fix #501
2016-04-25 16:36:20 +02:00
7ffdd0fab1 Fix broken connectivity between containers
Fix #502
2016-04-25 16:09:04 +02:00
1ce576c020 Stream pcap from compute to controller to client 2016-04-22 16:22:03 +02:00
48e71617d6 Store capture in a temporary directory on compute node 2016-04-21 17:27:49 +02:00
30f05c6190 Merge branch '1.5' into 2.0 2016-04-21 17:02:28 +02:00
637a7326ec Ignore captures during project export 2016-04-21 17:02:05 +02:00
4a99a172a3 Show on wich compute node a VM is running in the debug page 2016-04-21 16:18:15 +02:00
1a22fb9250 Expose the capture status in controller link API 2016-04-21 16:11:42 +02:00
549a6280c0 Data link type is on the capture not on the link 2016-04-21 13:49:29 +02:00
04a1b2df3b Method for start / stop capture on a link
Ref https://github.com/GNS3/gns3-gui/issues/1117
2016-04-21 12:14:09 +02:00
78a9785819 Missing qemu for VM creation via controller 2016-04-20 16:32:32 +02:00
ee0f1eb5fb Forward 503 error 2016-04-20 16:24:30 +02:00
f6593663b5 APi for listing VM in controller 2016-04-20 14:38:14 +02:00
c8c61f2ae8 Add endpoint to list the compute nodes 2016-04-19 16:53:41 +02:00
f5e5cf5059 Save the list of compute node
Fix #494
2016-04-19 15:35:50 +02:00
6463007ef1 Remove debug 2016-04-19 15:17:02 +02:00
d8005f6d4f Cleanup unused code 2016-04-19 11:51:02 +02:00
ce5461aee8 Raise error if we try to controll a non controller server
Fix #451
2016-04-19 10:47:53 +02:00
79427b35fa Start to update the doc 2016-04-18 21:15:24 +02:00
9349bdc916 Fix documentation 2016-04-18 20:55:22 +02:00
6b9e46950c Update VPCS and delete VPCS via controller 2016-04-18 18:56:03 +02:00
d7ed37ce02 Update and delete VM on controller 2016-04-18 17:36:38 +02:00
97aea5f82a Doc update 2016-04-18 16:58:06 +02:00
6c11ad5fa6 Reload VM 2016-04-18 16:57:02 +02:00
b01d974f91 Regenerate documentation 2016-04-18 16:49:36 +02:00
58d4a529d4 Rename hypervisor to compute
Fix #487
2016-04-15 17:59:59 +02:00
4afbf816ab Fix errors in remote install script 2016-04-14 16:20:13 +02:00
40aec61701 Ask user to reboot after the remote install script 2016-04-14 16:16:31 +02:00
3185baff0d Start / Stop / Suspend marche 2016-04-14 12:22:10 +02:00
2841b5769e Lock for controller or compute 2016-04-14 12:15:45 +02:00
7f77c66888 Support VMware VM in non standard location for fusion 2016-04-13 09:38:58 +02:00
2055cdea5e /start /stop and /suspend API for VM via container 2016-04-12 18:02:36 +02:00
ad7ca86f32 Fix 1.5 merge 2016-04-12 16:21:35 +02:00
183d02ded5 Restore qcow2 module 2016-04-12 16:17:06 +02:00
6b61811f9d Merge branch '1.5' into 2.0 2016-04-12 16:14:37 +02:00
b7a859fa30 Import / Export with images
Ref https://github.com/GNS3/gns3-gui/issues/1173
2016-04-12 10:11:45 +02:00
cd393491d5 At export use only relative image path
Fix https://github.com/GNS3/gns3-gui/issues/1176
2016-04-11 17:18:03 +02:00
f6d0971f15 Fix tests 2016-04-11 16:57:59 +02:00
9e8fcab65c Merge branch '1.5' into 2.0 2016-04-08 17:40:27 +02:00
ae5468a2d3 When starting docker raise proper error if ubridge is not available
Fix #484
2016-04-08 16:13:42 +02:00
ec6e5a6118 Do not send warnings back to the GUI when a console port not in range or is already taken. 2016-04-07 14:42:52 -06:00
f1737a6e43 Merge branch 'master' into 1.5 2016-04-07 14:44:56 +02:00
e3b95fe9ce Just log debug if docker link we try to destroy is already closed
Fix https://github.com/GNS3/gns3-gui/issues/1159
2016-04-07 14:33:21 +02:00
2109fd4f4d Test docker resolution 2016-04-07 14:33:04 +02:00
dff74352f7 Allow multiple user connected to the same VNC for docker 2016-04-07 14:24:53 +02:00
977ccabf98 Server support for VNC console resolution
Ref https://github.com/GNS3/gns3-gui/issues/1165
2016-04-07 13:29:11 +02:00
ad6fb664a2 Fix detection of EOF in Docker telnet console
Fix #476
2016-04-07 10:58:37 +02:00
6bc54b17c7 Merge pull request #481 from GNS3/import_linux
Flatten the project at export and support import for Linux
2016-04-06 11:55:46 -06:00
bb63f51f80 Merge pull request #478 from GNS3/qcow2_rebase
Qcow2 rebase
2016-04-06 11:55:06 -06:00
b335daf857 Cleanup 2016-04-06 18:27:30 +02:00
b93c85c390 Allow to change the number of adapters for Docker (server side) 2016-04-06 16:01:34 +02:00
cb197627b4 Fix an issue with VNC port range 2016-04-06 15:58:29 +02:00
9b9eddb30c Fix VNC broke after container update
Fix https://github.com/GNS3/gns3-gui/issues/1163
2016-04-06 14:57:52 +02:00
e564c84529 Flatten the project at export and support import for Linux
The client will send a flag to say if the import should be done
on the VM or not

Ref https://github.com/GNS3/gns3-gui/issues/1151
2016-04-06 12:08:00 +02:00
5531a576d1 Import create project if not exists (GNS3 VM just need an UUID) 2016-04-05 19:59:38 +02:00
a5b5f6c811 Merge pull request #477 from GNS3/32bitiou
Allow to add 32 bit repositories when they are not available on the system
2016-04-05 10:33:14 -06:00
9ed15e55af Move more import code to the server
https://github.com/GNS3/gns3-gui/issues/1156
2016-04-05 18:32:48 +02:00
f8ffd078a8 Last aiohttp version 2016-04-05 17:41:37 +02:00
2651a48102 Fix the docker aux port is lost after an update
Fix https://github.com/GNS3/gns3-gui/issues/1155
2016-04-05 16:33:40 +02:00
57394dfebf Rebase the qcow2 when starting the VM if needed
Ref #466
2016-04-05 12:41:26 +02:00
7422b31b2c Refactor code for avoid duplicate in disk management for Qemu 2016-04-05 12:35:07 +02:00
06b9e46cd2 Create Qcow2 class for reading Qcow2 and rebase it
Ref #466
2016-04-05 12:20:37 +02:00
dc236eba09 Allow to add 32 bit repositories when they are not available on the system 2016-04-05 10:28:32 +02:00
36dbcfa7f6 Do not block when ifup
-R --timeout=1 --tryagain=1 -b

Fix #469
2016-04-04 20:32:11 +02:00
6eca621b19 Clear warnings about using linked clones with VMware Player. 2016-04-04 12:10:48 -06:00
a046a4c980 Bump aiohttp to use the same version as 2.0 branch 2016-03-31 18:13:37 +02:00
34459f6a88 Fix log with recent aiohttp versions 2016-03-31 18:03:40 +02:00
e097a0e728 Fix Dynamips VM ignores changed console port
Fix #468
2016-03-31 10:06:38 +02:00
7b25ce04e8 Merge pull request #470 from GNS3/import_export
Import export API
2016-03-30 14:11:58 -06:00
3b04f556b3 In the export rename the .gns3 to project.gns3 2016-03-30 17:56:55 +02:00
bd71f0cf4c Import API 2016-03-30 17:42:00 +02:00
879591eaf5 Export API 2016-03-30 17:42:00 +02:00
f39af9deb7 Fix tests 2016-03-30 17:41:37 +02:00
ec044f9210 Merge pull request #467 from ehlers/docker-init-update
Minor cleanup on docker-init
2016-03-30 14:59:54 +02:00
498d006225 Minor cleanup on docker-init 2016-03-30 08:29:10 +00:00
c1193c23c1 Merge branch 'master' into 1.5 2016-03-29 09:20:43 +02:00
ba006f105f Alternative method to find the Documents folder on Windows. 2016-03-28 19:37:34 -06:00
fa58b1f81c Check for NPF service on Windows. 2016-03-25 19:53:36 -06:00
e167a81080 Merge pull request #462 from GNS3/remote_improved
Add IOU support and install config in /etc
2016-03-25 12:24:50 -06:00
9f05b80d01 Add IOU support and install config in /etc 2016-03-25 19:08:14 +01:00
58a360e535 Change server port in documentation. 2016-03-25 10:35:55 -06:00
d243cb7d02 New console port range 5000 to 10000. 2016-03-25 10:32:04 -06:00
c563dbba8a Change default port to 3080
Fix #487
2016-03-25 15:31:17 +01:00
5345fe8490 Minor code cleanup 2016-03-25 15:27:31 +01:00
2a20333877 Merge pull request #461 from GNS3/ehlers-docker-init
Support /etc/network/interfaces
2016-03-25 11:34:05 +01:00
2e455037e1 Fix crash when you start twice the same container 2016-03-24 18:35:15 +01:00
23c48f5e3d Add to project an API to write a file 2016-03-24 17:34:41 +01:00
e6ddce86b3 Docker init supports /etc/network/interfaces
* Generate an /etc/network/interfaces
* Use busybox also for aux console

Ref #460
2016-03-24 17:10:53 +01:00
268c61ce80 Merge branch 'docker-init' of https://github.com/ehlers/gns3-server into ehlers-docker-init 2016-03-24 16:11:20 +01:00
2fcada49d4 2.0.0dev1 2016-03-24 10:38:57 +01:00
40f496c7e9 Merge branch '1.5' into 2.0 2016-03-24 10:11:58 +01:00
d2c32bb570 Merge branch 'master' into 1.5 2016-03-24 09:17:52 +01:00
3fe8016938 1.4.6 dev1 2016-03-23 18:14:04 +01:00
01dbaea2e4 1.4.5 2016-03-23 18:11:48 +01:00
427cb05c2a Stop the VMware VM if there is an error while setting up the network connections or console. 2016-03-23 10:54:45 -06:00
d36a9f3403 docker-init: add DHCP support 2016-03-23 09:13:07 +00:00
39c41336db Merge pull request #459 from GNS3/remote_install
Remote install on 14.04 ubuntu
2016-03-22 15:08:15 -06:00
fa22e19321 Bump version to 1.4.5dev2 2016-03-22 14:43:47 -06:00
d472f47829 docker-init: static busybox, support for /etc/network/interfaces 2016-03-22 15:28:56 +00:00
dcc4ddf11b Add a test for \r\n
Fix #458
2016-03-21 16:54:03 +01:00
e35ab1e8c0 Remote install on 14.04 ubuntu 2016-03-21 14:52:42 +01:00
975e1c8fa7 Fixes dev syntax bug. 2016-03-20 11:32:40 -06:00
19b46a4014 Include VMware VMs paths found preferences.ini 2016-03-19 15:41:26 -06:00
7cdf23f497 Allow to stop a VMware VM from GNS3 even if halted within the VM. Fixes #1118. 2016-03-19 12:08:44 -06:00
06da40cdcd Keep Dynamips stdout log file in the project directory. 2016-03-19 11:32:15 -06:00
bc14d5d78e Notif forwarded from hypervisor to controller 2016-03-18 16:56:23 +01:00
de61ed316c The controller has a streaming API
Now we need to link the hypervisor to the controller.
2016-03-17 17:32:37 +01:00
76a0120d3e PEP8 2016-03-17 15:16:09 +01:00
b55969d381 Notification feed for the hypervisor 2016-03-17 15:15:30 +01:00
d81fc25b27 Fix a merge error 2016-03-16 16:40:12 +01:00
dd2fdcc574 Merge branch '1.5' into networkv2 2016-03-16 16:35:23 +01:00
174e7cccea Merge branch 'master' into 1.5 2016-03-16 16:35:03 +01:00
75212cda3f Improve tests on Travis 2016-03-16 16:34:36 +01:00
aa6c44a470 Fix crash when a n hypervisor return no body 2016-03-16 16:10:06 +01:00
757ee34dac Support auth for network V2 hypervisors 2016-03-16 15:55:07 +01:00
c0e452133d Web interface for debbuging controller 2016-03-15 11:32:10 +01:00
7a095478fe Success to add a dynamips with apiv2 2016-03-15 10:45:05 +01:00
a018c5b0f5 Get MAC addresses for host interfaces to use for filtering frames from vmnet interfaces. 2016-03-14 18:27:51 -06:00
8fed1d9b9f API for deleting a link 2016-03-14 20:54:05 +01:00
ed291da566 Rebuild doc 2016-03-14 20:37:07 +01:00
9062490be3 API for deleting a list 2016-03-14 17:40:27 +01:00
9771b33b68 Create link using UDP work 2016-03-14 16:51:47 +01:00
93e2d4096d Dynamips uuid hypervisor command is no longer supported. 2016-03-12 22:15:36 -07:00
c077f3b990 Restart NPF service after adding vmnet adapters on Windows. 2016-03-12 11:04:50 -07:00
8cb5a6ec75 Typo 2016-03-11 20:34:01 +01:00
17c5d3048c Cleanup 2016-03-11 20:15:02 +01:00
65099b9364 Link API should work now need to implement the client 2016-03-11 20:13:52 +01:00
6a19e4d822 Rebuild link sample 2016-03-11 17:20:09 +01:00
8c1560332e Remove /controller from the api endpoint 2016-03-11 17:16:09 +01:00
e3580d52c3 Dummy link api documentation 2016-03-11 17:02:50 +01:00
abdda4d3b3 Link API (do nothing for the moment) 2016-03-11 16:51:35 +01:00
6fad82c61d Rebuild documentation 2016-03-11 15:49:28 +01:00
69bf8bbb4e Fix doc generation 2016-03-11 15:39:42 +01:00
a0ef68c1a3 Update glossary 2016-03-11 15:24:48 +01:00
7d0b780dcc Documentation 2016-03-11 15:21:21 +01:00
be4aa41dda Create VPCS VM on controller 2016-03-11 15:06:14 +01:00
4326d412f9 API for creating a VM 2016-03-10 21:51:29 +01:00
65de1b7b5e Default arg for post in controllers 2016-03-10 10:57:14 +01:00
58f1abff35 Close, commit and delete supported for projects in controller 2016-03-10 10:32:07 +01:00
3296b97f59 Rename modules => hypervisor 2016-03-08 16:12:46 +01:00
6fa2491255 Rename /controller/servers to /controller/hypervisors 2016-03-08 16:04:12 +01:00
8114c1d4be Return just version number for API /v1/version for compatibility 2016-03-07 18:17:24 +01:00
b2ce7ee8d7 API V2 2016-03-07 17:57:12 +01:00
664cec97ba Create /hypervisor and /controller namespace 2016-03-07 15:01:35 +01:00
e4b12f49d1 Build doc support controller 2016-03-04 17:50:17 +01:00
0921df520c Return controller version as server version (temporary) 2016-03-04 16:58:53 +01:00
0532b4de8a Fix logging issues with the controller 2016-03-04 16:55:59 +01:00
4d77b2918e Raise an error if server flagged as local but should not
If the controller is not started with --local but the server ID
is local it's raise an error.
2016-03-04 16:11:31 +01:00
60e9241857 Merge branch 'ehlers-docker-init' into 1.5 2016-03-04 09:09:09 +01:00
ee4b094160 Fix tests on @ehlers Docker init patch 2016-03-04 09:08:40 +01:00
aad69e9650 Create a /server API for register servers
This allow to push to the controller information about
the connection to a server.
2016-03-03 16:05:09 +01:00
1dd437ecdc updated docker command line processing 2016-03-03 09:12:36 +01:00
84eb8356e8 Create a container class and a flag for enable it from command line
Ref #417
2016-03-02 09:49:52 +01:00
c833a20a8c Fix Deleting a docker VM gives console error message "Not connected"
Fix #446
2016-03-01 20:25:50 +01:00
eae6f33e29 Inject an init script
It's very basic for the moment

Ref #1089
2016-03-01 18:38:03 +01:00
59c1e125d3 Change the name of veth to avoid bugs :(
Fun stuff the name create different behavior with
network manager.

Ref #440
2016-03-01 15:33:30 +01:00
7469f65fa0 Add setter for allocate_aux 2016-03-01 15:33:07 +01:00
392fa187c2 Expose the allocate_aux setting 2016-03-01 15:01:45 +01:00
dab1b26569 Aux console for Docker
Fix https://github.com/GNS3/gns3-gui/issues/1039
2016-03-01 14:53:43 +01:00
03ffce0a75 Docker VNC support
Ref https://github.com/GNS3/gns3-gui/issues/947
2016-02-29 23:09:47 +01:00
9d28f4c0c3 Refactor aux port allocation
This move the allocation of aux port to the base vm.
Also now the free of console port during the close is in the
base VM.

An aux port is allocated to the docker container but not used
for the moment.

Ref https://github.com/GNS3/gns3-gui/issues/1039
2016-02-29 10:44:08 +01:00
04b02171bb Support /etc/gns3/gns3_server.conf for the config
It's better for a server deployment
2016-02-25 15:07:55 +01:00
e91e3525c4 Improve warning if fusion is not installed or in non standard location
For the moment I don't see a good reason to not installating fusion
in the standard location.  If check in Docker Machine code they don't
support it. And with their large user base we can think it's safe.

Fix #435
2016-02-25 12:15:38 +01:00
c333e9451f Fix pull of images
Fix #445
2016-02-24 17:08:28 +01:00
49f1931e95 Merge branch 'master' into 1.5 2016-02-24 15:52:27 +01:00
ebb8c0d0b0 Increase test timeout to avoid random problems on travis 2016-02-24 15:51:51 +01:00
2d42f32d71 Restart the container if running and you change the hostname
Fix #439
2016-02-24 15:47:53 +01:00
fd18458588 Fix stop capture for Docker
Fix #443, #442
2016-02-24 15:14:01 +01:00
5f15667ad1 Rename invalid variable iou_manager in Docker 2016-02-24 15:08:48 +01:00
bbdbc971c0 Fix Exception on removal of Docker VM
Fix #441
2016-02-24 15:04:45 +01:00
057b637961 Set the hostname for docker containers
Fix #437
2016-02-23 19:22:35 +01:00
87eef545e1 Correctly close the telnet connection for docker
Fix #427
2016-02-23 16:54:12 +01:00
38815b3eaf Merge branch 'master' into 1.5 2016-02-23 15:42:58 +01:00
4c4613b29b 1.4.5dev1 2016-02-23 15:41:45 +01:00
9d8cb4521d 1.4.4 2016-02-23 14:38:26 +01:00
9dd09ccde1 1.4.4dev4 2016-02-22 13:06:56 +01:00
86ebb9b840 1.4.4dev3 2016-02-22 11:20:10 +01:00
569da0ce3a Bump version to 1.4.4dev2 2016-02-20 18:41:38 -07:00
f73b288a28 Check if VMware Fusion is correctly installed when retrieving the VM list. 2016-02-20 10:59:06 -07:00
e34c266ee1 1.4.4dev1 2016-02-19 16:02:51 -07:00
80e15c86dc 1.4.3 2016-02-19 14:17:54 -07:00
f35c742b07 Avoid consuming 100% of CPU when stopping docker container
Fix #427
2016-02-19 17:53:17 +01:00
f4f9e6eba6 Fix Docker has returned an error: 500 b'No command specified'
Fix #433
2016-02-19 17:01:28 +01:00
90109e04aa 1.4.3dev1 2016-02-18 17:46:38 +01:00
c36de3393d 1.4.3dev1 2016-02-17 19:40:23 +01:00
976154fd0b 1.4.2 2016-02-17 19:38:34 +01:00
7aedfc92fa Fix test 2016-02-17 10:37:22 +01:00
9b1d513b03 Merge branch 'master' into 1.5 2016-02-16 19:07:17 +01:00
836023a1bc Fix Docker error when deleting a running container
Fix #431
2016-02-16 17:42:35 +01:00
93020a940f Fix Docker Server error: Not connected when deleting a node
Fix #430
2016-02-16 17:36:32 +01:00
c2b78400f2 Fix closing a docker console jump to 100% of CPU usage
Fix #427
2016-02-16 17:26:53 +01:00
1123047404 Catch 404 docker errors when GNS3 force close
Fix #1029
2016-02-12 16:48:19 +01:00
01e2fcf225 Fix docker console port lost during update
Fix https://github.com/GNS3/gns3-gui/issues/1026
2016-02-12 16:38:16 +01:00
85b9620953 Fix error when a container has no volumes 2016-02-12 16:25:43 +01:00
1532b3ed9b Support for mounting volumes
Fix #425
2016-02-12 11:57:56 +01:00
a581eeba54 Check docker minimum API version
Fix #423
2016-02-11 16:01:47 +01:00
9b0088728f Catch docker namespace error
Fix #424
2016-02-11 15:49:28 +01:00
dea68bcb28 Fix missing format in IOU export 2016-02-11 09:15:48 +01:00
1fb4d191c9 Fix number of arguments to the UDP errors on VBOX 2016-02-11 09:02:38 +01:00
167a0b8435 Add verification when UDP tunnel is created in a VirtualBox VM. Ref #899. 2016-02-10 19:08:34 -07:00
5842487cd0 Fixes VMware linked clone cleanup bug. Fixes #420. 2016-02-10 11:26:40 -07:00
1995adf838 Fix Update a docker container is broken and raise a 400
Fix #403
2016-02-10 18:20:15 +01:00
5a8408cdb9 Fix a crash in Travis tests
Fix #422
2016-02-10 17:14:14 +01:00
a7ec224b6d Docker capture and refactor common capture code
Fix https://github.com/GNS3/gns3-gui/issues/891
2016-02-09 16:07:33 +01:00
89e86b7778 Create veth for docker even if link is not connected
Fix #406
2016-02-09 14:22:37 +01:00
56658756e2 Merge branch 'master' into 1.5 2016-02-08 13:40:49 +01:00
942d07c8ce Removed docker support from 1.4 (drop unused code) 2016-02-08 13:40:14 +01:00
f6fb0623be Merge branch 'master' into 1.5 2016-02-08 13:14:30 +01:00
3fc64bced2 Fix a crash if you create a file named IOS in the image dir
Fix #419
2016-02-05 10:29:27 +01:00
373113545f Code cleanup 2016-02-05 10:07:13 +01:00
5bee927481 Disallow creating project with " in the path
It's not supported by dynamips.

Fix https://github.com/GNS3/gns3-gui/issues/987
2016-02-04 11:47:48 +01:00
4f61443b20 Always look at the registry to find vmrun.exe on Windows. 2016-02-03 19:08:41 -07:00
4673424da7 Check for VMware VIX library version. Fixes #413. 2016-02-03 18:15:33 -07:00
40261ec99c Fixes VDE not working #345. 2016-02-03 16:26:15 -07:00
3e4423f663 Merge pull request #418 from GNS3/no_spice
Do not list qemu binary with -spice in the name
2016-02-03 13:45:03 -08:00
88e8c36d1c Merge pull request #416 from GNS3/command_line
Send command line used to start the VM to client
2016-02-03 11:10:37 -08:00
537122daba Do not list qemu binary with -spice in the name
It's create confusion and you can enable spice with the -spice
options.

Fix https://github.com/GNS3/gns3-gui/issues/981
2016-02-03 16:40:39 +01:00
fd22cd8361 Send command line used to start the VM to client
Add a command_line attribute to the VM object with
the command line used to start the VM.

Now /start return the object in order to get
this new attribute. And the HTTP status code
is 200 instead of 204 because 204 disallow body.

Support:
* Qemu
* Dynamips
* IOU

Ref https://github.com/GNS3/gns3-gui/issues/513
2016-02-02 18:25:17 +01:00
71c3bda0a5 Fix crash if you have a { in your user name
Fix #414
2016-02-02 10:05:08 +01:00
53d60bc71a 1.4.2dev1 2016-02-01 17:48:10 +01:00
ce7ac0505a 1.4.1 2016-02-01 17:46:05 +01:00
4a3322b822 Add HTTP status to docker error 2016-02-01 17:42:32 +01:00
98537a242a Drop duplicate code when ubridge is too old
Fix #405
2016-02-01 16:05:37 +01:00
03414993dc Merge branch 'master' into 1.5 2016-02-01 15:47:46 +01:00
bf316f35cc VMware raise error if version is not found
Fix #972
2016-02-01 14:26:55 +01:00
29089f1884 Cleanup an old kvm-ok test 2016-01-28 17:54:29 +01:00
889ea14973 For topologies before 1.4 manage qemu missing
If qemu is missing for topologies before 1.4 we try
to search it in the path.

Ref #921
2016-01-28 16:24:24 +01:00
2e05290206 Fixes issue with packet capture on VMware VMs. Fixes #396. 2016-01-26 14:45:55 -07:00
39ddc4e8c1 Fixes concurrency issue when closing multiple VMware linked clone VMs. Fixes #410. 2016-01-26 14:23:01 -07:00
a279bfe1d9 Fixes "can only use tap interfaces that both already exist and are up". Fixes #399. 2016-01-26 13:48:58 -07:00
35e045a22e Merge pull request #412 from GNS3/stats_stream
Send machine stats via the notification stream
2016-01-26 08:52:16 -08:00
58b998600e Send machine stats via the notification stream
Fix #252
2016-01-26 16:35:00 +01:00
119a2a3b66 Add test for unicode char in images path
Ref #401
2016-01-26 15:32:40 +01:00
ee2104ba35 Check for /dev/kvm instead of kvm-ok
Fix #411
2016-01-26 13:58:29 +01:00
425a05ecd8 Bump to 1.4.1dev2 2016-01-26 13:50:13 +01:00
cd9cb3eb6a Merge pull request #408 from GNS3/asa8_warning
Show a warning when starting ASA8
2016-01-22 10:53:19 -08:00
5617ddc4cc Show a warning when starting ASA8 2016-01-22 19:46:05 +01:00
179372936e Raise error if ubridge is missing 2016-01-22 10:07:55 +01:00
5deb584a03 Fix bug when reading docker images
Fix #398
2016-01-21 18:03:51 +01:00
c280fd5fb8 Merge branch 'master' into 1.5 2016-01-20 17:10:59 +01:00
e9c2a76f43 Fix error when setting Qemu VM boot to 'cd' (HDD or CD/DVD-ROM)
Fix #400
2016-01-20 13:19:33 +01:00
65a05791ce Merge pull request #394 from boenrobot/vmware_VMsFolder_fix
VMware default VM location
2016-01-19 19:02:06 -08:00
a9eae691f6 Fixed the VMware default VM location on Windows, so that it doesn't assume the "Documents" folder is within the %USERPROFILE% folder, and also support Windows Server's folder (which is "My Virtual Machines" instead of "Virtual Machines"). 2016-01-18 00:48:24 +02:00
0a4a01fed0 Merge pull request #393 from GNS3/avoid_losing_config
Improve dynamips startup_config dump
2016-01-17 09:45:00 -08:00
2938b97bd4 Improve dynamips startup_config dump
Two change:
1) Dump the config when you stop the node. This avoid scenar
2) Disallow empty startup config. If it's empty send ! it's
avoid dynamips crash

Fix #914
2016-01-15 18:02:52 +01:00
f83e878d89 Dump environnement to server debug log
Ref https://github.com/GNS3/gns3-gui/issues/921
2016-01-15 10:11:32 +01:00
8225bad76b Fix usage of qemu 0.10 on Windows
Fix #392
2016-01-14 17:40:58 +01:00
ba4128f57b Show hostname when the hostname is missing in the iourc.txt 2016-01-13 16:37:50 +01:00
bc3016eec5 Merge branch '1.4' 2016-01-13 11:39:00 +01:00
a8c03f754b 1.4.1dev1 2016-01-13 09:22:28 +01:00
e3beea0378 1.4.0 2016-01-12 17:40:47 +01:00
5db1f6b2f7 Fix a test related to docker 2016-01-11 19:14:45 +01:00
f92ac6e52e Fix a crash when docker is not available 2016-01-11 19:11:25 +01:00
758fb2a0e7 adapter_remove_nio_binding is a coroutine for all device type
It's cleaner
2016-01-11 15:19:15 +01:00
5a28b9409a Fix Crash at startup when docker is not installed
Fix #384
2016-01-06 15:13:22 +01:00
1f756c0d4f Merge branch '1.4' into 1.5 2016-01-06 14:35:48 +01:00
bcd9851eee 1.4.0dev14 2016-01-06 14:32:39 +01:00
e599c28c1c 1.4.0rc3 2016-01-05 18:43:58 +01:00
afb5b6d6e8 API documentation update 2016-01-04 17:04:15 +01:00
e73f81c9a3 Merge pull request #388 from GNS3/boenrobot-addCapabilities
Add  qemu capabilities
2016-01-04 16:34:33 +01:00
d184b65800 Improve PR #386
* Add more test
* Check to kvmi-ok is asynchronous
2016-01-04 16:30:06 +01:00
fba049767a Merge branch 'addCapabilities' of https://github.com/boenrobot/gns3-server into boenrobot-addCapabilities 2016-01-04 12:09:44 +01:00
fab8b3f46f Fix race condition when killing iouyap
Fix #387
2016-01-04 10:42:46 +01:00
439a0c80d6 Another fix for docker tests 2016-01-04 09:36:24 +01:00
fd0fb97204 Fix test 2016-01-04 09:28:12 +01:00
884bfa4724 Merge branch '1.4' into 1.5 2016-01-04 09:21:14 +01:00
794a7e880a Dependencies are listed in one location now. 2016-01-03 14:09:01 -07:00
137cf59e97 Catch exception if we can't change process priority on Windows
Fix #380
2016-01-03 21:24:18 +01:00
d00efbfb0f Adds a handler for getting the Qemu related capabilities of the server. Currently includes just a check for KVM architectures. 2016-01-03 19:38:16 +02:00
de0df70933 Drop docker-py dependencies 2016-01-01 23:35:06 +01:00
0f868ef107 Fixes aiohttp 0.19.0 requirement. Fixes #383. 2016-01-01 15:21:41 -07:00
061a6e3b25 Merge pull request #385 from boenrobot/qemuHdbInterfaceFix
Fixed showing of Qemu hdb_disk_interface
2016-01-01 13:17:19 -08:00
a4d9f95c9b Fixed showing of Qemu hdb_disk_interface - it showed hda_disk_interface instead, which resulted in an odd visual glitch in the GUI. 2016-01-01 02:44:23 +02:00
061b459abe Prevent error when quick close of gns3 server after docker usage
Fix #382
2015-12-29 12:40:22 +01:00
38622c4da3 Merge pull request #381 from boenrobot/noCwdBat
CWD independance
2015-12-24 14:56:45 -08:00
8cf55166cb Merge pull request #379 from GNS3/docker_cleanup
Docker cleanup and improvements
2015-12-24 14:56:24 -08:00
e5e96ee8b4 Made the gns3server.bat successfully start the server independent of the CWD at the time of running. It's now relative to the location of the .bat file itself. 2015-12-24 16:45:02 +02:00
8de90d8236 Ubridge 0.9.3 is require 2015-12-22 17:33:47 +01:00
7e196cabc1 Merge branch '1.4' into 1.5 2015-12-22 17:33:18 +01:00
31046358cc Add more informations in the debug status page
* Number of VM in a project
* Number of client connected
2015-12-22 15:19:38 +01:00
a0987bbc92 Fix status link in GNS3 homepage 2015-12-22 14:58:51 +01:00
61cf91d83c Fix tests on Windows
Fix #377
2015-12-22 13:16:30 +01:00
28533cfdac Cleanup 2015-12-22 12:51:43 +01:00
16b4d60151 New crash report key 2015-12-21 20:50:37 +01:00
095ef7994a Support building any branch 2015-12-21 11:35:29 +01:00
8312a54615 Fix missing boot priority order 2015-12-21 10:17:22 +01:00
33edbefa3b Docker cleanup and improvements 2015-12-18 18:20:56 +01:00
6a808927d2 1.5.0dev1 2015-12-18 18:15:56 +01:00
286cd7a3ac A debug status page embed in the server 2015-12-18 14:38:26 +01:00
c2d313f5a7 Lock py.test versions 2015-12-16 14:58:16 +01:00
48678506f7 Ignore py.test .cache directory 2015-12-16 14:48:03 +01:00
7ce17cc48f Install dependencies before setup.py install
This fix issues with aiohttp recent versions not supported
on Python 3.4.0
2015-12-16 14:46:26 +01:00
480ca037cd Fix test on Windows
Sadly python crash on my Windows and I can't run the full test
suite.

Fix #377
2015-12-14 16:06:51 +01:00
ad4501838b Merge branch 'master' into unstable 2015-12-11 14:35:08 +01:00
ce5a29b29a 1.4.0dev13 2015-12-11 14:34:13 +01:00
a2f0745e81 1.3.14dev1 2015-12-11 14:33:37 +01:00
38745be5fe 1.3.13 2015-12-11 09:21:20 +01:00
a827f6b2de 1.3.12 2015-12-11 09:18:27 +01:00
55034dd24f Update links for new website. 2015-12-10 15:00:16 -07:00
55dc0d587d 1.4.0rc2 2015-12-10 19:41:28 +01:00
a9e1801e7d Merge pull request #374 from GNS3/patch_used_port
Replace by another TCP port if port is already used
2015-12-09 21:24:04 -08:00
1e97a544e6 1.4.0dev12 2015-12-08 16:27:37 +01:00
7dfb386a66 Add log about wher iou capture packet 2015-12-08 16:11:40 +01:00
2aaad4749b Replace by another TCP port if port is already used
Another version of #370

This time we replace a free TCP port if port is used and raise
a warning to the user.
2015-12-07 12:26:46 +01:00
f3b71dcdef Fix ProcessLookupError in Qemu
Fix #373
2015-12-07 10:50:34 +01:00
a67b218bde Increase vmrun timeout to 120 seconds. Ref #360. 2015-12-05 18:37:34 -07:00
1071b6366f Fixes termination notification to indicate the right process name (IOU vs iouyap). Ref #359. 2015-12-05 18:24:08 -07:00
19d5c1c05b Fixes error with non initialized uBridge. Fixes #367. 2015-12-05 17:36:55 -07:00
a6826fe0bf Remove debug that can crash qemu
Fix #365
2015-12-01 19:30:39 +01:00
42a4df5079 Support VM usage for qemu
Ref https://github.com/GNS3/gns3-gui/issues/829
2015-12-01 10:54:51 +01:00
e626c0b55c Raise an error if psutil version is invalid
Fix #361
2015-12-01 09:42:36 +01:00
02cabfbffa Contributing instructions 2015-11-30 14:15:54 +01:00
535afdba5e 1.4.0rc1 2015-11-12 17:52:15 +01:00
5b347fe48f Raise error if server received windows path 2015-11-12 15:38:47 +01:00
58e7fa2f01 Update sentry key
Fix #357
2015-11-12 11:25:23 +01:00
c7cc155b78 Merge branch 'master' into unstable 2015-11-12 10:55:19 +01:00
11cf2294da Remove NIO FIFO and Mcast (unused). Fixes #348. 2015-11-11 16:20:28 -07:00
3f4da9050c Support VPCS 0.6.1 2015-11-11 21:57:58 +01:00
63edcc1c34 Fix duplicate of -no-kvm options
Fix #356
2015-11-10 16:25:02 +01:00
caade47e16 Fix tests about images paths security 2015-11-10 15:21:10 +01:00
390c88d7cd Raise an error if user send a non local path to remote server 2015-11-09 19:02:10 +01:00
669295131b Fix qemu tests on Linux 2015-11-09 15:01:02 +01:00
ab4c8665e4 Fix backup projects and a qemu broken tests 2015-11-09 14:17:19 +01:00
ac16ee5bc6 Fix minor issues 2015-11-09 12:32:36 +01:00
da240f21ba Apply pep8 fix 2015-11-09 12:28:00 +01:00
f01a6dcaaf Fix qemu tests 2015-11-09 12:23:50 +01:00
1248584841 Cleanup unused and duplicates 2015-11-09 12:14:25 +01:00
58d2a5d4b0 Support VPCS 0.6.1
Fix #347
2015-11-09 10:26:16 +01:00
bd47c21514 Sets console end port to 7000. Fixes #343. 2015-11-08 18:14:55 -07:00
c3e99bfc1d Drop netifaces (replaced by psutil). Fixes #344. 2015-11-08 13:34:27 -07:00
9ca72f3bbc Correctly display log messages. 2015-11-08 12:01:25 -07:00
e4735308f8 Merge remote-tracking branch 'origin/master' 2015-11-07 12:18:05 -07:00
13a3e8f324 Tentative fix for "WinError 64 The specified network name is no longer available" issues. 2015-11-07 12:17:53 -07:00
6fbc84c0dc Return relative path for dynamips images
Fix https://github.com/GNS3/gns3-gui/issues/775
2015-11-05 16:47:37 +01:00
7ee12edb5c Fix add existing IOS not working
Fix https://github.com/GNS3/gns3-gui/issues/775
2015-11-05 16:28:11 +01:00
7e7c8a5450 Correctly enable faulthandler for dev version 2015-11-05 10:50:37 +01:00
d9f94e653b Allow vpcs 0.8b 2015-11-04 14:37:27 +01:00
f1e9262c94 Avoid test crash if GNS3 is running on the same computer 2015-11-03 21:06:30 +01:00
12f027a882 Allow to return an empty project name because it's allowed in creation 2015-11-03 17:11:58 +01:00
7967a922bc Merge branch 'master' into unstable 2015-11-03 12:39:01 +01:00
bd54c55ae1 Fix minor errors reported by codacy.com 2015-11-03 12:34:22 +01:00
a9d0951bb6 Test with python 3.5 2015-11-03 10:59:03 +01:00
ef5ce99125 1.4.0dev11 2015-11-02 21:30:22 +01:00
f313ac10c3 1.4.0b5 2015-11-02 10:55:32 -07:00
69c38c6414 Use pytest 2.8 so it's work with Python 3.5 without warning 2015-11-02 16:35:12 +01:00
82540e5366 Fixes wait for named pipe creation. 2015-11-01 20:52:07 -07:00
32f9baf682 Fixes Windows named pipe issue. Fixes #340. 2015-11-01 18:51:12 -07:00
a961387af9 Add doc on how to got code coverage 2015-10-31 21:27:10 +01:00
6edb41ded7 Merge branch 'master' into unstable 2015-10-30 15:17:17 +01:00
42c8fb7c29 Raise an error when you use a port outside the ranges
Fix #739
2015-10-30 15:15:28 +01:00
c2a08a391c Fix crash in IOU config export
Fix #335
2015-10-21 14:28:39 +02:00
7d82a77ba7 Freeze requirements for aiohttp because 0.18 doesn't support Python
3.4.0
2015-10-20 08:39:15 +02:00
db2aa56e98 1.4.0dev10 2015-10-19 19:13:58 +02:00
d5dba699c5 1.4.0b4 2015-10-19 11:09:18 -06:00
ce4727e51a Support for modifications to a base Qemu VM (not a linked clone). 2015-10-18 19:19:27 -06:00
2fbc391319 Force canceling all task when shutdown server
https://bugs.python.org/issue24080

Fix #705
2015-10-16 20:42:13 +02:00
d979f08c93 Update api documentation 2015-10-16 19:05:29 +02:00
504a4af4ab Enforce console port for VNC
Ref https://github.com/GNS3/gns3-gui/issues/721
2015-10-16 18:16:07 +02:00
6e36687347 Fixes issue when loading a project using VMware vmnet interfaces. Fixes #319. 2015-10-14 21:39:17 -06:00
57bbd63085 Support for NAT connection with cloud for VMware VMs. Fixes #322. 2015-10-12 17:07:39 -06:00
b53f0e89ce Change message when VMware is not installed on Linux. Ref #326. 2015-10-12 16:27:31 -06:00
ac75977ae0 Send a warning notification if there is not enough RAM left to start a VM. Implements #329. 2015-10-12 15:57:37 -06:00
c700804014 Merge branch 'master' into unstable 2015-10-12 17:09:33 +02:00
91c2bd7e98 Asyncio qemu fix and raise error if coroutine not used 2015-10-12 17:06:50 +02:00
0a536278fc Fix asyncio error when closing the app
Fix #310, https://github.com/GNS3/gns3-gui/issues/705
2015-10-12 16:16:44 +02:00
5cb2b33a99 Removes VMware lock check. Fixes #328. 2015-10-11 16:41:55 -06:00
133b01b2a6 Merge remote-tracking branch 'origin/unstable' into unstable 2015-10-11 15:51:05 -06:00
ee6ef9f3d5 Wait for pipe file to be created before starting the remote console for VMware and VirtualBox VMs. Fixes #331. 2015-10-11 15:50:50 -06:00
ccd45c2f45 Merge branch 'master' into unstable 2015-10-08 11:30:16 +02:00
a6286db7b1 Release UDP ports when closing a Qemu VM. Fixes #323. 2015-10-07 20:48:36 -06:00
6cd790880c 1.3.12dev1 2015-10-07 18:26:18 +02:00
b19bfa0270 1.3.11 release 2015-10-07 18:24:03 +02:00
9c23093510 Merge branch 'master' into unstable 2015-10-07 16:44:50 +02:00
98ac295e2e Escape other usage of glob
Fix #332
2015-10-07 16:42:34 +02:00
c50c735e86 Merge branch 'master' into unstable 2015-10-07 13:51:28 +02:00
acd5c992ba Fix Dynamips identifier is already used by another router
Fix #327
2015-10-07 13:50:40 +02:00
9b740e85d0 Fix Dynamips identifier is already used by another router
Fix #327
2015-10-07 11:34:27 +02:00
da7f910482 glob.escape is available with Python 3.4 2015-10-07 10:27:42 +02:00
4c13f8e6ea Merge branch 'master' into unstable 2015-10-07 10:27:06 +02:00
4232ea8a00 Protect dynamips against bad glob
Fix #332
2015-10-07 10:26:37 +02:00
ec7a9615ac Fix issue with Qemu networking following merge 2015-10-07 09:01:17 +02:00
5e3ce48a52 Merge branch 'master' into unstable 2015-10-06 19:19:56 +02:00
3d7d8682ee OVA file support 2015-10-06 17:50:54 +02:00
034ac392b7 Support listing images in subdirectories
It's a part of the OVA support:
https://github.com/GNS3/gns3-gui/issues/700
2015-10-05 11:07:15 +02:00
bfe9c117ba Fix tests 2015-10-05 09:14:55 +02:00
fc5afa6676 Catch ProcessLookupError in Qemu VM. 2015-10-04 14:20:44 -06:00
3f86df5169 Fixes uncalled coroutine. 2015-10-04 07:00:47 -06:00
970f22a83e Use the correct UDP tunnel Qemu syntax for version > 1.1.0 when legacy networking is enabled. 2015-10-04 06:41:39 -06:00
dd7f6eb021 Fix crash 2015-10-02 15:04:42 +02:00
d19b3f15ed VMware player linux support
Fix #326
2015-10-02 11:04:54 +02:00
80d99ec395 Fixes some minor issues. 2015-09-29 14:15:01 -06:00
8560521028 Merge remote-tracking branch 'origin/master' 2015-09-29 06:58:33 -06:00
e63e3280a1 Prevent launching a packet capture with a non-ASCII path when using Dynamips. 2015-09-29 06:56:01 -06:00
9737783eb6 Do not require a TAP interface to already exist. Fixes #321. 2015-09-26 10:09:50 -06:00
09aa31fb43 Do not automatically delete Dynamips bootflash file because they are necessary to restore VLANs on the c3600 platform. 2015-09-23 13:42:37 +02:00
d01a8bfb34 Bump version to 1.4.0.dev9 2015-09-22 16:07:21 -06:00
6ca0154435 Prepare 1.4.0b3 2015-09-22 17:37:44 +02:00
e7ea9e8047 Merge branch 'master' into unstable 2015-09-22 14:40:13 +02:00
bfe3b12342 Fix dynamips configuration lost when you delete a node
Fix #316
2015-09-22 14:39:21 +02:00
bf0813b4b9 Merge branch 'master' into unstable 2015-09-22 13:46:08 +02:00
c43960fbfd Clarify error message when we got UTF-8 chars in the iourc file
Fix #307
2015-09-22 13:45:10 +02:00
6a6beb752a Merge remote-tracking branch 'origin/master' into unstable 2015-09-22 11:03:41 +02:00
2c3d7510be Fixes version mismatch issue. 2015-09-20 13:28:37 -06:00
5bcabc705f Use custom VMnet interfaces without host adapter when uBridge is not used. Fixes #673. 2015-09-20 13:19:57 -06:00
c5ce6af872 Bump version to 1.4.0dev8 2015-09-18 15:41:34 -06:00
b90df5806d Automatically add the -no-kvm option if -icount is detected to help with the migration of ASA VMs created before version 1.4 2015-09-18 15:40:56 -06:00
a016c458a6 1.4.0 beta2 2015-09-17 16:46:22 +02:00
b1f3210a4c Fix a crash at vmware stop
Fix https://github.com/GNS3/gns3-gui/issues/665
2015-09-17 15:51:46 +02:00
bb080fa96a Fix a crash when starting a VMware vm
Fix #314
2015-09-17 15:46:06 +02:00
e236f63162 Add how to add vmnet interfaces explantion in the error message 2015-09-17 15:18:55 +02:00
3e71529702 Fix path of VMinventory for fusion
Fix #313
2015-09-17 11:04:24 +02:00
802d0628bd Force close the keep alive when sending a 401
Work around a Qt issue where Qt
timeout instead of handling the 401
this happen only for the first query send by the
client.
2015-09-16 15:53:38 +02:00
958274e8f6 Do not automatically delete Dynamips bootflash file because they are necessary to restore VLANs on the c3600 platform. 2015-09-16 06:09:14 -06:00
5136083853 Wait that an user press a key to stop gns3vmnet.exe on Windows. 2015-09-16 05:26:17 -06:00
e374e52745 Bump version to 1.4.0dev7. 2015-09-14 15:19:57 -06:00
47abba3c9c Fixes tests. 2015-09-14 15:16:54 -06:00
59f5de5de2 Throw an error if ubridge as incorrect permissions. Fixes #312. 2015-09-14 15:05:25 -06:00
a9ac0d3380 This may fix "The semaphore timeout period has expired" error on Windows. #311. 2015-09-13 15:47:43 -06:00
65fa4036c6 Fixes bug with VMware VM connections + moves some uBridge code to BaseVM. 2015-09-13 14:52:25 -06:00
0ee31361c0 Support for packet capture on VMware VM links. 2015-09-13 09:40:09 -06:00
c7b17039cb Update docker-py version 2015-09-11 17:18:57 +02:00
22e4fec2e2 Fix ProcessLookupError on _checkAlive Qemu
Fix #308
2015-09-11 14:16:56 +02:00
cc7fe1a477 VMware Fusion support with uBridge. 2015-09-10 03:44:56 -06:00
46698924fd Merge remote-tracking branch 'origin/unstable' into unstable 2015-09-09 02:39:06 -06:00
8e29ad4493 Updates vmnet script to support Windows. 2015-09-09 02:38:11 -06:00
5aa9d4d7b9 Do not block on .lock for VMware OSX 2015-09-08 21:31:21 +02:00
1e722254f7 Merge remote-tracking branch 'origin/unstable' into unstable 2015-09-08 03:03:38 -06:00
8031cf1030 Require Dynamips version 0.2.16 to change the default QinQ Ethernet type. 2015-09-08 03:03:11 -06:00
92e05e144a Merge branch 'docker' into unstable 2015-09-08 11:00:59 +02:00
0fa300cb99 Initial Docker support from Google Summer of Code 2015-09-08 10:57:28 +02:00
9ee1d9d71a fixed the way docker containers are terminated 2015-09-08 10:54:27 +02:00
0ab95ae043 basic docker container support 2015-09-08 10:54:27 +02:00
6dd381a745 Merge branch 'Bevaz-qinq_ethertype' into unstable 2015-09-08 02:29:30 -06:00
0ddef78127 Merge branch 'qinq_ethertype' of https://github.com/Bevaz/gns3-server into Bevaz-qinq_ethertype 2015-09-08 02:27:21 -06:00
2a0f1586c8 Merge remote-tracking branch 'origin/master' 2015-09-08 02:08:32 -06:00
2c5b2a19f6 Check for valid FR or ATM switch mappings. Fixes #300. 2015-09-08 02:07:06 -06:00
a779fa7462 Check for valid FR or ATM switch mappings. Fixes #300. 2015-09-08 02:00:39 -06:00
c992cabb28 VirtualBox VMs can only be started if powered off. Fixes #299. 2015-09-08 01:20:46 -06:00
4d6626e849 Support of VPCS 0.8
Fix #306
2015-09-07 17:35:21 +02:00
4efec03448 Allows VMware VMs to use vmnet interfaces for connections without using uBridge. Fixes #295. 2015-09-05 14:38:11 -06:00
476e033a78 Fixes path to vmnet-cli on Mac OS X. 2015-09-05 11:30:26 -06:00
a70775a238 Updates vmnet script to support Mac OS X. 2015-09-05 11:20:25 -06:00
5fa5e7227d Prepare next release 2015-09-04 21:33:48 +02:00
2689b6b7bb Prepare 1.3.10 2015-09-04 18:22:59 +02:00
c16d237176 Fix test 2015-09-04 09:13:57 +02:00
3cf609303d Slack support for Travis 2015-09-04 09:05:44 +02:00
fda33c56de Catch exception when a process cannot be killed. Fixes #296. 2015-09-03 16:18:27 -06:00
5388d43695 Fix closing project when multiple project is open
Fix #305
2015-09-03 17:41:27 +02:00
986ab649d7 Fix project not closing
Fix #303
2015-09-03 16:46:34 +02:00
b1ef49672e Qemu user options are at the end. It's allow user to add his own net
interfaces
2015-08-27 18:46:02 +02:00
d853ffe791 Change the way we look for Qemu path
Fix #302
2015-08-27 18:27:17 +02:00
c361d27531 Lock qemu vm during start / stop operations
Fix #301
2015-08-27 16:06:11 +02:00
699647dbda In the error message explain how to turn off KVM support 2015-08-26 17:17:40 +02:00
4cc66a3801 Fix when you stop qemu on windows you have an error
Fix #625
2015-08-26 17:01:16 +02:00
8085080e41 Merge branch 'master' into unstable 2015-08-26 14:36:55 +02:00
fea7a8a9ab Fix Qemu cannot be used on Windows
Fix #291
2015-08-26 13:47:12 +02:00
70f62cd5eb Allow to start server with python -m gns3server 2015-08-25 22:31:45 +02:00
796ca86df9 Fix random failures in tests on OSX and Windows 2015-08-25 10:13:49 +02:00
f0f901a15d Should solve the BufferError by avoiding using thread
Fix #293
2015-08-24 19:59:11 +02:00
34e64fe5d8 Catch UnicodeEncodeError when passing unicode char as qemu options
Fix #292
2015-08-24 18:09:01 +02:00
1a04417e84 1.4.0dev6 2015-08-24 17:16:46 +02:00
1283f8bde8 EthernetSwitch: Allow to choose ethertype for QinQ outer tag. 2015-08-20 09:42:30 +03:00
eb5f9c48f2 Backport: fixes NAT NIO for Qemu VMs (do not launch any legacy scripts) 2015-08-14 22:16:02 -06:00
98112f7fac Fixes NAT NIO for Qemu VMs (do not launch any legacy scripts) 2015-08-14 22:15:01 -06:00
a16d6ac88f Lower VMware requirements to Workstation version 10 and Player version 6. 2015-08-14 20:35:04 -06:00
83a7e25389 Fixes Unicode error. Fixes #290. 2015-08-13 20:15:50 -06:00
ab3700854c Don't delete Dynamips ROM files. They are used to restore the nvram. 2015-08-10 21:23:05 -06:00
2ce01fafc0 Don't delete Dynamips ROM files. They are used to restore the nvram. 2015-08-10 21:22:21 -06:00
764e0df29a Adds pywin32 dependency in setup.py for Windows. 2015-08-10 18:36:25 -06:00
31b91e1ccb 1.4.0beta1 2015-08-07 18:39:59 +02:00
0018658f60 Fix ram setting for Qemu 2015-08-07 17:08:22 +02:00
55f7c79918 Explicit set qemu memory as MB 2015-08-07 17:03:06 +02:00
323674ba5c Turn off KVM for non x86 architectures
Fix #289
2015-08-07 16:49:45 +02:00
8b46a1a4ab Fix tests 2015-08-07 09:21:09 +02:00
05ab18f295 Send an error when vmware executable cannot be found on Linux. Fixes #288. 2015-08-06 23:05:10 -06:00
5121753232 Support for CPUs setting for Qemu VMs. 2015-08-05 17:17:55 -06:00
217945339e Bump version to 1.4.0dev5. 2015-08-04 11:59:35 -06:00
f161bf42fa Bump version to 1.4.0alpha4. 2015-08-04 11:58:34 -06:00
e46ecdc37c Bump version to 1.4.0dev5. 2015-08-04 11:53:59 -06:00
2e6c438208 1.4.0alpha4 2015-08-04 11:51:25 -06:00
1613999689 Quote command in qemu debug logs so you can copy/paste them 2015-08-04 17:06:42 +02:00
e91a7cebd4 Merge branch 'master' into unstable 2015-08-03 19:29:32 +02:00
39c1d2d2dd Prepare 1.3.10 2015-08-03 19:25:56 +02:00
d942f52f7d 1.3.9 2015-08-03 18:52:22 +02:00
dbc4f05465 Fix tests 2015-08-03 12:10:36 +02:00
0923ed5d85 Support for Qemu disk interfaces, cd/dvd-rom image and boot priority. Fixes #278. 2015-08-02 23:02:02 -06:00
7bccf9e554 Check for VMware Player version >= 7 and VMware Workstation >= 11. Fixes #286. 2015-08-01 13:49:02 -06:00
bb69f02da6 Catch GeneratorExit exception when trying to create a Ghost IOS image. 2015-08-01 11:50:16 -06:00
06a6287dff Backport: removes code that deletes IOS router instance files. 2015-07-31 14:37:23 -06:00
7c1dd75ad7 1.4.0dev4 2015-07-31 15:33:22 +02:00
87ec90cdaf Removes code that deletes IOS router instance files. 2015-07-30 18:50:59 -06:00
c2807c39f9 1.4.0alpha3 2015-07-29 18:17:03 +02:00
1fd2332796 PEP8 2015-07-28 17:57:36 +02:00
78ef6e3032 Validation schema for qemu-img 2015-07-28 17:50:57 +02:00
1eecae2027 Changelog 1.4.0alpha3 2015-07-28 17:26:54 +02:00
058a13ce87 Merge branch 'master' into unstable 2015-07-28 16:50:31 +02:00
003c2f5f0b New crash report key 2015-07-28 16:48:22 +02:00
e92d9ca5ff Raise error if qemu image already exist when creating disk 2015-07-28 16:15:01 +02:00
54448ab936 Prevent user to create a qemu to a different directory on non local
server
2015-07-28 16:07:13 +02:00
1ebc287b5f VMnet manager on Linux: check that VMware has been installed. 2015-07-27 17:10:20 -06:00
f761fb77f8 Fixes UnicodeDecodeError when reading a VMware file. 2015-07-27 16:29:02 -06:00
a721d7d910 Fixes KeyError: "ethernet0.connectiontype". Fixes #276. 2015-07-27 15:50:09 -06:00
1419b7c8dc Fixes replace errors. Fixes #284. 2015-07-27 15:31:42 -06:00
c2ba3f923e 1.3.9dev1 2015-07-27 20:11:49 +02:00
bdb23d6d3b 1.3.8 2015-07-27 12:10:01 -06:00
2ed0ef770e Catch ProcessLookupError when updating iouyap config. Fixes #255. 2015-07-27 11:41:13 -06:00
5986849b67 Catch ProcessLookupError when updating iouyap config. Fixes #255. 2015-07-27 11:40:01 -06:00
5b0c36c0d6 API for creating a qemu disk image 2015-07-27 19:18:36 +02:00
5d8c90d138 Rename qemu image type to qemu image format 2015-07-27 17:32:27 +02:00
b94a4e2308 Add code for creating qemu image on server side
Ref https://github.com/GNS3/gns3-gui/issues/558
2015-07-27 16:27:14 +02:00
fcd4fda68e Prevent starting different hypervisors that leverage hardware virtualization (VT-x/AMD-V). Fixes #548. 2015-07-26 19:21:30 -06:00
eb5e019a26 Fixes IOS adapters and WICS cannot be removed. Fixes #282. 2015-07-26 15:52:43 -06:00
76fe0cb316 Fixes IOS adapters and WICS cannot be removed. Fixes #282. 2015-07-26 15:51:55 -06:00
4aeb451ffd Makes sure the loop is running when closing the app. 2015-07-26 15:28:14 -06:00
5f5d9347b9 Makes sure the loop is running when closing the app. 2015-07-26 15:27:47 -06:00
31b168aa42 Catch Permission denied when writing to VMX file while closing VMware VM. Fixes #277. 2015-07-25 17:09:10 -06:00
382747a2f2 Catch GeneratorExit exception. Fixes #231. 2015-07-25 16:55:37 -06:00
64bf935222 Fixes missing chipset info for VirtualBox VM (maybe some older VirtualBox version don't have it). Fixes #254. 2015-07-25 16:54:31 -06:00
7b001e4d36 Catch GeneratorExit exception. Fixes #231. 2015-07-25 16:46:23 -06:00
b1b602db3b Merge remote-tracking branch 'origin/master' 2015-07-25 16:39:45 -06:00
cf5af8a6f7 Fixes missing chipset info for VirtualBox VM (maybe some older VirtualBox version don't have it). Fixes #254. 2015-07-25 16:39:38 -06:00
8a257b3b2e Changes how to look for the vmrun.exe location. 2015-07-24 16:50:36 -06:00
c3c971921d Update documentation 2015-07-24 10:15:15 +02:00
d9f1a7c7d3 API for listing current projects
Fix #274
2015-07-24 10:09:16 +02:00
cbe593f4a4 Fix virtualbox test crash on Linux 2015-07-23 12:06:35 +02:00
c0befe8a8a Merge branch 'master' into unstable 2015-07-23 11:38:23 +02:00
4814bc6c65 Fix IOURC upload 2015-07-23 11:36:11 +02:00
cbc859a03b Merge remote-tracking branch 'origin/master' into unstable 2015-07-23 11:35:15 +02:00
0f369bc40b ifconfig is not available on travis new architecture 2015-07-23 10:58:34 +02:00
631ad76149 Switch from travis legacy architecture to the new one 2015-07-23 10:56:15 +02:00
3f25bfcb27 Fix qemu tests 2015-07-23 10:46:43 +02:00
e07c3215f5 Merge remote-tracking branch 'origin/unstable' into unstable
Conflicts:
	gns3server/version.py
2015-07-22 20:56:43 -06:00
9b3b5f1884 Bump version to 1.4.0dev3 2015-07-22 20:55:54 -06:00
2655d426c2 Backport: option to drop nvram & disk files for IOS routers in order to save disk space. 2015-07-22 16:02:08 -06:00
cc820f2584 Changelog 2015-07-22 20:47:42 +02:00
1b499571b1 Deactivate uBridge process monitoring (process returns 1 on Windows when stopping). 2015-07-22 12:03:40 -06:00
8e236a7045 Prevent using different hypervisors that leverage hardware virtualization.
- Implemented for Qemu when a VMware or VirtualBox VM with hardware virtualization is already running.
- Implemented for VirtualBox only when a Qemu VM with KVM is already running.
2015-07-21 22:58:28 -06:00
f1bbacecd6 Backport: Remove timeout to wait for connections to finish. 2015-07-21 18:00:31 -06:00
accaa2159b Remove timeout to wait for connections to finish. 2015-07-21 18:00:03 -06:00
fc0409286b Check for uBridge version and catch uBridge errors. 2015-07-21 17:58:53 -06:00
f0649b4ac3 Remove default FLASH when no hda disk for Qemu VMs. Fixes #535. 2015-07-21 16:45:44 -06:00
8cc46f66c6 Fixes indentation mistakes. 2015-07-21 16:04:55 -06:00
a8142a04f8 Merge remote-tracking branch 'origin/master' 2015-07-21 16:02:52 -06:00
19425b1e9c Backport: Fixes RuntimeError: Event loop is closed. 2015-07-21 16:02:44 -06:00
abd9c1dc48 Use the registry to find vmrun if the default VMware install path does not exist. 2015-07-21 15:59:29 -06:00
1b066bef92 Merge pull request #272 from GNS3/backup_upload_images_projects
Backup upload images projects
2015-07-21 11:21:12 -07:00
6bf7a6aa38 Fix after jeremy feedback 2015-07-21 20:19:29 +02:00
15a7401654 Merge branch 'master' into unstable 2015-07-21 18:52:21 +02:00
fc14deee1b Restore images & projects tarballs 2015-07-21 16:14:03 +02:00
270017d945 Allow user to backup projects and images 2015-07-21 14:20:58 +02:00
23a03a24de Merge pull request #271 from lykinsbd/master
Update gns3.conf.upstart
2015-07-20 22:44:40 -07:00
439e0df058 Bind host on 0.0.0.0 when checking for a free UDP port. 2015-07-20 19:27:14 -06:00
d5c0584d25 Bind host on 0.0.0.0 when checking for a free UDP port. Fixes #265. 2015-07-20 19:22:20 -06:00
6ee94331d4 Fixes RuntimeError: Event loop is closed. Fixes #266. 2015-07-20 16:02:28 -06:00
c94dc1ec07 Update gns3.conf.upstart
Fixing start-stop-daemon syntax so that it accepts the aruments
2015-07-20 10:42:34 -05:00
dfd6af3c22 Merge remote-tracking branch 'origin/unstable' into unstable 2015-07-19 22:55:27 -06:00
1f890b4cad Implements uBridge hypervisor. 2015-07-19 22:55:10 -06:00
639f6bc68c New crash report key 2015-07-18 22:17:14 +02:00
5125ddcde4 Fix gns3server.utils.images in md5sum NameError: name 'log' is not
Fix #268
2015-07-16 18:56:36 +02:00
ddddac426b Fix invalid umask
Fix #264
2015-07-15 13:58:08 +02:00
6d678898ef Client disconnect should not be logged as an error 2015-07-13 14:51:42 +02:00
ccd29ab500 Take VMware file encoding into account. Fixes #261. 2015-07-12 20:58:58 -06:00
f08817f335 Merge remote-tracking branch 'origin/unstable' into unstable 2015-07-12 19:03:22 -06:00
e785baaa29 Take VMware file encoding into account. Fixes #261. 2015-07-12 19:03:15 -06:00
6048222797 Adjust AUTHORS. 2015-07-12 17:25:03 -06:00
9e2a22fc8e 1.4.0dev2 2015-07-10 15:52:53 +02:00
9cfc7c0423 Typo in version number 2015-07-09 19:05:47 +02:00
65410e23e2 1.4.0 alpha1 2015-07-09 19:05:12 +02:00
1e04e1e123 Fixes bug with vmrun VIX path. 2015-07-09 10:32:23 -06:00
f2e5b8756a Changelog for 1.4.0 alpha1
Fix #260
2015-07-09 17:48:02 +02:00
5705ace70c Update documentation 2015-07-09 16:16:43 +02:00
c3eb6a440f Fix vmware and interfaces tests 2015-07-09 16:12:33 +02:00
a461cb71c6 Allow to send the iourc when starting the VM
Ref https://github.com/GNS3/gns3-server/issues/255
2015-07-09 16:06:52 +02:00
dd6c377b15 Fix test on Linux
Fix #258
2015-07-09 15:39:14 +02:00
2fc63601bf Merge remote-tracking branch 'origin/unstable' into unstable 2015-07-08 21:39:14 -06:00
27532cd037 Add debug to help resolve https://community.gns3.com/thread/9193 2015-07-08 21:38:58 -06:00
32e0d49e1e VMware VMs always have a working directory (to store the ubrige.ini and ubrige.log files). 2015-07-08 17:48:34 -06:00
870029123c Netifaces is not used on Windows. Fixes #257. 2015-07-08 14:51:21 -06:00
37f4ff2f63 Do not monitor the ubridge process because it creates an issue on Windows. 2015-07-08 13:00:54 -06:00
8455d8a155 Merge remote-tracking branch 'origin/unstable' into unstable 2015-07-07 12:48:31 -06:00
205f624730 Fixes GUI crash on unset vmrun_path variable. Fixes #507. 2015-07-07 07:58:48 -06:00
78d847e9ac ubridge source Ethernet interface must be quoted on Windows. 2015-07-06 18:32:01 -06:00
dfe95cce63 Fix qemu binary lookup in frozen OSX application
https://github.com/GNS3/gns3-gui/issues/496
2015-07-05 21:53:47 +02:00
33d6fbde21 Fix server tests 2015-07-05 21:14:05 +02:00
83929119be Return stdout when a process crash for IOU, Dynamips, uBridge and VPCS. 2015-07-04 14:08:03 -06:00
9235c3a913 Adds -no-kvm to the ASA template and ignore -no-kvm on platforms other than Linux. Should resolve #472. 2015-07-03 23:35:42 -06:00
442aa31065 Make sure VNC ports are between 5900 and 6000. Fixes #490. 2015-07-03 16:06:25 -06:00
8e652778f9 Remove running VBoxManage as another user option (root for instance). See #248. 2015-07-03 14:37:07 -06:00
65953847f6 Fix an error in frozen ressources loading 2015-07-03 20:29:49 +02:00
f3f152cd2a Use the ressource system in order to locate the templates directory 2015-07-03 20:03:37 +02:00
3cacf400ff Fix SSL instructions 2015-07-03 15:04:19 +02:00
c6bbc34a56 Allow user to change the configuration file
Fix #251
2015-07-03 11:10:12 +02:00
06e193231c Fix double loading of config from working directory 2015-07-03 10:53:41 +02:00
e93f1330b8 Fix dynamips tests 2015-07-03 10:47:30 +02:00
1f116fc992 Fix tests 2015-07-03 10:43:48 +02:00
731d24f497 Get Windows interfaces for VMware support. 2015-07-02 20:10:20 -06:00
3ed95148b2 CORS support 2015-07-02 19:12:55 +02:00
caf7af7ad5 Support server config in current working directory 2015-07-01 17:30:52 +02:00
472faa97c5 Due to the migration to cx_freeze darwin and windows share
the same path for resources
2015-07-01 17:25:53 +02:00
4171aebfdb List only valid existing IOS images (for IOS router wizard). 2015-06-30 17:37:46 -06:00
be85d95ff7 Checks if IOS image exist at startup and not during node creation. Fixes #240. 2015-06-29 16:30:57 -06:00
3b3929803b Force turn off KVM for the CI 2015-06-26 17:13:32 +02:00
6e3ebb714d Return vm_directory for VirtualBox and VMware
Fix #246
2015-06-26 17:09:19 +02:00
feefb075d4 Make the qemu event crash more future proof 2015-06-26 15:10:41 +02:00
90b0dfebbd Merge branch 'master' into unstable 2015-06-26 14:42:43 +02:00
e8805d3fdc When a qemu VM crash send the log to the client.
Fix #243
2015-06-26 14:41:58 +02:00
2ccb30eeb5 Fix Incorrect vboxmanage sudo command
Fix #247
2015-06-26 10:47:52 +02:00
ccd3224490 Add a vm_directory field to Dynamips / VPCS / IOU
Fix #246
2015-06-25 11:17:32 +02:00
3bb1509f41 Fix the tests after the removal of the KVM flag from VM 2015-06-25 09:54:42 +02:00
2b36746d52 Return the working directory of a Qemu VM 2015-06-25 09:53:16 +02:00
d9745644cd Check for /dev/kvm. Fixes #245. 2015-06-24 23:03:04 -06:00
ed95bcee97 Moves KVM setting to Qemu server preferences. Fixes #244. 2015-06-24 22:47:30 -06:00
f20ee06181 VNC console support for Qemu VMs. 2015-06-24 19:09:17 -06:00
26df776f4c Move configuration to the GNS3 directory 2015-06-24 11:57:42 +02:00
08b5aec656 Fix Crash report sending errors when no reliable Internet connection 2015-06-23 19:28:08 +02:00
7f6a064ac1 Fixes versions. 2015-06-23 07:34:25 -06:00
3a3b2c22e3 Fix version number 2015-06-23 10:24:19 +02:00
82e2a16b27 Merge branch 'master' into unstable 2015-06-23 09:47:01 +02:00
389788cfdc 1.3.8 dev 2015-06-22 20:19:38 +02:00
26fc8236c9 1.3.7 2015-06-22 19:06:25 +02:00
8bd2453bf8 Allow null md5 in request schema 2015-06-19 16:38:22 +02:00
a8e69d9a0b Do not use the md5 from cache for a missing image 2015-06-19 16:36:25 +02:00
4aadfa3b67 Test all IOU requirements at VM startup
This allow user to create the node and upload the image after
2015-06-19 16:35:19 +02:00
5c4a49a8c7 Do not raise a 404 if we send the checksum of the images 2015-06-19 16:18:43 +02:00
f398d15025 Completes #239 (Makes VMX keys reading case insensitive). 2015-06-18 17:53:08 -06:00
797b45b1f9 Merge pull request #239 from GNS3/vmx_case_insensitive
Makes VMX keys reading case insensitive.
2015-06-18 14:08:40 -07:00
11e96e6521 ACPI shutdown support for VMware VMs. Fixes #436. 2015-06-18 15:02:31 -06:00
0a48fbe7e4 Fix coveralls configuration 2015-06-18 16:33:24 +02:00
a577fe9fdb Make VMX reading case insensitive
Fix #237
2015-06-18 16:28:13 +02:00
4a53c7789d Renable coverall in travis 2015-06-18 15:59:57 +02:00
6d1f060791 Reloads ubridge when connecting or disconnecting VMware VM links. 2015-06-17 17:36:52 -06:00
d779392d7f Find vmrun on Windows. 2015-06-17 17:05:58 -06:00
f041697311 Compute a md5sum of images for futur purpose
Fix #234
2015-06-17 17:11:25 +02:00
0f15e4b56a Fix merge issue 2015-06-17 14:16:36 +02:00
b1f740c952 Merge branch 'master' into unstable 2015-06-17 14:09:32 +02:00
4216c5d2ed Prevent install on Python 2
Fix #236
2015-06-17 14:08:22 +02:00
afa4ba9b55 Crash report key for 1.3.7 2015-06-17 09:30:56 +02:00
7980ae9ab1 Update version_info. 2015-06-16 15:00:25 -06:00
3495035dbf Bump version to 1.3.7.dev1 2015-06-16 14:39:20 -06:00
a2d4c2427d 1.3.6 2015-06-16 21:56:44 +02:00
0dae4b6930 1.3.6dev1 2015-06-16 19:32:53 +02:00
947a732bfb Remove netifaces dependencies due to IOUVM 2015-06-16 19:14:09 +02:00
d88c5648de 1.3.5 2015-06-16 18:56:50 +02:00
94fbd3fac9 Ignore invalid characters when reading the output of a process
It should happend only when user try to use another binary and
the code of VPCS, dynamips... Will detect it's not the
correct binary.

For example we detect this error after an user used SupperPutty
instead of VPCS.

Fix #235
2015-06-16 15:48:59 +02:00
e2ef78a7c4 Ignore invalid characters when reading the output of a process
It should happend only when user try to use another binary and
the code of VPCS, dynamips... Will detect it's not the
correct binary.

For example we detect this error after an user used SupperPutty
instead of VPCS.

Fix #235
2015-06-16 15:48:09 +02:00
87efc4d55a Adds gns3-netifaces to dependencies only if netifaces isn't already installed
otherwise this requires a compilation and therefore the Python development files.
2015-06-14 17:27:07 -06:00
8bcf749cd5 Adds an IP address for each interface returned by the interfaces API method. 2015-06-12 17:54:02 -06:00
f39f7be503 Add log when we didn't close a project due to another client 2015-06-12 15:14:30 +02:00
4e16433a08 Limit file size during upload
Fix #86
2015-06-12 10:10:46 +02:00
04aac2f3dc Convert old -enable-kvm to kvm settings for Qemu
Fix #233
2015-06-12 09:40:38 +02:00
6e88ba4c25 Cleanup SSL certificate support
Fix #208
2015-06-11 17:07:13 +02:00
04e62e429c Merge branch 'master' into unstable 2015-06-11 16:55:09 +02:00
07eab6e766 Fix tests 2015-06-11 09:18:02 +02:00
a2833cf276 Turn on / off authentication 2015-06-10 23:14:18 +02:00
75267f9d53 Merge branch 'master' into unstable 2015-06-10 16:30:30 +02:00
2da0b36ee7 Support a platform parameter for Qemu
I'm sure we will discover a distribution with a different
naming conventions...

Fix #220
2015-06-10 15:49:24 +02:00
fb79543342 Build documentation 2015-06-10 14:35:53 +02:00
b0fb2fcc6d Fix test 2015-06-10 14:33:44 +02:00
b36c5f25d2 Improve memory consumption of file upload with the HTML form
Fix #86
2015-06-10 14:20:06 +02:00
c10e692ca2 systemd start script and use netifaces from pip
Fix #59, #229
2015-06-09 17:29:01 +02:00
7c7f8fe3ed Fix ethernet interfaces tests if eth0 doesn't exists
Also on Windows and MacOS it return error if we try
to use a non existing interfaces.

Fix #230
2015-06-09 16:35:21 +02:00
bd4b6396a8 Ensure in test we didn't load the local configuration 2015-06-09 16:32:36 +02:00
36d5049c61 More debug for the interfaces up crash debug 2015-06-09 10:10:06 +02:00
079715bc18 Ensure no colored output on Windows
Fix #228
2015-06-09 10:05:00 +02:00
525940ee15 Add a stupid is_interface_up test in order to see why it's crash on
travis

Related to #230
2015-06-09 09:56:08 +02:00
352fa3480b Fix qemu tests on travis 2015-06-09 09:55:51 +02:00
669ec42985 Add a test for KVM support 2015-06-09 09:28:39 +02:00
d518ac45f5 Enable KVM acceleration option. 2015-06-08 14:51:06 -06:00
c7ea8517a1 Do not stop saving IOS router or IOU configs when there is an exception while a project is committed. 2015-06-08 11:32:00 -06:00
5a32d8a779 Merge remote-tracking branch 'origin/master' 2015-06-08 11:28:58 -06:00
9f1705a4f1 Do not stop saving IOS router configs when there is an exception while a project is committed. 2015-06-08 11:28:48 -06:00
815b7d226c Sync with IOU tools (nvram import/export). 2015-06-08 10:07:54 -06:00
65e7f61f96 Fixes issues when setting MAC address for a Qemu VM or IOS router. 2015-06-07 22:18:41 -06:00
042472f02c Check interface is up before connecting a NIO (Linux only). Fixes #277. 2015-06-07 13:51:33 -06:00
81d417a2b3 Fixes too many arguments to socket.getaddrinfo() 2015-06-07 09:25:54 -06:00
81e56e035b IPv6 support. 2015-06-06 21:37:34 -06:00
9f97b52f5f Merge remote-tracking branch 'origin/unstable' into unstable 2015-06-06 15:15:25 -06:00
ca331ae2a5 Import/Export support for IOU nvrams. 2015-06-06 15:15:03 -06:00
1739acb67e Install qt5 for travis 2015-06-06 13:43:02 +02:00
e63b9ff0e6 Option to drop nvram & disk files for IOS routers in order to save disk space. 2015-06-05 14:54:22 -06:00
02650fa490 Create a private config file if expected
Fix #217
2015-06-05 16:23:52 +02:00
fff3e1474f Distribute our own version of netifaces working with python 3
Fix #97
2015-06-05 15:59:43 +02:00
d9de1718b7 Fix crash if a private config exist in IOS but no private config file
Fix #217
2015-06-05 15:30:30 +02:00
b1d21c7c32 Drop python 3.3 from Travis 2015-06-04 10:51:49 +02:00
ebfe003885 Tool to quickly add and remove VMware vmnet interfaces on Linux. 2015-06-03 20:00:08 -06:00
b118f9a078 Replace RuntimeError by SystemExit. 2015-06-03 19:58:58 -06:00
37ddff9f07 Support for base MAC address for Qemu VMs. 2015-06-03 14:52:49 -06:00
1c803f7afb Remove unneeded dependency line in setup.py 2015-06-03 12:10:29 -06:00
9f15fdbc2b Fixes #181 (drop Python 3.3). 2015-06-03 12:08:11 -06:00
d8fb33dba2 Fix merge conflict 2015-06-03 18:58:17 +02:00
a1204dca0a Merge branch 'master' into unstable 2015-06-03 18:34:46 +02:00
78891ae00e Basic Auth support 2015-06-03 15:38:34 +02:00
b344def887 Fix crash when virtualbox list of VMS return an empty line
Fix #206
2015-06-03 11:59:53 +02:00
743f1392b5 ACPI shutdown support for Qemu VMs. 2015-06-02 22:33:38 -06:00
933bc5a7b0 ACPI shutdown support for VirtualBox VMs. 2015-06-02 16:30:35 -06:00
a1bc815f63 Update crash report key 2015-06-02 20:27:33 +02:00
668cc3f0a5 1.3.5dev1 2015-06-02 20:05:31 +02:00
42a8c7147a 1.3.4 release 2015-06-02 19:48:04 +02:00
a0fe9bb498 Control vm command has to be used instead of modify vm. Fixes #205. 2015-06-02 09:00:37 -06:00
57f9d875ca Fix AttributeError: 'NIONAT' object has no attribute 'lport' for
VirtualBox

Fix #205
2015-06-02 16:27:48 +02:00
a2e51ac090 Avoid duplicate paths in qemu binary list
Fix #204
2015-06-02 15:35:14 +02:00
887f9b298e 1.3.4 Changelog 2015-06-02 14:44:49 +02:00
d99047ce72 Drop useless dependencie
Fix #203
2015-06-02 14:40:29 +02:00
edff447483 Catch exception in snapshot dialog. 2015-06-01 21:54:08 -06:00
ad27fdf8b9 Bump version to 1.3.4.dev2 2015-06-01 16:29:49 -06:00
9df290f192 Check if port or adapter is connected before starting/stopping a packet capture. Fixes #196. 2015-06-01 15:42:17 -06:00
05aafb9538 Revert "Start virtualbox VM one by one" because it doesn't fix the issue
This reverts commit da72a9501a.
2015-06-01 16:16:34 +02:00
da72a9501a Start virtualbox VM one by one
Related to #190
2015-06-01 11:40:42 +02:00
a60389427b Support for VMware linked clones. 2015-05-30 20:26:38 -06:00
ada94d486a Get server resource independant of working directory 2015-05-28 13:24:45 +02:00
85c185604e Merge branch 'master' into unstable 2015-05-28 12:18:24 +02:00
a2dfeab315 Load faulthandler module only for dev build 2015-05-28 12:17:56 +02:00
16cad8426a Enable faulthandler only for dev build 2015-05-28 12:17:25 +02:00
a79249aa9e Fix tests after merge 2015-05-28 12:05:19 +02:00
9442042d7a Merge branch 'master' into unstable 2015-05-28 12:04:01 +02:00
57a069b027 Support cacert.pem in the new frozen package 2015-05-28 11:31:23 +02:00
98e01ff21d Serial console implementation for VMware VMs. 2015-05-27 21:06:18 -06:00
c782784bf5 Merge pull request #187 from boenrobot/qemuImg
Dedicated Qemu-img method and API call.
2015-05-27 17:02:40 -06:00
9ef4628cbc Added a method for getting qemu-img binaries, and moved the qemu folder into a separate method. 2015-05-28 00:11:36 +03:00
0476f2932e Prevent users to add links to running Qemu VMs and start a capture on running VirtualBox VMs. 2015-05-27 13:56:27 -06:00
91c0f05a4e Fixes bug: couldn't set PCMCIA disk1 size for IOS routers. 2015-05-27 10:17:46 -06:00
74ee73581a Fix crash if you pass an invalid hostname
Fix #198
2015-05-27 17:34:01 +02:00
a86bac4214 Catch VPCS kill errors
Fix #199
2015-05-27 17:21:15 +02:00
8abf22ef24 Skip network interfaces on Travis 2015-05-27 16:45:39 +02:00
7cad25eb1a Raise a VirtualBox error if adapter doesn't exists
Fix #195
2015-05-27 16:38:57 +02:00
ecf4e91e55 Ignore VirtualBox VM Name with a carriage return in name
Add tests for get_list of VirtualBox

Fix #200
2015-05-27 16:21:18 +02:00
ea67f4aeb9 Test ok on Windows 2015-05-27 11:12:39 +02:00
c98bcedd39 Cleanup the temporary project after modules have been notified of the
path change
2015-05-26 15:20:14 +02:00
528bb7a7c6 Do not return error if we can't remove the old project directory 2015-05-26 13:27:12 +02:00
d31420b3e1 Script for starting gns3server in development mode on Windows 2015-05-26 13:06:08 +02:00
50d7a4f335 Catch encoding errors in windows logger 2015-05-26 13:05:37 +02:00
4216724d0b Give a reason for travis skip test 2015-05-26 12:00:13 +02:00
117630c887 Test ok on Windows 2015-05-26 11:55:30 +02:00
f1ab682be9 Do not crash if module ioucon is loaded by tests on Windows 2015-05-26 11:55:30 +02:00
c03c66ec48 Fix tests crash on travis 2015-05-26 11:35:06 +02:00
dfd18f9483 Travis install netifaces 2015-05-26 10:56:35 +02:00
289b68e5c1 Use setter for the qemu_path (allow to pass only the binary name) 2015-05-26 10:06:10 +02:00
a7dd0d3c51 Fixes TAP connection when using VPCS. 2015-05-26 10:06:10 +02:00
e62dd1a572 Fix tests on Windows 2015-05-26 10:06:10 +02:00
1f931d56c7 Fix test suite on Windows 2015-05-26 10:06:10 +02:00
d999f0a08d Drop coveralls because it's create trouble to tests run on Windows 2015-05-26 10:05:53 +02:00
24e84a3dd8 Test interfaces (it seem it's crash on Travis) 2015-05-26 10:05:53 +02:00
29ec07d166 Fix crash launching qemu on OSX from another location.
It's append only when frozen an you launch the server by hand.

Fix #194
2015-05-26 10:05:53 +02:00
b62efa3bae I'm stupid... Remove fake segfault 2015-05-26 10:05:53 +02:00
c5171b887f Add the fault handler in order to try to get a proper crash stack 2015-05-26 10:05:21 +02:00
f169455ad4 Adds NAT NIO in device schema validation so they can return an error that it is not supported. 2015-05-26 10:04:22 +02:00
aeda0bec16 Merge pull request #189 from GNS3/project_files_api
API for list & download files of a project
2015-05-26 09:49:25 +02:00
6f9f004ebb API for list & download files of a project 2015-05-26 09:49:12 +02:00
8636d3e337 Use setter for the qemu_path (allow to pass only the binary name) 2015-05-26 09:48:36 +02:00
c43b26d787 Merge remote-tracking branch 'origin/master' 2015-05-25 19:07:23 -06:00
08f82e02a0 Fixes TAP connection when using VPCS. 2015-05-25 19:07:12 -06:00
3c4a60cd0a Check for VMware lock file. 2015-05-25 15:49:28 -06:00
3729a10783 VMware vmnets management almost complete. 2015-05-21 21:48:59 -06:00
33bca1a85c Fix tests on Windows 2015-05-21 12:01:37 +02:00
4d50d00b3e Fix test suite on Windows 2015-05-21 11:46:55 +02:00
21cc41fd16 Drop coveralls because it's create trouble to tests run on Windows 2015-05-21 11:05:04 +02:00
f8d95291fa Test interfaces (it seem it's crash on Travis) 2015-05-21 10:45:07 +02:00
0287b4607d Base for supporting VMnet adapters. 2015-05-20 19:05:26 -06:00
9fa873751d Fix crash launching qemu on OSX from another location.
It's append only when frozen an you launch the server by hand.

Fix #194
2015-05-18 11:58:56 +02:00
8c9758d16b I'm stupid... Remove fake segfault 2015-05-17 23:10:50 +02:00
0c5b753211 Add the fault handler in order to try to get a proper crash stack 2015-05-17 12:47:04 +02:00
cb7b9e8190 Adapters for VMware VMs. 2015-05-15 19:09:48 -06:00
221a35baae Adds NAT NIO in device schema validation so they can return an error that it is not supported. 2015-05-14 20:54:38 -06:00
0ac27c40da Merge remote-tracking branch 'origin/unstable' into unstable 2015-05-14 20:12:08 -06:00
a386c5382c Starting VMware VM networking support. 2015-05-14 20:11:57 -06:00
743187bb2e Merge branch 'master' into unstable 2015-05-14 19:29:30 +02:00
5bb870dc0f New crash report key 2015-05-14 19:28:26 +02:00
76be91d544 1.3.4dev1 2015-05-14 19:23:21 +02:00
078b72cafd Version 1.3.3 2015-05-14 18:57:30 +02:00
b2457e0b3b Check for empty iourc path. 2015-05-13 16:05:54 -06:00
2531a05adc Merge remote-tracking branch 'origin/master' 2015-05-13 15:54:03 -06:00
dd9f62158f Fixes bugs with IOS router configs. Fixes #354. 2015-05-13 15:53:58 -06:00
a3c0f0754e Fix crash 2015-05-13 23:27:51 +02:00
25a6616cd0 Some wording changes. 2015-05-13 13:53:42 -06:00
157bc18ebd Use a temporary directory as egg cache
We have use with broken permission on their
system. We try to workaround the issue.

Fix #182
2015-05-13 14:29:03 +02:00
3704911c2d Fix tests 2015-05-13 10:19:50 +02:00
1e38b11f34 Catch crash error in IOU in case of permission denied
Fix #186
2015-05-13 10:16:24 +02:00
5df5a6da18 Fix qemu tests 2015-05-12 09:32:42 +02:00
8e168dfbe0 Completes VMware VMs searching process. 2015-05-10 17:21:31 -06:00
c6e00bb4ac Merge pull request #169 from GNS3/upload_images
Upload images API
2015-05-10 21:07:22 +02:00
bb4ebbfe64 Upload images API
Conflicts:
	requirements.txt
	setup.py
2015-05-10 21:06:31 +02:00
61fb641215 Merge pull request #168 from GNS3/listen
A notification stream with process monitoring.
2015-05-09 17:15:58 -06:00
2a462de7f3 Merge remote-tracking branch 'origin/unstable' into unstable 2015-05-08 18:30:48 -06:00
13eb461dfe Update default VMware VM location path for OSX. 2015-05-08 18:30:41 -06:00
924f604fe5 Merge pull request #184 from boenrobot/setupAndReadmeFix
Readme + setup.py/requrements.txt sync
2015-05-08 18:23:16 -06:00
91ff6e5ae9 Updated compilation instructions for Windows.
Synced up requirements.txt and setup.py dependencies.
2015-05-09 03:18:32 +03:00
00fa1cc370 Merge branch 'master' into unstable 2015-05-08 14:45:07 +02:00
c197b39a68 Find VMware VMs using the inventory and alternatively using the default vm location (for VMware player). 2015-05-07 16:50:37 -06:00
bebdadc465 Bump version to 1.3.3.dev3 2015-05-07 11:52:17 -06:00
b0ce091a4c 1.3.3rc1 2015-05-07 16:03:51 +02:00
d21469a916 Return an error if an adapter slot doesn't exist on an IOS router. 2015-05-06 17:22:07 -06:00
b57a023394 NIO NAT support for VirtualBox VMs. 2015-05-06 15:21:39 -06:00
a929dfea38 Merge remote-tracking branch 'origin/master' 2015-05-06 14:59:35 -06:00
fcff2d0813 NIO NAT support for QEMU VMs (user mode back-end is used). 2015-05-06 14:59:01 -06:00
ed39afbf3d Throw an error if user put an invalid port range in config file
Fix #117
2015-05-06 10:40:51 +02:00
3ba4789ba6 New crash report key
Fix #180
2015-05-06 09:55:14 +02:00
17b93e6a89 Bump version to 1.3.3dev2 2015-05-05 14:49:03 -06:00
4b21135ba7 Turn off configuration parser interpolation 2015-05-05 11:53:33 +02:00
a3f00e1f45 Catch configuration file parsing errors
Fix #176
2015-05-05 11:44:35 +02:00
b7dac1bec4 Force closing the event loop to avoid warning with Python 3.4.3
Fix #177
2015-05-05 11:33:47 +02:00
18c4154376 Catch error when you can't mark a project as no longer temporary
Fix #172
2015-05-05 10:51:51 +02:00
22efc7488f Catch BrokenPipeError for OSX frozen server
Fix #166
2015-05-05 10:46:09 +02:00
9eeb8910fb Match how IOU initial-config is set for VPCS VM. 2015-05-04 21:54:56 -06:00
71e2586e17 Refactors how startup-config and private-config are handled for IOS routers. 2015-05-04 18:42:32 -06:00
ee2dada88b Fix tests 2015-05-04 21:29:28 +02:00
c4054cf810 Catch the "WinError 0 The operation completed successfully" exception at a higher level. 2015-05-04 12:14:04 -06:00
d2d91ebdea Fix temporary project not cleanup with save as 2015-05-04 14:04:57 +02:00
0dea63c9ea If image is not found in VM directory look in images folder 2015-05-04 10:57:08 +02:00
3467b42ab5 Ordered MAC addresses for QEMU based VMs. 2015-05-03 13:18:18 -06:00
65103e9332 Merge remote-tracking branch 'origin/master' 2015-05-03 11:41:09 -06:00
f6bc823b58 Fixes #171. 2015-05-03 11:40:55 -06:00
a260377f0e List all available VMware VMs. 2015-05-01 18:47:46 -06:00
151788e48a Force utf-8 configuraton files reading
Fix #170
2015-05-01 17:49:16 +02:00
e9ec5c8a37 A notification stream with process monitoring 2015-05-01 13:20:30 +02:00
57f5e7a7d9 Merge branch 'master' into unstable 2015-05-01 13:20:09 +02:00
c3c6b29854 Merge commit '359abb0286fe25d60ac2155bbed869d068a15868' into unstable 2015-05-01 13:18:17 +02:00
827d04bed4 Merge commit 'd18293ae7c54684aba101ca3931f2331b8ea050e' into unstable
Second master to unstable bad merge commit
2015-05-01 11:57:14 +02:00
ba658a4712 Merge commit '929c337e8bf33f060c884368628b279550248925' into unstable
It's the bad unstable => master commit
2015-05-01 11:56:19 +02:00
b3f2a6ac2a Fix tests and build documentation 2015-05-01 11:24:56 +02:00
e6eab1fb25 Aiohttp 0.15.1
Conflicts:
	requirements.txt
	setup.py
2015-05-01 10:57:28 +02:00
6b70fa9794 Do not list file starting with a . in upload handler 2015-05-01 10:55:08 +02:00
ab60d7929b Basic VMware support (start & stop a VM). 2015-04-30 19:05:37 -06:00
359abb0286 Revert "Merge branch 'unstable'"
This reverts commit 929c337e8b, reversing
changes made to b9bc73fd01.
2015-04-30 16:43:30 +02:00
d18293ae7c Fixes list images in VirtualBox. 2015-04-29 22:17:17 -06:00
929c337e8b Merge branch 'unstable'
Conflicts:
	gns3server/modules/virtualbox/__init__.py
	gns3server/version.py
	tests/modules/test_manager.py
2015-04-29 16:29:45 -06:00
f8f6f5dc5d Merge branch 'master' into unstable
Conflicts:
	gns3server/modules/virtualbox/__init__.py
	gns3server/version.py
2015-04-29 14:25:44 +02:00
b9bc73fd01 Do not crash when closing a project if VirtualBox is not accessible
Fix #164
2015-04-29 14:24:27 +02:00
e75fbc9d73 Catch connection reset errors
Fix #162
2015-04-29 11:15:32 +02:00
0311a0086e Fixes typo. 2015-04-28 22:16:15 -06:00
461e3ce53f 1.3.3dev1 2015-04-28 21:49:48 +02:00
1b4613fbaf Version 1.3.2 2015-04-28 21:06:04 +02:00
30ff5510d9 Merge remote-tracking branch 'origin/master' 2015-04-28 12:02:33 -06:00
cc03017739 Cleanup the VirtualBox Media Manager after closing a project. Fixes #145. 2015-04-28 12:02:21 -06:00
bad740d32a Fix test on Linux 2015-04-28 15:31:00 +02:00
5f6d1bfdd6 Merge branch 'master' into unstable
Conflicts:
	tests/modules/test_manager.py
2015-04-28 10:46:59 +02:00
a884af983f Avoid Cygwin warning with VPCS on Windows. 2015-04-27 22:23:27 -06:00
4f021054e0 Merge pull request #158 from GNS3/keep_iou_config
Do not erase the IOU initial-config if there is one when creating the IOU VM.
2015-04-27 18:37:17 -06:00
8503472c77 Close VirtualBox VM linked clone disks after the VM is unregistered. Fixes #145. 2015-04-27 17:10:32 -06:00
e7ae1776f4 Final fixes for windows test suite 2015-04-27 23:28:12 +02:00
3f26ada081 Comment broken test 2015-04-27 23:20:01 +02:00
77f54848e3 Fix some tests on Windows 2015-04-27 23:12:13 +02:00
bf3444933e Fix test qemu now raise 409 if nio_ethernet 2015-04-27 22:54:24 +02:00
f208b472a1 TAP interface support for QEMU VMs. Fixes #153. 2015-04-27 14:38:15 -06:00
b6a935aeb8 Return an explicit error when a NIO type is not supported by a VM. 2015-04-27 14:19:17 -06:00
324a4f73d0 Do not erase the IOU config 2015-04-27 18:22:54 +02:00
d5ae4750e9 Do not load IOU handler on Windows during tests
Fix #159
2015-04-27 16:21:56 +02:00
4df95efdec Skip IOU test on Windows
Fix #159
2015-04-27 15:09:42 +02:00
834a554fea Fix VPCS tests 2015-04-27 10:14:46 +02:00
271cb527d4 Explicit utf-8 decoding. 2015-04-26 21:19:39 -06:00
6edf1e3649 Check NIO exists when stopping an IOU capture. 2015-04-26 21:15:15 -06:00
017997e0a3 Fixes c7200 NPE setting. 2015-04-26 18:35:12 -06:00
3e6996903f Fixes VPCS process termination. 2015-04-26 12:57:06 -06:00
da2b895c99 Catch FileNotFoundError exception in os.getcwd() 2015-04-26 12:49:29 -06:00
683a512917 Fixes #150. 2015-04-25 15:20:15 -06:00
80a0e0ebf7 Explicit utf-8 encoding where necessary to avoid Unicode errors on Windows (we require/set an utf-8 locale on other systems). 2015-04-25 11:58:34 -06:00
d68bf1c263 Removes unnecessary sleep in VirtualBox VM. 2015-04-25 09:36:28 -06:00
fa544ef888 Fixes #270. Relative paths management with empty ones. 2015-04-24 17:27:32 -06:00
ee1e5b8204 Merge pull request #156 from GNS3/daemon
Server daemonization support.
2015-04-24 16:38:59 -06:00
8f6e5b4ad8 Merge branch 'unstable' into daemon
Conflicts:
	gns3server/main.py
2015-04-24 16:37:56 -06:00
24bfd8ab53 New crash report key and doesn't send report for developers 2015-04-24 18:30:31 +02:00
14cc01bb8b Merge pull request #152 from GNS3/api_list_images
API in order to get the list of IOU, Dynamips, Qemu images.
2015-04-23 17:20:15 -06:00
40ce22222e Merge branch 'unstable' into api_list_images
Conflicts:
	gns3server/handlers/api/iou_handler.py
2015-04-23 17:19:37 -06:00
7e991cc404 Merge pull request #154 from GNS3/wireshark_remote_capture
Support for Wireshark remote packet captures.
2015-04-23 16:17:44 -06:00
83f2509cfe Cleanup exceptions 2015-04-23 16:56:46 +02:00
6b862b8397 Correctly show the host in templates
Fix #157
2015-04-23 14:32:10 +02:00
fac0f5ecd9 Proper daemon support 2015-04-23 11:10:02 +02:00
3680c40e23 Catch COM errors when connecting to WMI. 2015-04-23 00:03:44 -06:00
30f6263146 Don't assume the PATH environment variable exists. 2015-04-22 21:42:36 -06:00
161adb781b Use UUIDs instead of the VM names for VirtualBox pipe paths. 2015-04-22 20:29:52 -06:00
2e39265da1 Merge branch 'master' into unstable 2015-04-22 17:34:17 +02:00
9c549b175f Add --log options for daemon support 2015-04-22 17:28:58 +02:00
fc289fd868 Basic upstart script 2015-04-22 17:13:39 +02:00
bf618d321c Max 100 thread executor 2015-04-22 10:39:43 +02:00
8b879c0614 Support wireshark remote capture 2015-04-20 19:27:07 +02:00
cf0adf56a8 Merge branch 'master' into unstable 2015-04-20 19:26:27 +02:00
531e95463c Add qemu-kvm to the list of binary 2015-04-20 10:12:17 +02:00
3926390d30 Fix tests broken by a previous commit 2015-04-18 09:22:37 +02:00
343e007809 Ignore the "OSError: [WinError 0] The operation completed successfully" exception in Windows. 2015-04-16 20:17:06 -06:00
c6dbf296cf Merge remote-tracking branch 'origin/master' 2015-04-16 13:24:48 -06:00
dfdc18b20c Merge branch 'master' into unstable 2015-04-16 18:38:59 +02:00
bca90bc563 API in order to get the list of IOU, Dynamips, Qemu images 2015-04-16 18:32:12 +02:00
b5e01f7560 Fix IOU licence check flag 2015-04-16 09:51:02 +02:00
4136c29b0f Config paths are not used when updating Dynamips or IOU VM settings. 2015-04-15 19:50:40 -06:00
aeab9780d8 Fixes initial-configs that were not restored when opening a project containing IOU VMs. 2015-04-15 19:49:40 -06:00
5a4ffae6a2 Merge branch 'master' into unstable 2015-04-15 16:44:09 +02:00
e367f95f96 Drop darwin specific tests 2015-04-15 16:42:26 +02:00
789e24795e Merge branch 'master' into unstable 2015-04-15 16:29:54 +02:00
26a7f83db2 Remove the workaround for dynamips OSX 2015-04-15 15:58:31 +02:00
def453c116 Restore "iourc_path" until I speak with jeremy about it 2015-04-15 15:50:34 +02:00
997f7cbd6f Fix noise in logs 2015-04-15 15:40:07 +02:00
750958bd12 Fix tests 2015-04-15 14:33:51 +02:00
aab4a7243b Merge remote-tracking branch 'origin/master' 2015-04-14 18:21:42 -06:00
aa2472fb30 Rewrote image search
This code is more generic and support all cases. Previously
we had bug where the user lost his image path if the image
was not located in image directory.
2015-04-14 18:46:55 +02:00
e51a129216 Prevent parallel execution of VBox commands
In theory it should not be a problem.
But It's create issues like this one:

Fix: https://github.com/GNS3/gns3-gui/issues/261
2015-04-14 15:00:45 +02:00
6ec081c774 Include tests in Pypi package
Require by gentoo maintainer
2015-04-14 14:53:01 +02:00
55fed02299 Fix a crash when in some cases you can't access to VBOX state
Fix #137
2015-04-14 14:35:48 +02:00
45ca995dea Fix crash if VirtualBox doesn't return API version
Fix #136
2015-04-14 14:32:44 +02:00
af942dc419 Fix a crash in VirtualBox vm creation
Fix #138
2015-04-14 14:24:13 +02:00
1d5dc2ecf0 1.4.0 dev1 2015-04-13 10:48:14 +02:00
443842e9b8 Allocate random names for Dynamips NIOs. 2015-04-12 18:14:45 -06:00
78bc6e29a8 Explicitly delete Dynamips NIOs and unmap VCs for ATM and Frame-Relay switches. 2015-04-12 18:09:53 -06:00
de5e8f852d Cleaner and generic way to set Qemu & IOU VM settings. 2015-04-12 15:09:37 -06:00
c99998d73c Fix version 2015-04-12 11:08:30 +02:00
c4963abcba 1.3.2 dev1 2015-04-11 13:59:22 +02:00
1ba9a2fcfa Prepare 1.3.1 2015-04-11 09:34:20 +02:00
eac751948e Prepare RC4 2015-04-09 10:57:25 +02:00
b2e53a94d4 Initial config file content can be empty 2015-04-09 10:53:18 +02:00
2d507fd17a Fix crash if IOU initial config is emtpy
Fix #147
2015-04-09 10:27:50 +02:00
202032f334 Fix error messages in JSON schema 2015-04-09 10:24:11 +02:00
1d997d9da5 Return more informations about bad requests for crash reports 2015-04-09 10:22:25 +02:00
2b6945664b Allow less strict dependencies
Fix #146
2015-04-09 09:50:26 +02:00
9b79cce488 Dev4 version 2015-04-09 09:22:04 +02:00
2d0f73454f Missing project name in documentation 2015-04-09 09:21:49 +02:00
7e8b0a48ab Merge remote-tracking branch 'origin/master' 2015-04-08 11:17:49 -06:00
7d7972afb3 Some spring cleaning. 2015-04-08 11:17:34 -06:00
f799fc1ab7 Prepare 1.3.1rc3 2015-04-07 16:16:19 +02:00
3b4a060ae9 Fix missing IOU documentation
Fix #143
2015-04-07 16:09:27 +02:00
db6db31b60 Add missing project name in curl documentation 2015-04-07 15:28:18 +02:00
1c4a059982 Look in old IOU images location in order to smooth transition
Fix #141
2015-04-07 15:25:53 +02:00
4189089e1b Prepare 1.3.1rc2 2015-04-06 21:34:32 +02:00
7efb7c2978 Do not overwrite initial-config IOU if client send an empty
Fix #140
2015-04-06 21:30:57 +02:00
d16a389d1f Fix documentation about /ports/udp 2015-04-06 11:57:05 +02:00
e3239b7e36 Prepare 1.3.1rc1 2015-04-05 11:47:56 +02:00
1c4202187a Fixes TAP interface use with VPCS. 2015-04-03 19:11:28 -06:00
631d7a1e25 Avoid disconnecting valid VirtualBox VM adapter backends. 2015-04-03 19:08:29 -06:00
19c5fdb1fd Merge pull request #135 from GNS3/fix_virtualbox_adapters
Fixes missing adapters in VBox Virtual Machines.
2015-04-04 00:13:58 +00:00
b46e2cf013 Fix issues with macos X dynamips not freeing UDP port
Fix #133
2015-04-03 13:32:07 +02:00
1acc9398d5 Fix encoding error when saving dynamips configuration
Fix #134
2015-04-03 12:13:07 +02:00
8fc256da6d Fix missing adapters in VBox Virtual Machines
If you have 4 network adapter and attach only ethernet 1 and 4.
You will see eth0, eth1, eth2 and eth3 with eth0 and eth3 attached.

https://github.com/GNS3/gns3-gui/issues/255
2015-04-03 12:08:18 +02:00
b330b2c157 The upload web page return a 200 in case of error
Otherwise IE doesn't display error messages...

Fix #132
2015-04-01 21:46:23 +02:00
990f243f15 Do not crash if dynamips config contain non ascii chars
But I don't know why user can want to do that.

Fix #123
2015-04-01 19:55:11 +02:00
49f36a83bd Test path with chinese charcaters in Qemu
Refs #120
2015-04-01 18:24:36 +02:00
a3c8201bcc Do not crash if no console port is available for VBox
I don't know how user manage to fall in this situation.

Fix #127
2015-04-01 17:59:58 +02:00
90d55fcb8a Raise a DynamipsError if we can't access to VM status
Fix #129
2015-04-01 17:39:37 +02:00
4cd5ec5613 Check name of the VBoxManage executable
Fix #118
2015-04-01 17:36:22 +02:00
b2d8a8d810 Exclude docs and tests package from distribution
Fix #131
2015-04-01 16:41:11 +02:00
026fe3df9b Catch error when qemu additional options are invalid
Fix #119
2015-03-31 22:14:08 +02:00
220d585dcc Fix ClientDisconnectedError
Fix #124
2015-03-31 22:05:50 +02:00
93344e9427 Fix crash when NIO doesn't exist
Fix #122
2015-03-31 22:00:05 +02:00
6d6cfacdc8 Turn off crash report if raven not available
Fix #121
2015-03-31 21:52:00 +02:00
36f5fd2865 Fix crash when IOU script file is incorrect
Fix #125
2015-03-31 21:50:47 +02:00
47ffdbd4ed Bump version to 1.3.1.dev1 2015-03-30 13:09:05 -06:00
ddf0194e8e 1.3.0 release 2015-03-30 10:10:03 -06:00
9bf875699f Fix coveralls 2015-03-30 17:24:03 +02:00
420a1c2da2 Fix rare crash in tests for travis and fix coverage 2015-03-30 17:03:49 +02:00
da00aa030a Fix missing /v1 in api documentation
Fix #116
2015-03-30 11:05:54 +02:00
ee8362d89a Fixes issue when asyncio read is cancelled and data is still sent by Dynamips hypervisor. Fixes #113. 2015-03-28 19:23:01 -06:00
056ff14437 Fixes unicode decode error when saving IOS router configs. Fixes #115. 2015-03-28 18:09:53 -06:00
3c917c59fb Fix error when missing adapter
Fix #112
2015-03-27 16:20:31 +01:00
4a0879f2d1 Branches inscrtructions 2015-03-27 10:32:29 +01:00
533ce78b90 Fix crash if we call stop on dynamips on non started process
Fix #111
2015-03-27 10:08:03 +01:00
be199b77a5 Homepage cleanup 2015-03-27 10:04:16 +01:00
bff164afcb Merge pull request #106 from aka001/homepage_added
Added homepage
2015-03-27 09:46:42 +01:00
81ce86a8a7 Fixes use_default_iou_values param was not set. 2015-03-26 16:47:55 -06:00
1df8f61035 Merge remote-tracking branch 'origin/master' 2015-03-26 15:11:41 -06:00
c7034c25ef Fixes issue when IOURC environment variable is set to None. 2015-03-26 15:11:36 -06:00
2e72bc2d3a Fix tests 2015-03-26 17:43:00 +01:00
64152c1af8 Fix a crash in CI, making log impossible to read 2015-03-26 15:49:51 +01:00
879ed9e4e6 Fixes issue when exporting IOS router configs. 2015-03-25 14:58:04 -06:00
ec6a761e04 Fixes check if VPCS process is running. 2015-03-25 14:43:51 -06:00
7d8ff54c78 Merge remote-tracking branch 'origin/master' 2015-03-25 14:37:10 -06:00
588088ca93 Fixes bug when remove_nio() is not a coroutine for ATM and FR switches. 2015-03-24 22:15:49 -06:00
07067d6765 Fixes how to test if iou and iouyap are running. 2015-03-24 22:04:48 -06:00
980e63e667 Allocate a random port for Qemu monitor. Fixes issue with pre 1.3 projects. 2015-03-23 22:52:02 -06:00
7b1a707967 Bump version to 1.3.0.dev3 2015-03-23 21:22:10 -06:00
73310105a8 Fixes default chassis bug. 2015-03-23 21:13:22 -06:00
1c0c300ded Bump version to 1.3.0.dev3 2015-03-23 18:37:42 -06:00
51659b6087 Bump version to 1.3.0rc2 2015-03-23 15:41:10 -06:00
a25b17fe95 Removed merge conflict 2015-03-24 02:42:38 +05:30
6d0d945d6c Changelog 2015-03-23 20:25:44 +01:00
b5aabd4cc5 Fixes initial-config not loading for IOU L2. 2015-03-23 12:30:27 -06:00
cde5c3d994 Fix tests 2015-03-23 15:56:18 +01:00
f4c7212e33 Update sentry key for the RC2
This allow to revoke crash report for old releases
2015-03-23 15:24:57 +01:00
f451ed144e Prevent error when suspend/resume is not supported in QEMU VM. 2015-03-22 20:40:19 -06:00
a77023d1ee Bump version to 1.3.0.dev2 2015-03-21 22:47:12 -06:00
24300b2502 Adds project id when requesting UDP port. 2015-03-21 22:27:40 -06:00
153914bf97 Make sure used ports in a project are cleaned up when closing it. 2015-03-21 17:19:12 -06:00
2d6d153262 Save configs when project is committed. 2015-03-21 14:52:17 -06:00
628dfef0d3 Initialize chassis when creating an IOS router. Fixes #107. 2015-03-21 13:58:52 -06:00
17d5b3a7bc Remove unnecessary locks. 2015-03-20 19:19:49 -06:00
5b08677537 Merge pull request #104 from GNS3/dynamips_hypervisor_lock
Asyncio lock for Dynamips hypervisor.
2015-03-21 00:24:54 +00:00
257735255c Added homepage 2015-03-20 17:09:53 +05:30
01bcbe2fd9 Lock the dynamips reader an writer
Fix #103
2015-03-20 10:21:40 +01:00
7473dec5ad Bump version to 1.3.0.dev1 2015-03-19 19:56:31 -06:00
29b7f0e164 Merge branch 'asyncio' 2015-03-19 17:46:30 +01:00
533baf0445 1.3.0rc1 2015-03-19 17:46:03 +01:00
253ab4e2b5 PEP8 2015-03-19 17:42:43 +01:00
ddb8a9f06e Fix an issue in IOU relative path looking 2015-03-19 15:36:06 +01:00
f31071d510 Bump version to 1.3.0rc1.dev3 2015-03-18 15:40:02 -06:00
8415117d2d Save IOS router configs when saving the project (done right this time). 2015-03-18 15:34:31 -06:00
f6b122cdfa Look in legacy IOU images dir when looking for relative IOU image path. 2015-03-17 19:28:43 -06:00
44c8396997 Bump version to 1.3.0rc1.dev2 2015-03-17 19:08:18 -06:00
fb0490d8e3 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-03-17 18:53:36 -06:00
163d1e375d Save IOS configs when a project is committed. 2015-03-17 18:53:24 -06:00
6330e99ff1 More robust IOUVM support 2015-03-17 22:18:55 +01:00
386b311755 Fix iou key verification for large hostid 2015-03-17 20:15:01 +01:00
4a9f578784 Support IOURC update 2015-03-17 19:00:14 +01:00
8ca9c2121a Do not crash if iourc file is missing 2015-03-17 18:34:23 +01:00
b5f134dbb2 Merge pull request #102 from vivek425ster/master
Modify README.rst to specify how to run tests.
2015-03-17 16:56:18 +01:00
42f51ddc00 Modify README.rst to specify how to run tests. 2015-03-17 21:10:28 +05:30
66cdf39ea2 Support uploading iourc 2015-03-17 16:31:45 +01:00
64eb54ae3d Merge pull request #101 from aka001/modified_README
Modified README
2015-03-17 15:42:55 +01:00
964ea0f577 Fix random behavior in tests 2015-03-17 15:40:58 +01:00
dc1c12b7d0 Modified README 2015-03-17 20:04:20 +05:30
bb7eda63af Support more all QEMU status
Fix #98
2015-03-17 11:02:14 +01:00
54bccb0628 Restore configuration live reload
Closes #94
2015-03-17 10:22:18 +01:00
2de817214f Do not hide non-executable file in the UploadHandler. 2015-03-16 19:16:15 -06:00
93a5f4be79 Temporarily deactivate IOS router saveconfigs. 2015-03-16 17:36:23 -06:00
87d12452f9 Disable the netifaces dependency which creates issues. 2015-03-16 16:35:02 -06:00
46fe973a96 Save IOS router configs when the user saves a project. 2015-03-16 16:33:37 -06:00
cc9b575b77 Bind UDP tunnels to the correct source address. Fixes #96. 2015-03-16 12:45:21 -06:00
bcb1ce02ab Refactor config management in tests 2015-03-16 15:03:41 +01:00
e54649accd Fix dynamips tests 2015-03-16 14:42:00 +01:00
c05edfe415 Fix test manager 2015-03-16 12:08:23 +01:00
cf247a9301 Fix iou tests and add tests 2015-03-16 11:52:22 +01:00
3a6a04b8e5 Fix version test 2015-03-16 10:18:37 +01:00
21587fda5a Removes confreg setting for IOS routers. 2015-03-14 16:31:15 -06:00
30ed89847b Adds netifaces module in the setup dependencies. 2015-03-14 15:40:00 -06:00
6d56da03e5 Fixes tests. 2015-03-14 13:16:27 -06:00
25b778aec0 Bump version to 1.3.0rc1.dev1 2015-03-13 22:42:25 -06:00
a90805135d Bump version to 1.3.0beta2 2015-03-13 22:02:28 -06:00
95f9431b59 Update CHANGELOG 2015-03-13 22:00:19 -06:00
cf92bfe81e Alternative local server shutdown (mostly intended for Windows). 2015-03-13 18:57:27 -06:00
4ccca5dc99 Support RAM setting for VirtualBox VMs. 2015-03-13 17:13:36 -06:00
a81d2274cd Adds info either the server is started as a local server in VersionHandler response. 2015-03-13 15:15:27 -06:00
221befa73e Option to record curl requests into a file (to replay them later). 2015-03-13 14:43:39 -06:00
db69b93100 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-03-13 11:46:03 -06:00
81420c60c7 Changes words in upload template. 2015-03-13 11:46:02 -06:00
f7d3af4a59 Fixes hostid retrieval. 2015-03-13 11:45:38 -06:00
c596147b59 List the iourc file in upload handler. 2015-03-12 20:56:10 -06:00
5637b7be86 Bump version to 1.3.0beta2.dev1 2015-03-12 18:51:22 -06:00
500b7112f5 Assert host and port are not None when creating the Server instance. 2015-03-12 18:50:38 -06:00
36daa3627e Ignore exception in asyncio loop on Windows when the local server gets a signal. 2015-03-12 18:48:07 -06:00
03796ca729 Server handler to shutdown a local server. 2015-03-12 18:44:05 -06:00
6d901e8295 Fixes issue when VBoxManage returns an error. 2015-03-12 16:53:22 -06:00
4f7b896a6a Fixes tests. 2015-03-11 23:09:01 -06:00
38fa3e9a86 Update CHANGELOG. 2015-03-11 22:33:51 -06:00
34c4649d0b Bump version to 1.3beta1 2015-03-11 22:09:43 -06:00
54c2d34185 Optional IOU license key check. 2015-03-11 18:59:57 -06:00
aebcd9f08b Relative path support of IOU, IOS and Qemu images. 2015-03-11 15:04:11 -06:00
c41bec0516 Do not give attachment warning for generic attachments in VirtualBox. 2015-03-11 12:05:22 -06:00
223f3ee705 Should fix ProcessLookupError exceptions. 2015-03-11 10:53:09 -06:00
1610067eee Support for HDC and HDD disk images in Qemu. 2015-03-10 11:50:30 -06:00
062e5a5986 Fixes bug when starting a packet capture in VirtualBox with the project path containing spaces. 2015-03-10 11:05:52 -06:00
4c68fd0d52 Renames server.conf and server.ini to gns3_server.conf and gns3_server.ini respectively. 2015-03-10 11:00:32 -06:00
03dfd177f9 Use TCP instead of Telnet to communicate with Qemu monitor. 2015-03-10 00:34:57 -06:00
5910b4b0be Have the server look in the right place for relative image paths. 2015-03-09 21:57:21 -06:00
ad5548f70b Convert more that IOU pre 1.3 projects but also other modules on remote servers. 2015-03-09 21:46:23 -06:00
5ca65093e4 Fixes bugs when checking if this is a local project. 2015-03-09 12:45:02 -06:00
4f1674f50c Bump version to 1.3.0beta1.dev2 2015-03-09 11:38:02 -06:00
95766fa30d Let the server know about the project name and convert old IOU projects on remote servers. 2015-03-08 19:13:01 -06:00
2934232afb Convert legacy IOU directories on remote servers. 2015-03-08 17:45:29 -06:00
b1eccc0ace Properly restore configs for Dynamips routers. 2015-03-08 14:13:19 -06:00
c3014632a4 Fixes rename bug for linked clones in VirtualBox. 2015-03-08 12:32:36 -06:00
2b34e35027 Pypi doesn't like Python 3.5... yet
Upload failed (400): Invalid classifier "Programming Language :: Python :: 3.5"
2015-03-07 20:19:52 -07:00
0d379f428e Makes absolute path checks work on Windows. 2015-03-07 18:16:46 -07:00
be1e0fa1f2 Upload IOURC file via the web interface 2015-03-07 14:38:38 +01:00
ed2e4e43f2 Support the options use_default_iou_values
Fix #92
2015-03-07 14:27:09 +01:00
d126db1fe9 The upload interfaces allow user to choose an image type 2015-03-07 13:52:40 +01:00
1b68a54234 Look for qemu images in ~/GNS3/images 2015-03-07 11:56:51 +01:00
ee578d3c12 Fixes Qemu networking. 2015-03-06 20:08:00 -07:00
d87ebb3ed2 Fixes suspend and resume for Qemu. 2015-03-06 15:16:19 -07:00
f188bc43e1 Includes SSL cacert file path in the warnings. 2015-03-06 11:25:25 -07:00
053fd9cc0c Adds warnings if the cacert.pem file cannot be found. 2015-03-06 11:20:28 -07:00
b58f9e10f9 Bump version to 1.3.0beta1.dev1 2015-03-06 10:34:02 -07:00
e37392c482 Correctly recover id when closing VMS
Fixes #91
2015-03-06 15:48:16 +01:00
d657f94c18 Fix crash when you start capture on a non running IOU 2015-03-06 14:48:46 +01:00
18f3859e87 Fixes Telnet server initialization issue in VirtualBox. Fixes #88. 2015-03-05 21:20:02 -07:00
a64dfdd694 Disconnect network cable if adapter is not attached in VirtualBox vNIC. 2015-03-05 19:11:33 -07:00
2bae814eb1 Remove redundant code for Dynamips hypervisor connections. 2015-03-05 18:00:17 -07:00
c012e8ddb3 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-03-05 16:11:50 -07:00
b5e8aaf682 Support for Raven to send crash report from a frozen state. 2015-03-05 16:11:43 -07:00
2679c03fe2 Drop cloud from config 2015-03-05 23:15:06 +01:00
a3e4b81837 Drop cloud for the moment 2015-03-05 23:13:54 +01:00
01ab91722b Proper format of crash report 2015-03-05 20:12:56 +01:00
a4da6c6a74 Add more informations in crash reports 2015-03-05 20:05:46 +01:00
1d0ffe4b2e Add more informations to crash reports 2015-03-05 17:44:01 +01:00
83c1ada63e Drop unused cloud code, this cleanup the dependencies 2015-03-05 17:15:16 +01:00
3407ba802e Rename vlan dat file for IOU 2015-03-05 17:00:25 +01:00
7a6136ed14 Fixes adapter bug with VirtualBox. 2015-03-04 18:24:15 -07:00
bae5b6edb4 Fix version notation in changelog 2015-03-03 18:48:28 +01:00
94bcd1cf11 Bump to version 1.3.0alpha1 2015-03-03 10:47:02 -07:00
b9d057854c Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-03-03 10:43:52 -07:00
69f8b7de6a Bump to version 1.3alpha1 2015-03-03 10:43:44 -07:00
4c2dbbbebc Changelog 2015-03-03 18:43:17 +01:00
80fd857658 Fix tests 2015-03-03 14:37:34 +01:00
10296f4f19 Do not send garbage to console in case of sentry not available 2015-03-03 13:05:10 +01:00
16dc0d1a8a Send crash report synchronous to avoid lost of events 2015-03-03 12:41:30 +01:00
6208cb997d Fixes Qemu adapters support. 2015-03-02 19:59:44 -07:00
6e89f2c7c7 Remove console_host from IOU and Qemu handlers. 2015-03-02 19:17:13 -07:00
3472f19519 Use console_host from the PortManager. 2015-03-02 18:19:11 -07:00
a6869379c3 Fixes console restoration when loading a VirtualBox project. 2015-03-02 17:28:28 -07:00
f269ec9527 Fixes Qemu networking. 2015-03-02 16:34:28 -07:00
7ace6fc7e9 Fixes old projects loading issue with Qemu. 2015-03-02 14:37:48 -07:00
466c6142af Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-03-02 13:04:35 -07:00
b673b898a8 Fixes problem when trying to convert VirtualBox projects without cloned VMs. 2015-03-02 13:04:30 -07:00
91ccd6167c API for reloading server config 2015-03-02 20:46:05 +01:00
a9afaa028c Garbage collect VM when closing a project 2015-03-02 17:17:28 +01:00
66860655b9 If a VM is already loaded, we return a VM instead of creating it twice
Partial fix for #81
2015-03-02 15:35:36 +01:00
914ea0326c Fix tests 2015-03-02 15:26:57 +01:00
16f6fe9d3b Send criticals errors to Sentry
Fixes #77
2015-03-02 09:05:32 +01:00
46b0ead329 Close connections for auto-reload. 2015-03-01 21:13:51 -07:00
c48ca212bd Stop Dynamips hypervisors used by devices before the project is closed.
This is to avoid locked files by hypervisors preventing temporary project working directories to be deleted.
2015-03-01 19:20:33 -07:00
3ef529fb0e Temporally fixes Dynamips console listening issues. 2015-03-01 18:53:03 -07:00
518b037d54 Fixes connect call failed for Dynamips hypervisor #78. 2015-03-01 14:25:09 -07:00
7223005acd Restore device IDs and fixes race condition when converting an old project. 2015-03-01 13:05:51 -07:00
5ae8728ee6 Fixes ATM switch. 2015-03-01 10:41:27 -07:00
0c767e1c0e Bump to version 1.3.dev3 2015-02-28 21:39:52 -07:00
dfce18a48f Fixes migration issues for pre-1.3 projects. 2015-02-28 18:55:53 -07:00
0f10d25c0b Optional AUX console port allocation for Dynamips VMs. 2015-02-28 16:20:27 -07:00
7fe2d6c367 Support to deactivate sparsemem or mmap globally for Dynamips VMs. 2015-02-28 15:53:21 -07:00
d762c43314 Include the images directory when converting an old project. 2015-02-28 15:00:00 -07:00
708f66b608 Fixes asyncio Lock instantiation issues on Windows.
Because the event loop is essentially a global variable, asyncio Lock objects that get instantiated early could grab a reference to the wrong loop (Selector instead of Proactor).
2015-02-27 22:12:43 -07:00
666064f1ae Revert commit: Remove lock for Ghost IOS (problem on Windows). 2015-02-27 22:01:37 -07:00
70d5dea256 Remove lock for Ghost IOS (problem on Windows). 2015-02-27 19:36:45 -07:00
ba95567886 Some info message and fixes ghost IOS activation/deactivation. 2015-02-27 19:35:31 -07:00
84870bf736 Some changes with config files on Windows. 2015-02-27 18:08:34 -07:00
0e8b8fa66f Update hypervisors working dir when the project is moved. 2015-02-27 16:51:17 -07:00
b55719186e Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-27 13:27:40 -07:00
1d6d2a39f0 Allow signals to be processed on Windows. 2015-02-27 12:51:39 -07:00
d0c386860e Fix curl sample generation in the documentation 2015-02-27 18:47:08 +01:00
ebd72d1149 Add a curl sample sessions 2015-02-27 18:39:20 +01:00
ae7bf828cd Fix tests on MacOS 2015-02-27 18:30:22 +01:00
38326f7d72 Add changelog file 2015-02-27 16:13:30 +01:00
f6448bb05d Turn off collored log output on windows 2015-02-27 15:27:13 +01:00
ebb865d973 Export vpcs config path 2015-02-27 13:38:57 +01:00
985c23a40e Explicitly import handlers so freezing application can find and include the right modules.
Do not import IOU on Windows to avoid importing unknown modules like fcntl on that platform.
2015-02-26 19:31:18 -07:00
58d92f1584 Fixes Dynamips console/aux ports restoration when loading a project. 2015-02-26 16:15:44 -07:00
62afef06af After an iou reload you can write on the console 2015-02-26 15:47:47 +01:00
5e59145948 If you type reload inside iou you are no longer disconnected 2015-02-26 15:09:15 +01:00
29e8d91745 Do not output debug for ioucon standard telnet commands 2015-02-26 13:07:26 +01:00
5a58f6efc8 Fix a crash with Python 3.4 when you stop IOU
http://bugs.python.org/issue23140
2015-02-26 11:29:57 +01:00
aa40e6097e Fix tests 2015-02-26 10:45:37 +01:00
c07b8c746e Drop poll from Qemu 2015-02-26 10:18:52 +01:00
0eaad579c2 IOU + VirtualBox conversion of old projects. 2015-02-25 18:55:35 -07:00
85518a3cd6 Fixes race condition when generating an ghost IOS file. 2015-02-25 17:38:55 -07:00
9dc713f31d Fixes race condition when deleting empty legacy project files dir. 2015-02-25 17:38:36 -07:00
473eb0280e Support for relative path in Dynamips. 2015-02-25 17:19:37 -07:00
de1be0961f Do not return an error when creating the same project multiple times (for now). 2015-02-25 17:19:12 -07:00
54fc873be5 Prevent multiple projects with the same ID to be created. 2015-02-25 16:05:57 -07:00
349d9d4540 Fixes small issues when deleting Dynamips devices. 2015-02-25 11:52:52 -07:00
f12d3f07f7 Drop the old -files in the project 2015-02-25 18:23:41 +01:00
8434a286b6 Fix IOU old project import
Fixes #69
2015-02-25 16:35:13 +01:00
818676ce5e Support relative path in iou 2015-02-25 16:26:17 +01:00
47f8ac00c0 Remove debug 2015-02-25 16:04:18 +01:00
4ea25739e5 Correctly check if qemu is running
Fixes #71
Related to #70
2015-02-25 15:46:05 +01:00
0713724a97 Properly handle when client cancel's query 2015-02-25 11:42:02 +01:00
7c2329d870 Garbage collect the lock 2015-02-25 11:19:16 +01:00
545acd1f06 Limitation documentation 2015-02-25 10:29:20 +01:00
36bb510ac1 Add api limitations in the documentation 2015-02-25 09:47:55 +01:00
3528efb1e0 Fixes packet capture for devices when spaces are present in the output file. 2015-02-24 23:12:09 -07:00
550cc7f508 Rename vms_lock to vm_locks. 2015-02-24 21:02:37 -07:00
6bb7ab20b3 Fixes vm concurrency and support for devices. 2015-02-24 15:26:03 -07:00
46b348e46a VM concurrency 2015-02-24 21:53:38 +01:00
9153b42b9d Fix crash in crash report 2015-02-24 20:22:10 +01:00
250bb38d7c Crash report with Sentry 2015-02-24 17:40:01 +01:00
67be24a412 Fix doc generation 2015-02-24 11:39:17 +01:00
fd03b36258 Fix tests 2015-02-24 10:07:22 +01:00
1ca445d5f5 Fix dynampis resume API 2015-02-24 10:02:06 +01:00
e910167a85 Quick change warning -> debug 2015-02-23 22:19:03 -07:00
49f3c9295f Some debug messages to help with port allocation debugging. 2015-02-23 19:59:19 -07:00
42c07cee1a Properly release UDP ports when closing a project or deleting a link. 2015-02-23 19:00:34 -07:00
3d3300e83a Rename console methods in port manager to use the generic tcp term in the name.
Fixes bug when a console port is allocated to a Ghost VM instance and not released.
Warnings at exit when TCP/UDP ports are still allocated.
2015-02-23 17:42:55 -07:00
182d2e465e Use projects_path & images_path. 2015-02-23 17:08:34 -07:00
fb9f5d3c14 List only executable files in upload handler. 2015-02-23 15:56:40 -07:00
8b19029d97 List only executable files in upload handler. 2015-02-23 15:56:10 -07:00
0e8c184987 Recursive listing of the images directory & fixes bug when uploading no files. 2015-02-23 15:49:05 -07:00
4d1f08c96e Turn off Qemu graphics if no display is available
Fixes #66
2015-02-23 20:21:00 +01:00
cad708f4ab Add warning unstable at the beginning of the API 2015-02-23 18:00:59 +01:00
4ffb2c8c20 Fix tests 2015-02-23 17:32:55 +01:00
89b7d62ec6 Some code cleanup 2015-02-23 17:28:17 +01:00
c9314ec509 autopep8 et upload files 2015-02-23 17:21:39 +01:00
259f6249e2 Fix tests 2015-02-23 16:09:52 +01:00
f7cd09d5fb Display an upload form (upload is not yet ready) 2015-02-23 11:28:33 +01:00
210aa6f12a Bit of cleaning. 2015-02-22 19:56:52 -07:00
da11343647 Fixes aiohttp.errors.ClientDisconnectedError errors when SIGINT is received. 2015-02-22 12:36:44 -07:00
565a7b35a6 Default NVRAM and Idle-PC for some IOS images. 2015-02-21 17:24:39 -07:00
9a745ed3f4 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-20 16:53:57 -07:00
af700e9bcb Idle-PC and auto idle-pc for Dynamips. 2015-02-20 16:53:51 -07:00
cecf2f5014 Async qemu monitor reading 2015-02-21 00:15:56 +01:00
45a48cfcc1 Embeded debugging shell 2015-02-20 22:40:20 +01:00
a0f4c6d021 Repare live reload 2015-02-20 22:23:09 +01:00
71357fa7ab Fix tests 2015-02-20 17:45:27 +01:00
47be57dca7 Fix qemu close 2015-02-20 17:31:02 +01:00
15036837bb No project for qemu binaries list 2015-02-20 16:54:23 +01:00
8aa5514890 Qemu binary list 2015-02-20 14:39:13 +01:00
90f71e7581 Idle-PC proposals for Dynamips. 2015-02-19 19:14:30 -07:00
b393948b67 Fixes iouyap shutdown. 2015-02-19 16:58:44 -07:00
8d02f464c5 Dynamips import/export configs. 2015-02-19 16:04:15 -07:00
3797e27de5 Update documentation 2015-02-19 20:23:27 +01:00
48f5c7c8b3 All params for qemu 2015-02-19 20:22:30 +01:00
d0244824bf Get a working Qemu handler. Next step add all parameters 2015-02-19 19:43:45 +01:00
b03b9226ff So we have running code for a qemu module
Now the handlers. The telnet code is not yet async
2015-02-19 16:46:57 +01:00
25bcbfb073 Allocation of console port in base vm 2015-02-19 11:45:43 +01:00
4a3e6632c1 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-18 18:40:16 -07:00
380c4d8211 Fixes capture directory path. 2015-02-18 18:40:01 -07:00
3d1363150e Fixes ghost file path. 2015-02-18 18:24:35 -07:00
610dee957d Use HTTP error 409 instead of 500 for VMError. 2015-02-18 17:48:02 -07:00
d65617657c Fix old project directories renames 2015-02-18 16:13:09 +01:00
3cb7213427 Fix crash in VPCS 2015-02-18 15:18:18 +01:00
0977af1c00 Add a dedicated glossary page 2015-02-18 11:06:13 +01:00
03b6563864 Initial config path for IOU 2015-02-17 18:12:43 +01:00
dd1833c4f0 iourc_path is set from server settings file 2015-02-17 16:40:45 +01:00
0e98497a99 Add an endpoint for exporting the initial config file 2015-02-17 14:52:51 +01:00
57348d0508 Better organisation of the API documentation 2015-02-17 10:37:09 +01:00
5170428913 Fix a capture crash 2015-02-17 10:01:15 +01:00
70ad9fff26 Documentation update 2015-02-17 09:46:18 +01:00
dc4df68c7a Keep Dynamips logs. 2015-02-16 21:30:31 -07:00
e6fd471dd5 Save Dynamips VM configs when closing a project. 2015-02-16 18:21:10 -07:00
516b882122 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-16 16:53:56 -07:00
3e95bb9748 Adapter settings and configs for Dynamips VMs. 2015-02-16 16:53:50 -07:00
6c3a926ce3 Capture is OK on server side 2015-02-16 20:08:04 +01:00
ff7f014423 Fix test 2015-02-16 19:14:45 +01:00
018e3c1451 Fix IOU closing 2015-02-16 17:40:13 +01:00
15f89776d3 All current iou code is async 2015-02-16 17:20:07 +01:00
d323234520 Harmonisation of slot, adapter notion 2015-02-16 10:19:50 +01:00
3ceb43fa62 Fix tests 2015-02-16 10:11:46 +01:00
605afa1d33 Fix bad execption name in IOU 2015-02-16 10:05:54 +01:00
78ffe313fd Dynamips VM & device deletion and ghost support. 2015-02-15 22:13:24 -07:00
26f7195288 Dynamips devices packet capture. 2015-02-15 17:45:53 -07:00
f99e834c37 Dynamips devices support (packet capture to complete). 2015-02-15 12:18:12 -07:00
4f38d96522 Dynamips devices. 2015-02-13 20:01:18 -07:00
094339304c Packet capture for Dynamips VMs. 2015-02-13 15:41:56 -07:00
6ac6c7d796 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-13 15:11:19 -07:00
a5ac7c5481 Dynamips NIO connections. 2015-02-13 15:11:14 -07:00
e082cd8b1a Update the remote IOU initial config 2015-02-13 22:16:43 +01:00
83edc649d2 Rename NVRAM to the correct application id before start the server 2015-02-13 20:57:20 +01:00
a9a3bb1c38 Pep8 2015-02-13 20:57:09 +01:00
d86e880ff7 Definitions of port and adapter 2015-02-13 18:40:40 +01:00
49f012cf4c Turn off documentation sidebar because it's broken 2015-02-13 18:27:08 +01:00
2cab5293c7 Add the notion of adapters and slot in the api 2015-02-13 18:09:50 +01:00
821eb5e92b Repare config file loading 2015-02-13 17:34:22 +01:00
ee019caa37 Support l1_keepalives in IOU 2015-02-13 16:57:35 +01:00
1550ca01e6 IOU support nio ethernet 2015-02-13 16:41:18 +01:00
3e1875b069 Set console host from port manager 2015-02-13 14:46:00 +01:00
68427eaddf Auto PEP8 cleanup 2015-02-13 14:43:28 +01:00
a4669689e7 Fix tests due to test reading the local config file 2015-02-13 11:15:11 +01:00
b419001813 Fix test on Travis with Python 3.3 2015-02-13 11:02:56 +01:00
0a5aaedc7c Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-12 19:15:47 -07:00
8f089c45f5 Fixes a few problems in Dynamips implementation. 2015-02-12 19:15:35 -07:00
f99d825346 Support network for IOU 2015-02-12 22:29:34 +01:00
9160d3caf4 Remove old directories to avoid editing them by mistake... 2015-02-12 22:29:34 +01:00
3471b03ef9 Clarify JSON schema validation errors 2015-02-12 22:29:33 +01:00
8b61aa9ae7 Set ram, ethernet adapters, serial adapters 2015-02-12 22:29:33 +01:00
05df7001a3 Successfully create an iou device from the GUI via HTTP 2015-02-12 22:29:33 +01:00
4689024b50 Add a --live options to control livereload
Because the livereload bug due to timezone issues with Vagrant
2015-02-12 22:29:33 +01:00
ebc214d6fa Fix tests and rename path to iou_path 2015-02-12 22:29:33 +01:00
fb69c693f6 Start iouyap 2015-02-12 22:29:33 +01:00
faa7472670 IOUCON start when vm start 2015-02-12 22:29:33 +01:00
986c63f344 HTTP api start iou process
Now we need to start ioucon
2015-02-12 22:29:32 +01:00
2e99ef69a9 Modules support start iou process (not ioucon and iouyap) 2015-02-12 22:29:32 +01:00
79a57ca420 New Dynamips integration part 3 2015-02-11 19:21:34 -07:00
37945585b9 New Dynamips integration part 2 2015-02-10 21:50:02 -07:00
f0add73d80 Cleanup 2015-02-10 17:27:54 +01:00
a6da2406a0 Fix tests 2015-02-10 17:24:38 +01:00
46cbcd6132 New Dynamips integration part 1 2015-02-09 18:24:13 -07:00
648850c411 Server listen to 0.0.0.0 by default. 2015-02-09 13:42:50 -07:00
30c452e938 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-02-09 13:41:36 -07:00
98586b93ee Add timeout on stopping a VPCS just in case. 2015-02-09 13:41:31 -07:00
2f85d71f32 Correctly override the config from command line
The tests was long write but allow me to found some typos
bugs.
2015-02-09 21:30:22 +01:00
e1a80a9fab Remove debug 2015-02-09 19:58:23 +01:00
b31af0abcd Sub directory project-files 2015-02-09 11:26:42 +01:00
e99c0f6ac5 I hope it's fix tests on Travis Python 3.3 2015-02-09 11:19:56 +01:00
bf29e0319e Test logger and PEP8 2015-02-09 10:38:34 +01:00
64c197c719 Fix tests 2015-02-09 10:18:37 +01:00
0d7d0a05c3 Handle old projects. 2015-02-08 18:10:04 -07:00
2a3b37a3bd VirtualBox packet capture. 2015-02-08 14:44:56 -07:00
d499402491 VirtualBox implementation complete. 2015-02-06 17:31:13 -07:00
e81dcd4bba Add /projects before /project 2015-02-06 17:42:25 +01:00
27cbfbbdc6 Useless requirement 2015-02-06 12:35:31 +01:00
571044b3e8 Fix server close tests 2015-02-06 11:31:54 +01:00
5c3969ae79 Fix tests creating garbage project in ~/GNS3/project 2015-02-06 11:15:27 +01:00
8118d7762f Parallel execution when closing VMs. 2015-02-05 14:24:06 -07:00
f2ff933b20 Fixes console and close in VirtualBox VM. 2015-02-05 11:58:10 -07:00
ab122d969e Allow empty project directory 2015-02-05 17:57:51 +01:00
5a0c224292 Allow user to change project path on local server 2015-02-05 17:52:37 +01:00
9f7b8574c8 Useless print 2015-02-05 17:15:40 +01:00
30f10a559e Fix crash in debug log 2015-02-05 16:34:18 +01:00
0abf2e82d6 Improve server debug logging 2015-02-05 15:35:52 +01:00
2786d0f044 Update aiohttp 0.14.4 2015-02-05 15:04:59 +01:00
41a8872819 Refactor VPCS script file loading
This allow to support moving the project on disk
2015-02-05 14:20:01 +01:00
869405738e Code cleanup 2015-02-05 13:55:53 +01:00
b92e065add Fix binary location change for VPCS 2015-02-05 12:00:34 +01:00
dae48b2de4 Update temporary status if project change location
This avoid race condition during file move.
2015-02-05 11:44:51 +01:00
8367a9eb30 Remove unused files (we can restore them later via git history) 2015-02-05 11:00:42 +01:00
ed41384e22 Add PyPi badge 2015-02-05 10:49:27 +01:00
2df3525ffe Add code coverage 2015-02-05 10:46:27 +01:00
132c06a2d4 Add travis icon on README 2015-02-05 10:41:55 +01:00
4e690a6d06 Update required aiohttp version to 0.14.4 2015-02-04 17:59:16 -07:00
c12d3ff739 Update documentation. 2015-02-04 17:48:33 -07:00
291fac7084 Add project_id in all VM calls. 2015-02-04 17:13:35 -07:00
b680138073 Merge remote-tracking branch 'origin/asyncio' into asyncio
Conflicts:
	gns3server/modules/project.py
	tests/modules/test_project.py
2015-02-04 13:52:46 -07:00
1bea78194c Explicit ID names, remove {uuid} from URLs and add vms in URLs for VMs. 2015-02-04 13:48:29 -07:00
c5c219ffe1 Allow modification of path from the client 2015-02-04 21:17:00 +01:00
568e203580 Increase timeout time for test in order to avoid false negative 2015-02-04 17:33:58 +01:00
2ace014a3c Cleanup old temporary project at startup 2015-02-04 17:18:53 +01:00
ca354ae7f2 Doc API V1 2015-02-04 10:31:31 +01:00
08158884a4 Add api versionning 2015-02-04 10:24:59 +01:00
119bebee25 Documentation. 2015-02-03 18:44:04 -07:00
59c82e26df Use project_id instead of project_uuid for the API. 2015-02-03 18:40:13 -07:00
d2699f051d Change URL for projects: /project becomes /projects and project_id is used instead of uuid. 2015-02-03 18:23:11 -07:00
aeb83a7945 Support %h in VPCS config file 2015-02-03 21:48:20 +01:00
a12f753136 Update documentation 2015-02-03 21:27:15 +01:00
f572f3fc95 You can't modify startup script remotely 2015-02-03 20:29:28 +01:00
0ce344b1d2 PEP8 2015-02-03 10:49:21 +01:00
d199778745 Fixes tests. 2015-02-02 19:41:26 -07:00
81f9252554 Fixes nasty bug when close a cloned VirtualBox VM. 2015-02-02 18:56:13 -07:00
66569f26a4 Make sure to wait for the unload coroutine to finish when the server is shutting down. 2015-02-02 17:01:25 -07:00
df72369b0e Fix VirtualBox VM close. 2015-02-02 17:00:29 -07:00
33d5882a4a Add traceback info when catching an exception to help with debugging. 2015-02-02 15:36:13 -07:00
471fbe576c Ignore OSError when checking for config file changes. 2015-02-02 15:00:56 -07:00
45ca493ecf Use module settings from the config file. 2015-02-02 14:52:58 -07:00
2c3fe2ad4b Repare debug log 2015-02-02 21:28:42 +01:00
aecd7dedba Fixes app name for the config file on Linux. 2015-02-02 13:13:56 -07:00
0ae8d8031a Override configuration from command line even in case of config reload 2015-02-02 15:08:46 +01:00
6abf420ce1 Support configuration live reload 2015-02-02 15:01:48 +01:00
21020a2753 Fix server configuration path 2015-02-02 10:49:46 +01:00
a3a304bd12 Load port ranges from the config file. 2015-02-01 20:43:55 -07:00
57b35d5758 Fix tests + PEP8 + documentation 2015-02-01 17:22:31 -07:00
0c90393b5b Send explicit error message when client is checking for the server version. 2015-02-01 16:55:08 -07:00
8d471a89a8 Check for OSError when starting the server. 2015-02-01 15:56:10 -07:00
334835c985 PEP8 + documentation. 2015-01-31 14:34:49 -07:00
8a00d30e23 Change ports to adapters in VirtualBox API entry points. 2015-01-31 12:07:30 -07:00
22369ade49 Rename port_id to port_number for VPCS and adapter_id for VirtualBox to avoid confusion. 2015-01-31 12:01:23 -07:00
e7c9139045 Rename /udp entry point to /ports/udp. 2015-01-31 11:58:34 -07:00
fa978b6a28 Send all VirtualBox settings when creating the VM. 2015-01-30 19:36:05 -07:00
6e29e7711c Update dependencies. 2015-01-30 15:40:00 -07:00
58fd9043ed Clean dependencies 2015-01-30 17:55:46 +01:00
8bc26420b7 If not script file is setted we use the default from VPCS 2015-01-30 14:57:25 +01:00
4b62d4d82c py.test timeout and capture log 2015-01-28 15:57:11 +01:00
f682e1c474 Complete documentation 2015-01-27 15:06:55 +01:00
29a4a0634d Add console debug 2015-01-27 11:39:31 +01:00
e60366c5bb Change URL to get all VirtualBox VMs. 2015-01-26 20:29:02 -07:00
776bfea3d7 Clean enable debug mode 2015-01-26 17:40:41 +01:00
6764c6e866 Useless debug 2015-01-26 16:39:09 +01:00
9abf323e7d Send GNS 3 server version in header and upgrade aiohttp 2015-01-26 14:40:31 +01:00
df8bdcc152 Catch exceptions from rmtree 2015-01-26 13:54:44 +01:00
4518404706 Run rmtree in a different thread 2015-01-26 12:10:30 +01:00
1bfb201368 Enable code live reload only in debug mode 2015-01-26 09:51:29 +01:00
c409819382 Add missing documentations and add julien email to travis build 2015-01-26 09:40:48 +01:00
70faf76c10 PEP8, documentation update, test fix 2015-01-26 09:36:26 +01:00
50fea669b5 Network handler for UDP port allocation and server network interfaces. 2015-01-24 15:32:58 -07:00
c002bbfb23 Minimal SSL support. 2015-01-24 12:11:51 -07:00
365af02f37 Packet capture support for VirtualBox. 2015-01-23 18:33:49 -07:00
ff63530f52 Get all available VirtualBox VMs on the server. 2015-01-23 17:57:54 -07:00
499a8f10ae Update tests. 2015-01-23 16:38:59 -07:00
6460e94311 More VirtualBox implementation. 2015-01-23 16:38:46 -07:00
bc3d63081b Unload should not delete VMs, just close them. 2015-01-23 16:36:58 -07:00
6e7a5ca8bd Adds debug and quiet command line args. 2015-01-23 13:10:57 -07:00
39e3ca91a9 Fixes module unload & adds host, port and allow-remote-console command line args. 2015-01-23 13:01:23 -07:00
59f940625a Flag --local 2015-01-23 18:37:29 +01:00
8e249b670d Set a location by default 2015-01-23 17:39:17 +01:00
7bed9f56bc Avoid crash when closing vms
Otherwise the size of dict change and Python raise
an exception.
2015-01-23 17:33:58 +01:00
017c5ac9f6 Allow changing location only for local usage 2015-01-23 16:58:14 +01:00
4f2764c0b4 Fixes module unload. 2015-01-23 08:44:00 -07:00
4848eeabad Add missing curl example 2015-01-23 16:21:26 +01:00
77ee6501b9 Update documentation documentation 2015-01-23 16:20:12 +01:00
977ff0fb57 Build documentation 2015-01-23 16:19:17 +01:00
547adf0dc6 Get project 2015-01-23 16:18:40 +01:00
0e76527ce2 Update a project 2015-01-23 16:13:58 +01:00
abc885049f Temporary project 2015-01-23 16:02:26 +01:00
7bf121c6da When we remove a VM, the VM is removed from the project. 2015-01-23 14:37:21 +01:00
3f5c2390cd Close a project 2015-01-23 14:07:10 +01:00
986a7f55ef Delete a project 2015-01-23 11:48:20 +01:00
9a0b260c56 Small change in order to avoid a PEP8 warning 2015-01-23 11:30:49 +01:00
f97c2b2cbe Delete a VM, mark it as destroyable 2015-01-23 11:28:58 +01:00
28308b10bc Add missing documentation 2015-01-23 10:11:40 +01:00
0d503b779e Explicitly close VM when the server is shutdown. 2015-01-22 23:40:51 -07:00
e61e976368 Adapters support for VirtualBox. 2015-01-22 21:31:26 -07:00
2a8823b856 Use the Proactor event loop on Windows. 2015-01-22 21:11:57 -07:00
05c0efe39b More VirtualBox work. 2015-01-22 19:07:09 -07:00
d9b02efbfa Rename destroy to close or unload (more friendly). 2015-01-22 19:06:17 -07:00
2681defe27 Moves NIO creation to the base manager. 2015-01-22 18:04:24 -07:00
6ec4dea9b9 Fixes reload call in VPCS handler. 2015-01-22 15:04:44 -07:00
1fea7593ef Update README 2015-01-22 14:39:20 -07:00
2c50bb607f VPCS Mac address / project 2015-01-22 18:47:27 +01:00
72c6182062 Typo 2015-01-22 17:04:14 +01:00
6644c640db Attribute mac address 2015-01-22 16:12:21 +01:00
08b2dc6369 Cleanup VMS when leaving 2015-01-22 11:49:22 +01:00
e12e6044dc Delete VPCS 2015-01-22 11:34:10 +01:00
545a3d2b58 PEP8 2015-01-22 10:57:08 +01:00
55052c9bca Add missing documentations 2015-01-22 10:56:02 +01:00
8d3ea60404 VPCS reload 2015-01-22 10:55:11 +01:00
1a43ff118c Fix tests and clean. 2015-01-21 19:30:24 -07:00
3b7d08a80e Suspend and resume for VirtualBox. 2015-01-21 19:28:52 -07:00
87bd0d1869 VirtualBox VM almost done. 2015-01-21 19:26:39 -07:00
f231b06833 No need for start_vm and stop_vm in the manager. 2015-01-21 17:41:35 -07:00
beb27b3f69 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-01-21 15:21:20 -07:00
0b1b27db8f Add module name to base manager. 2015-01-21 15:21:15 -07:00
0249a21409 Build doc 2015-01-21 22:33:41 +01:00
97cefa23fb Move fixtures to conftest 2015-01-21 22:32:33 +01:00
f3e07d5ad9 Fix random failure related to ports 2015-01-21 22:21:01 +01:00
8d9da999e6 Update examples only when launching test with documentation.sh 2015-01-21 22:09:52 +01:00
ef4ecbfb6a Improve VPCS port change test 2015-01-21 22:09:52 +01:00
7ce1cf3f84 Return correct status codes and fix tests. 2015-01-21 14:01:15 -07:00
368d1ff70b Update VPCS instance 2015-01-21 21:46:16 +01:00
7abb426d04 Get informations about a VPCS instance 2015-01-21 17:21:17 +01:00
ce9fd3cb25 Test start / stop. And check if the mocked function is really called 2015-01-21 17:11:21 +01:00
87a089457f Update script file 2015-01-21 16:43:34 +01:00
f99538ccef Cleanup test 2015-01-21 15:50:35 +01:00
df31b2ad5a Fix project path 2015-01-21 11:33:24 +01:00
ba91cbaac0 Remove find_unused_port from the attic. 2015-01-20 19:10:08 -07:00
7a19c9062e Pass *args to VM_CLASS.
Move Config the the base manager.
More checks for projects (UUID,  makedirs).
Return error 500 when a VMError exception is raised.
Some more progress to VirtualBox.
2015-01-20 19:02:22 -07:00
3530b85b56 Fix virtualbox test 2015-01-20 23:40:03 +01:00
061d3223a7 Merge remote-tracking branch 'origin/asyncio' into asyncio 2015-01-20 15:28:45 -07:00
17f6223fb1 Try to fix VirtualBox create test. 2015-01-20 15:28:40 -07:00
fc66e4592a VPCS is trully async 2015-01-20 23:27:28 +01:00
984d47f9c8 Test work without vpcs binary 2015-01-20 22:50:26 +01:00
0eaa7be86a PEP 8 Enforcer. 2015-01-20 22:13:58 +01:00
649d4e5143 Allow user to set console port 2015-01-20 20:54:46 +01:00
57c3463edc Ignore vpcs.hist 2015-01-20 20:11:39 +01:00
f2289874af Raise exception if we try to reserve an already reserve port 2015-01-20 20:09:20 +01:00
fa57485f11 Support script file 2015-01-20 19:56:18 +01:00
c30f7ce9a1 Fix tests 2015-01-20 19:23:35 +01:00
54eb8d9e81 Drop decorator for async test 2015-01-20 18:55:17 +01:00
db31afeb63 Merge branch 'master' into asyncio
Conflicts:
	gns3server/old_modules/qemu/qemu_vm.py
	gns3server/version.py
2015-01-20 16:45:09 +01:00
bbee5f90a0 Yet another PEP 8 :) 2015-01-20 16:37:18 +01:00
7cf409c392 Kill VPCS process when the server exit 2015-01-20 16:24:46 +01:00
531265eced Get a stable example between tests for project creation 2015-01-20 15:35:46 +01:00
78237e9fb6 Bold parameter in documentation in order to improve readability 2015-01-20 15:31:27 +01:00
f5ac73d1ca Fix documentation generation 2015-01-20 15:27:28 +01:00
0b97509a74 Do not color logger message 2015-01-20 15:18:57 +01:00
4488cc3960 Colored logs 2015-01-20 15:10:38 +01:00
db41076ce5 Use the project working directory for VPCS VM 2015-01-20 14:31:47 +01:00
f5ed9fbcf1 PEP 8 clean thanks to auto pep8 2015-01-20 13:24:00 +01:00
7f185663d1 VPCS Device => VPCS VM 2015-01-20 13:12:26 +01:00
68d0e5f42d PEP8 2015-01-20 13:04:20 +01:00
0695e75e77 Fix tests 2015-01-20 12:46:15 +01:00
927e6b540d Fix tests 2015-01-20 09:58:58 +01:00
7fff25a9a9 UUID support for VMs.
Basic VirtualBox support (create, start and stop).
Some refactoring for BaseVM class.
Updated CURL command in tests.
2015-01-19 18:30:57 -07:00
fe22576ae2 Some quick cleaning. 2015-01-19 14:43:35 -07:00
345b471c47 Drop unused code 2015-01-19 17:58:01 +01:00
78015b800e Install vpcs on travis 2015-01-19 17:56:38 +01:00
ed973dbcf2 Project handler use ProjectManager 2015-01-19 17:12:36 +01:00
f0094cc0d0 Project Manager 2015-01-19 17:07:32 +01:00
240d83411c Create a project entity 2015-01-19 16:23:41 +01:00
a9a09cc0bc Temporaru drop old tornado logging 2015-01-19 15:05:44 +01:00
a06d935ef4 Drop tornado 2015-01-19 14:21:08 +01:00
f0880c4a37 Drop queue codes because it's too specific 2015-01-19 13:47:20 +01:00
2c3b0061a2 Cleanup travis build 2015-01-19 11:58:22 +01:00
9e5a2fcc42 Skip .tox directory during tests 2015-01-19 11:37:24 +01:00
7de95cd60a Fix tests 2015-01-19 11:28:51 +01:00
73a481e510 Refactor port manager 2015-01-19 11:22:24 +01:00
ae8e2f4199 Prepare VirtualBox module. 2015-01-18 16:26:56 -07:00
b6212fc885 Improve Port Manager to handle UDP ports. 2015-01-18 15:41:53 -07:00
1900966751 Update documentation script to use Python3. 2015-01-18 13:58:19 -07:00
1cfce6ac5e Merge remote-tracking branch 'origin/asyncio' into asyncio
Conflicts:
	gns3server/handlers/vpcs_handler.py
	tests/api/test_version.py
	tests/api/test_vpcs.py
2015-01-18 12:23:42 -07:00
d142a9a885 Rename vpcs_id to id. Must be an integer in the route definition. 2015-01-18 12:12:11 -07:00
c47081f363 Bump version to 1.2.3 2015-01-16 17:58:09 -07:00
3793789732 Fixes broken -netdev + legacy virtio in Qemu support. 2015-01-16 17:44:07 -07:00
869ad026ff Do not add a show source in documenation 2015-01-16 21:59:51 +01:00
9f82f3826b Default doc style 2015-01-16 21:58:02 +01:00
2c9a802cca Default documentation theme 2015-01-16 21:53:04 +01:00
878532325a Nature 2015-01-16 21:48:03 +01:00
42920e5059 Haiku theme 2015-01-16 21:44:56 +01:00
77db08c39e Remove NIO from VPCS 2015-01-16 21:39:58 +01:00
8e307c8cbb Use PATH environnement variable for searching binary 2015-01-16 20:23:43 +01:00
4c010b466d Bump version to 1.2.3.dev1 2015-01-16 10:43:44 -07:00
bf6f62e629 Serialize NIO 2015-01-16 17:09:45 +01:00
0cdc1c3042 VCPS create NIO work and tested 2015-01-16 16:20:10 +01:00
aff834f565 Oops bad merge 2015-01-16 10:18:02 +01:00
7a767a6b92 Merge 1.2.2 into asyncio
Conflicts:
	gns3server/version.py
2015-01-16 09:43:58 +01:00
701a1626f7 Bump version to 1.2.2 2015-01-15 17:44:09 -07:00
2ee49fed57 Some cleaning. 2015-01-15 17:43:06 -07:00
9e83329f14 Rename Device to VM. 2015-01-15 16:50:36 -07:00
c1ef406311 A basic implementation of port manager 2015-01-15 16:59:01 +01:00
3abcac43ab Test the stop method 2015-01-15 14:27:33 +01:00
6bb2b88f1a It's was hard but i have finally a beginning of test for start VPCS 2015-01-15 13:02:43 +01:00
0afea48e63 Merge branch 'asyncio' of github.com:GNS3/gns3-server into asyncio 2015-01-15 10:15:30 +01:00
77686b35c2 Drop zmq and tornado from Readme 2015-01-15 10:13:12 +01:00
e6e83ffa8a Update the VM name in VirtualBox for linked clones. 2015-01-14 16:48:32 -07:00
5618556b42 Updates dependencies in setup.py 2015-01-14 15:05:33 -07:00
6c35cc304e Dirty stop start for VPCS 2015-01-14 18:52:02 +01:00
482fdf9031 Drop documentation it's already in script directory 2015-01-14 17:38:03 +01:00
1431c66c54 Documentation generation 2015-01-14 12:32:56 +01:00
aab944fb6c Move old test to old_tests directory 2015-01-14 11:43:23 +01:00
efad58a2af Enable travis for all branches 2015-01-14 10:39:46 +01:00
f1a9cc9f01 PEP8 2015-01-14 10:37:49 +01:00
1af5513c86 Update dependencies 2015-01-14 10:33:01 +01:00
369cd06279 Merge latest changes from the POC. 2015-01-13 18:26:32 -07:00
6d20a122f8 Adds tests and documentation script. 2015-01-13 17:26:24 -07:00
61344a1669 New base server. 2015-01-13 17:05:26 -07:00
5e665cc67a Update dependencies in setup.py 2015-01-13 13:39:06 -07:00
2bfe098866 Bump version to 1.2.2.dev2 2015-01-12 16:30:09 -07:00
2ef45781ad Checks connection failure to Qemu monitor. 2015-01-11 18:24:13 -07:00
14cc6d414f Merge pull request #63 from Raizo62/master
Add snapshot named reset to linked cloned Vbox
2015-01-11 17:16:16 -07:00
cbbb89f69c Add snapshot named reset to linked cloned Vbox 2015-01-11 12:22:59 +00:00
29896151e7 Support spaces in the controller name of VirtualBox clones. 2015-01-06 15:31:50 -07:00
7f6f7022b0 Support to run VirtualBox as another user. 2015-01-05 16:18:33 -07:00
c77ebca036 Merge pull request #62 from shmygov/qemunio
Dynamically configure network connections of running QEMU VMs
2015-01-05 15:46:09 -07:00
881cc6f592 Fixes wrong IOS config paths. 2015-01-04 18:51:55 -07:00
5265818365 Support for IOURC file on the server side. 2015-01-04 15:59:00 -07:00
d1e186317c Console switching from local/remote to remote/local while a VirtualBox VM is running. 2015-01-04 14:56:17 -07:00
a6fd457cff Bump the maximum network adapters to 32 for Qemu. 2015-01-03 16:16:07 -07:00
4eedc9c74c Dynamically configure network connections of running QEMU VMs (including new QEMU versions) 2015-01-03 05:04:52 +03:00
ccb4ccd612 Return QEMU monitor responses as Match Objects (more flexibility for future uses) 2014-12-29 01:59:45 +03:00
c775b05d33 Dynamically configure network connections of running QEMU VMs 2014-12-29 01:43:56 +03:00
9cedb1cc99 Add sleep after write to QEMU monitor (to work with new QEMU versions) 2014-12-27 12:44:10 +03:00
1f615430ae Checks for broken symbolic links. 2014-12-24 17:19:42 -07:00
2de1a97076 Merge remote-tracking branch 'origin/master' 2014-12-24 15:47:07 -07:00
747c0ee7a3 More checks on minimum RAM for IOS routers and updates default values to match the latest IOS image requirements. 2014-12-24 15:46:59 -07:00
d9f44edcaf Fixes incompatibility for IOS startup-config and private-config paths created on Windows and loaded from a project on Linux/Mac OS X. 2014-12-23 15:29:27 -07:00
e9991affc3 Merge pull request #60 from shmygov/suspendqemu
QEMU VM suspend/resume and reload
2014-12-23 12:27:18 -07:00
84511d7b39 QEMU VM suspend/resume and reload 2014-12-23 14:42:58 +03:00
3590985c07 Add QEMU monitor port to control running QEMU VMs 2014-12-23 14:42:58 +03:00
7785c03eac Ignore Unicode errors when executing vboxmanage. 2014-12-19 15:47:12 -07:00
7f37f649da Catch OSError exception for subprocess calls. 2014-12-11 12:15:24 -07:00
acb5103119 Merge remote-tracking branch 'origin/master' 2014-12-09 19:17:53 -07:00
823344bf44 Get Windows interface list from the registry if the COM service fails. 2014-12-09 19:17:25 -07:00
ecf7ebc26b Merge pull request #58 from dlintott/fix_gns3-gui_158
Remove extra line that was over-writing the auto Idle-PC value
2014-12-09 16:16:05 -07:00
317a37147e Remove extra line that was over-writing the auto Idle-PC value
Fixes GNS3/gns3-gui#158
2014-12-09 19:39:22 +00:00
0f238c5bb7 Merge pull request #54 from planctechnologies/dev
Qemu cloud improvements
2014-12-09 12:36:38 -07:00
93934cf554 Merge pull request #55 from dlintott/fix_broken_test
Update test with correct hypervisor IP
2014-12-09 12:36:01 -07:00
6a81390808 Update test with correct hypervisor IP 2014-12-09 13:49:45 +00:00
f1503ae655 Handle initrd and kernel paths in qemu 2014-12-08 20:14:55 -07:00
20592f72c0 Fixes UID bit test. 2014-12-08 14:54:06 -07:00
00f49e337d Merge branch 'master' into dev 2014-12-08 14:22:31 -07:00
fc04a94dce Bump version to 1.2.2.dev1 2014-12-05 13:53:30 -07:00
9ec1373d36 dms terminates instance if id matches 2014-11-24 16:49:01 -07:00
b220cffcf4 Updating dms to look for cloud_region instead of region 2014-11-24 16:40:55 -07:00
7ef8dd794a Copy updated cloud/ module from gns3-gui 2014-11-24 16:24:57 -07:00
b9a4531544 Ensuring dead_time is an integer 2014-11-24 15:35:09 -07:00
cfdff773c4 deadtime -> dead_time 2014-11-24 15:08:58 -07:00
ef8c6b603c Add debugging to deadman process 2014-11-24 14:32:06 -07:00
1566 changed files with 178355 additions and 27749 deletions

2
.coveragerc Normal file
View File

@ -0,0 +1,2 @@
[paths]
source = gns3server

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
gns3server/version.py merge=ours

View File

@ -0,0 +1,16 @@
name: Add new issues to GNS3 project
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.1
with:
project-url: https://github.com/orgs/GNS3/projects/3
github-token: ${{ secrets.ADD_NEW_ISSUES_TO_PROJECT }}

93
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,93 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '21 12 * * 4'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@ -0,0 +1,40 @@
name: publish-api-documentation
on:
workflow_dispatch:
push:
tags:
- v3.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "gh-pages"
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Merge changes from 3.0 branch
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git merge origin/3.0 -X theirs
- name: Install GNS3 server and dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Generate the API documentation
run: |
cd scripts
python3 publish_api_documentation.py
- name: Publish the API documentation
run: |
git add docs
git status
git commit -m "Publish API documentation"
git push

55
.github/workflows/testing.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: testing
on:
push:
branches:
- master
- 3.0
pull_request:
branches:
- master
- 3.0
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
#include:
# only test with Python 3.10 on Windows
# - os: windows-latest
# python-version: "3.10"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Install Windows specific dependencies
if: runner.os == 'Windows'
run: |
python -m pip install -r win-requirements.txt
curl -O "http://www.win10pcap.org/download/Win10Pcap-v10.2-5002.msi"
msiexec /i "Win10Pcap-v10.2-5002.msi" /qn /norestart
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest -vv

29
.gitignore vendored
View File

@ -1,4 +1,15 @@
*.py[cod]
__pycache__
.pytest_cache
#py.test
.cache
# environment file
.env
# hypothesis files
.hypothesis
# C extensions
*.so
@ -10,7 +21,6 @@ dist
build
eggs
parts
bin
var
sdist
develop-eggs
@ -23,7 +33,9 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.coverage*
.tox
.cache
nosetests.xml
# Translations
@ -34,9 +46,24 @@ nosetests.xml
.project
.pydevproject
.settings
.vscode
# Pycharm
.idea
# Gedit Backup Files
*~
#Documentation build
docs/_build
#VPCS
vpcs.hist
startup.vpcs
.gns3_shell_history
# Virtualenv
env
venv
*venv
.ropeproject

View File

@ -1,29 +0,0 @@
language: python
env:
- TOX_ENV=py33
- TOX_ENV=py34
before_install:
- sudo add-apt-repository ppa:gns3/ppa -y
- sudo apt-get update -q
install:
- pip install tox
- sudo apt-get install vpcs dynamips
script:
- tox -e $TOX_ENV
branches:
only:
- master
notifications:
email: false
irc:
channels:
- "chat.freenode.net#gns3"
on_success: change
on_failure: always

14
.whitesource Normal file
View File

@ -0,0 +1,14 @@
{
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken" : "",
"baseBranches": ["master", "2.2", "3.0"]
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}

View File

@ -1 +0,0 @@
Jeremy Grossmann

2656
CHANGELOG Normal file

File diff suppressed because it is too large Load Diff

54
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,54 @@
# Contributing to GNS3
We welcome contributions and bugs reports from everyone.
We are friendly so don't be afraid to ask questions.
## Bug reports
Before reporting an issue:
* check our website over at https://gns3.com
* check if an issue already exists on https://github.com/GNS3/gns3-gui
* check if an issue already exists on https://github.com/GNS3/gns3-server
Please post on our community website if you are unsure you found a bug,
you will get faster support and be able to exchange with more users.
If you are unsure which project you should create an issue for, just do
it on https://github.com/GNS3/gns3-gui we will take care of the triage.
For bugs specific to the GNS3 VM, please report on https://github.com/GNS3/gns3-vm
## Security issues
For security issues please keep it private and send an email to developers@gns3.net
## Asking for new features
The best is to start a discussion on the community website in order to get feedback
from the whole community.
## Contributing code
We welcome code contribution from everyone including beginners.
Don't be afraid to submit a half finished or mediocre contribution and we will help you.
Don't hesitate to share your plans before starting working on a contribution, we can help
you to find the best approach.
### Contributors License Agreements
We at GNS3 are eager to work with you. For small changeslittle bugfixes, correcting typos, and the likeplease just submit pull requests to any of our projects. For larger changes, though, we have to ask you to jump through a little hoop.
In particular, in order for us to accept any major patches from you, you will have to electronically sign a statement that indicates two things:
- You are willingly licensing your contributions under the terms of the open source license of the project that youre contributing to.
- You are legally able to license your contributions as stated.
The reason we do this is to ensure, to the extent possible, that we dont “taint” the projects we manage with contributions that turn out to be improper. This protects everyone who wants to use the projects, including you!
More information there: https://github.com/GNS3/cla
### Pull requests
Creating a pull request is the easiest way to contribute code. Do not hesitate to create one early when contributing for new feature in order to get our feedback.

37
Dockerfile Normal file
View File

@ -0,0 +1,37 @@
FROM ubuntu:focal
WORKDIR /gns3server
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
locales \
locales-all
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
COPY ./requirements.txt /gns3server/requirements.txt
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
locales \
software-properties-common \
python3-pip \
python3-all \
python3-setuptools \
python3-dev \
busybox-static \
gcc \
qemu-kvm \
libvirt-daemon-system
RUN add-apt-repository ppa:gns3/ppa && apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
vpcs \
ubridge \
dynamips
COPY . /gns3server
RUN mkdir -p ~/.config/GNS3/3.0/
RUN cp scripts/gns3_server.conf ~/.config/GNS3/3.0/
RUN python3 -m pip install .

View File

@ -1,11 +1,7 @@
include README.rst
include AUTHORS
include INSTALL
include README.md
include LICENSE
include MANIFEST.in
include tox.ini
recursive-exclude tests *
recursive-include docs *
include CHANGELOG
recursive-include gns3server *
recursive-exclude docs *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

134
README.md Normal file
View File

@ -0,0 +1,134 @@
# GNS3 server repository
[![Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![GitHub Actions tests](https://github.com/GNS3/gns3-server/workflows/testing/badge.svg?branch=3.0)](https://github.com/GNS3/gns3-server/actions?query=workflow%3Atesting+branch%3A3.0)
[![Latest PyPi version](https://img.shields.io/pypi/v/gns3-server.svg)](https://pypi.python.org/pypi/gns3-server)
[![Snyk scanning](https://snyk.io/test/github/GNS3/gns3-server/badge.svg)](https://snyk.io/test/github/GNS3/gns3-server)
The GNS3 server manages emulators and other virtualization software such as Dynamips, Qemu/KVM, Docker, VPCS, VirtualBox and VMware Workstation.
Clients like the [GNS3 GUI](https://github.com/GNS3/gns3-gui/) and the [GNS3 Web UI](https://github.com/GNS3/gns3-web-ui/) control the server using a HTTP REST API.
## Installation
These instructions are for using GNS3, please see below for development.
### Windows & macOS
Please use our [Windows installer or DMG package](https://gns3.com/software/download) to install the stable build along with the GNS3 VM.
Note that as of GNS3 version above 3.0, you must run the server using the GNS3 VM or on a Linux system (remote, cloud or virtual machine).
### Linux
#### Ubuntu based distributions
We build and test packages for actively supported Ubuntu versions.
Other distros based on Ubuntu, like Mint, should also be supported.
Packages can be installed from our Personal Package Archives (PPA) repository:
```shell
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:gns3/ppa
sudo apt update
sudo apt install gns3-gui gns3-server
```
#### Other Linux distributions
GNS3 is often packaged for other distributions by third-parties:
* [Gentoo](https://packages.gentoo.org/package/net-misc/gns3-server)
* [Alpine](https://pkgs.alpinelinux.org/package/v3.10/community/x86_64/gns3-server)
* [NixOS](https://search.nixos.org/packages?channel=21.11&from=0&size=50&sort=relevance&type=packages&query=gns3-server)
#### PyPi
You may use PyPi in case no package is provided, or you would like to do a manual installation:
* https://pypi.org/project/gns3-server/
* https://pypi.org/project/gns3-gui/
```shell
python3 -m pip install gns3-gui
python3 -m pip install gns3-server
```
The downside of this method is you will have to manually install all dependencies (see below).
Please see our [documentation](https://docs.gns3.com/docs/getting-started/installation/linux) for more details.
### Software dependencies
In addition to Python dependencies, other software may be required, recommended or optional.
* [uBridge](https://github.com/GNS3/ubridge/) is required, it interconnects the nodes.
* [Dynamips](https://github.com/GNS3/dynamips/) is required for running IOS routers (using real IOS images) as well as the internal switches and hubs.
* [VPCS](https://github.com/GNS3/vpcs/) is recommended, it is a builtin node simulating a very simple computer to perform connectivity tests using ping, traceroute etc.
* Qemu is strongly recommended as most node types are based on Qemu, for example Cisco IOSv and Arista vEOS.
* libvirt is recommended as it's needed for the NAT cloud.
* Docker is optional, some nodes are based on Docker.
* mtools is recommended to support data transfer to/from QEMU VMs using virtual disks.
* i386-libraries of libc and libcrypto are optional, they are only needed to run IOU based nodes.
Note that Docker needs the script program (`bsdutils` or `util-linux` package), when running a Docker VM and a static busybox during installation (python3 setup.py install / pip3 install / package creation).
## Development
### Setting up
These commands will install the server as well as all Python dependencies:
```shell
git clone https://github.com/GNS3/gns3-server
cd gns3-server
git checkout 3.0
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
python3 -m pip install .
python3 -m gns3server
```
You will have to manually install other software dependencies (see above), for Dynamips, VPCS and uBridge the easiest is to install from our PPA.
### Docker container
Alternatively, you can run the GNS3 server in a container
```shell
bash scripts/docker_dev_server.sh
```
### Running tests
First, install the development dependencies:
```shell
python3 -m pip install -r dev-requirements.txt
```
Then run the tests using pytest:
```shell
python3 -m pytest -vv tests/
```
### API documentation
The API documentation can be accessed when running the server locally:
* On `http://IP:PORT/docs` to see with Swagger UI (i.e. `http://localhost:3080/docs`)
* On `http://IP:PORT/redoc` to see with ReDoc (i.e. `http://localhost:3080/redoc`)
The documentation can also be viewed [online](http://apiv3.gns3.net) however it may not be the most up-to-date version since it needs manually synchronization with the current code. Also, you cannot use this to interact with a GNS3 server.
### Branches
#### master
master is the next stable release, you can test it in your day-to -day activities.
Bug fixes or small improvements pull requests go here.
3.x development brand for the next major release.
**Never** use this branch for production. Pull requests for major new features go here.

View File

@ -1,64 +0,0 @@
GNS3-server
===========
This is the GNS3 server repository.
The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM.
Clients like the GNS3 GUI controls the server using a JSON-RPC API over Websockets.
You will need the GNS3 GUI (gns3-gui repository) to control the server.
Linux (Debian based)
--------------------
The following instructions have been tested with Ubuntu and Mint.
You must be connected to the Internet in order to install the dependencies.
Dependencies:
- Python 3.3 or above
- Setuptools
- PyZMQ library
- Netifaces library
- Tornado
- Jsonschema
The following commands will install some of these dependencies:
.. code:: bash
sudo apt-get install python3-setuptools
sudo apt-get install python3-zmq
sudo apt-get install python3-netifaces
Finally these commands will install the server as well as the rest of the dependencies:
.. code:: bash
cd gns3-server-master
sudo python3 setup.py install
gns3server
Windows
-------
Please use our all-in-one installer.
Mac OS X
--------
Please use our DMG package for a simple installation.
If you want to test the current git version or contribute to the project.
You can follow this instructions with virtualenwrapper: http://virtualenvwrapper.readthedocs.org/
and homebrew: http://brew.sh/.
.. code:: bash
brew install python3
mkvirtualenv gns3-server --python=/usr/local/bin/python3.4
python3 setup.py install
gns3server

17
SECURITY.md Normal file
View File

@ -0,0 +1,17 @@
# Security Policy
## Supported Versions
These are the versions of the GNS3 server that are
currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 3.x.x | :white_check_mark: |
| 2.2.x | :white_check_mark: |
| 2.1.x | :x: |
| 1.x.x | :x: |
## Reporting a Vulnerability
Please use GitHub's report a vulnerability feature. More information can be found in https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability

View File

@ -1,5 +0,0 @@
export OS_USERNAME=username
export OS_PASSWORD=""
export OS_TENANT_NAME=000000
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
export OS_REGION_NAME=ord

View File

@ -1,243 +0,0 @@
""" Create a new GNS3 Server Rackspace image with the provided options. """
import argparse
import getpass
import os
import sys
import uuid
from fabric.api import env
from fabric.contrib.files import exists
from github import Github
from novaclient.v1_1 import client
from string import Template
from time import sleep
POLL_SEC = 20
GNS3_REPO = 'gns3/gns3-server'
PLANC_REPO = 'planctechnologies/gns3-server'
OS_AUTH_URL = 'https://identity.api.rackspacecloud.com/v2.0/'
UBUNTU_BASE_ID = '5cc098a5-7286-4b96-b3a2-49f4c4f82537'
def main():
"""
Get the user options and perform the image creation.
Creates a new instance, installs the required software, creates an image
from the instance, and then deletes the instance.
"""
github = Github()
args = get_cli_args()
if args.username:
username = args.username
else:
if 'OS_USERNAME' in os.environ:
username = os.environ.get('OS_USERNAME')
else:
username = raw_input('Enter Rackspace username: ')
if args.password:
password = args.password
else:
if 'OS_PASSWORD' in os.environ:
password = os.environ.get('OS_PASSWORD')
else:
password = getpass.getpass('Enter Rackspace password: ')
if args.tenant:
tenant = args.tenant
else:
if 'OS_TENANT_NAME' in os.environ:
tenant = os.environ.get('OS_TENANT_NAME')
else:
tenant = raw_input('Enter Rackspace Tenant ID: ')
if args.region:
region = args.region
else:
if 'OS_REGION_NAME' in os.environ:
region = os.environ.get('OS_REGION_NAME')
else:
region = raw_input('Enter Rackspace Region Name: ')
if args.source == 'release':
# get the list of releases, present them to the user, save the url
repo = github.get_repo(GNS3_REPO)
keyword = "tag"
i = 1
branch_opts = {}
for tag in repo.get_tags():
branch_opts[i] = tag.name
i += 1
elif args.source == 'dev':
# get the list of dev branches, present them to the user, save the url
repo = github.get_repo(PLANC_REPO)
keyword = "branch"
i = 1
branch_opts = {}
for branch in repo.get_branches():
branch_opts[i] = branch.name
i += 1
prompt_text = "Select a %s" % keyword
selected_branch = prompt_user_select(branch_opts, prompt_text)
if args.image_name:
image_name = args.image_name
else:
image_name = "gns3-%s-%s-%s" % (args.source, selected_branch,
uuid.uuid4().hex[0:4])
if args.on_boot:
on_boot = True
else:
on_boot = False
startup_script = create_script(repo.svn_url, selected_branch, on_boot)
server_name = uuid.uuid4().hex
instance = create_instance(username, password, tenant, region, server_name,
startup_script)
passwd = uuid.uuid4().hex
instance.change_password(passwd)
# wait for the password change to be processed. Continuing while
# a password change is processing will cause image creation to fail.
sleep(POLL_SEC*6)
env.host_string = str(instance.accessIPv4)
env.user = "root"
env.password = passwd
sys.stdout.write("Installing software...")
sys.stdout.flush()
while True:
if exists('/tmp/gns-install-complete'):
break
sleep(POLL_SEC)
sys.stdout.write(".")
sys.stdout.flush()
print("Done.")
image_id = create_image(username, password, tenant, region, instance,
image_name)
instance.delete()
def prompt_user_select(opts, text="Please select"):
""" Ask the user to select an option from the provided list. """
print("%s" % text)
print("=" * len(text))
for o in opts:
print("(%s)\t%s" % (o, opts[o]))
while True:
selected = raw_input("Select: ")
try:
return opts[int(selected)]
except (KeyError, ValueError):
print("Invalid selection. Try again")
def create_instance(username, password, tenant, region, server_name, script,
auth_url=OS_AUTH_URL):
""" Create a new instance. """
sys.stdout.write("Creating instance...")
sys.stdout.flush()
nc = client.Client(username, password, tenant, auth_url,
region_name=region)
server = nc.servers.create(server_name, UBUNTU_BASE_ID, 2,
config_drive=True, userdata=script)
while True:
server = nc.servers.get(server.id)
if server.status == 'ACTIVE':
break
sleep(POLL_SEC)
sys.stdout.write(".")
sys.stdout.flush()
print("Done.")
return server
def create_script(git_url, git_branch, on_boot):
""" Create the start-up script. """
script_template = Template(open('script_template', 'r').read())
params = {'git_url': git_url, 'git_branch': git_branch, 'rc_local': ''}
if on_boot:
params['rc_local'] = "echo '/usr/local/bin/gns3-server' >> /etc/rc.local"
return script_template.substitute(params)
def create_image(username, password, tenant, region, server,
image_name, auth_url=OS_AUTH_URL):
""" Create a Rackspace image based on the server instance. """
nc = client.Client(username, password, tenant, auth_url,
region_name=region)
sys.stdout.write("Creating image %s..." % image_name)
sys.stdout.flush()
image_id = server.create_image(image_name)
while True:
server = nc.servers.get(server.id)
if getattr(server, 'OS-EXT-STS:task_state') is None:
break
sleep(POLL_SEC)
sys.stdout.write(".")
sys.stdout.flush()
print("Done.")
return image_id
def get_cli_args():
""" Parse the CLI input. """
parser = argparse.ArgumentParser(
description='Create a new GNS3 image',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
'--rackspace_username', dest='username', action='store')
parser.add_argument(
'--rackspace_password', dest='password', action='store')
parser.add_argument(
'--rackspace_tenant', dest='tenant', action='store')
parser.add_argument(
'--rackspace_region', dest='region', action='store')
parser.add_argument(
'--source', dest='source', action='store', choices=['release', 'dev'],
default='release', help='specify the gns3-server source location')
parser.add_argument(
'--branch', dest='branch', action='store',
help='specify the branch/tag')
parser.add_argument(
'--start-on-boot', dest='on_boot', action='store_true',
default=False, help='start the GNS3-server when the image boots')
parser.add_argument(
'--image-name', dest='image_name', action='store',
help='the name of the image to be created')
return parser.parse_args()
if __name__ == "__main__":
main()

View File

@ -1,3 +0,0 @@
fabric
pygithub
python-novaclient

View File

@ -1,10 +0,0 @@
create_image.py:
- uses fabric, which doesn't support Python 3
- prompts for Rackspace credentials if environment variables not set
- see .novarc for example env variables
- note that the novaclient library uses the Rackspace password and -not-
the API key
- use '--help' for help with arguments

View File

@ -1,19 +0,0 @@
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get -o Dpkg::Options::="--force-confnew" --force-yes -fuy dist-upgrade
apt-get -y install git
apt-get -y install python3-setuptools
apt-get -y install python3-netifaces
apt-get -y install python3-pip
mkdir -p /opt/gns3
pushd /opt/gns3
git clone --branch ${git_branch} ${git_url}
cd gns3-server
pip3 install -r dev-requirements.txt
python3 ./setup.py install
${rc_local}
touch /tmp/gns-install-complete

View File

@ -1,4 +1,7 @@
-rrequirements.txt
pytest
ws4py
pytest==8.3.3
flake8==7.1.1
pytest-timeout==2.3.1
pytest-asyncio==0.21.2
requests==2.32.3
httpx==0.27.2 # version 0.24.1 is required by httpx_ws
httpx_ws==0.6.2

15
docker-compose.yml Normal file
View File

@ -0,0 +1,15 @@
version: '3.7'
services:
gns3server:
privileged: true
build:
context: .
dockerfile: Dockerfile
volumes:
- ./gns3server:/server/
- /var/run/docker.sock:/var/run/docker.sock
command: python3 -m gns3server --local --port 3080
ports:
- 3080:3080
- 5000-5100:5000-5100

1
docs/CNAME Normal file
View File

@ -0,0 +1 @@
apiv3.gns3.net

28
docs/index.html Normal file
View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>GNS3 controller API - ReDoc</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc spec-url="openapi.json"></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
</body>
</html>

1
docs/openapi.json Normal file

File diff suppressed because one or more lines are too long

31
docs/redoc.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.30.0/swagger-ui.css">
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
<title>GNS3 controller API - Swagger UI</title>
</head>
<body>
<div id="swagger-ui">
</div>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.30.0/swagger-ui-bundle.js"></script>
<!-- `SwaggerUIBundle` is now available on the page -->
<script>
const ui = SwaggerUIBundle({
url: 'openapi.json',
oauth2RedirectUrl: window.location.origin + '/docs/oauth2-redirect',
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
],
layout: "BaseLayout",
deepLinking: true,
showExtensions: true,
showCommonExtensions: true
})
</script>
</body>
</html>

View File

@ -1,289 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
Base cloud controller class.
Base class for interacting with Cloud APIs to create and manage cloud
instances.
"""
from collections import namedtuple
import hashlib
import os
import logging
from io import StringIO, BytesIO
from libcloud.compute.base import NodeAuthSSHKey
from libcloud.storage.types import ContainerAlreadyExistsError, ContainerDoesNotExistError
from .exceptions import ItemNotFound, KeyPairExists, MethodNotAllowed
from .exceptions import OverLimit, BadRequest, ServiceUnavailable
from .exceptions import Unauthorized, ApiError
KeyPair = namedtuple("KeyPair", ['name'], verbose=False)
log = logging.getLogger(__name__)
def parse_exception(exception):
"""
Parse the exception to separate the HTTP status code from the text.
Libcloud raises many exceptions of the form:
Exception("<http status code> <http error> <reponse body>")
in lieu of raising specific incident-based exceptions.
"""
e_str = str(exception)
try:
status = int(e_str[0:3])
error_text = e_str[3:]
except ValueError:
status = None
error_text = e_str
return status, error_text
class BaseCloudCtrl(object):
""" Base class for interacting with a cloud provider API. """
http_status_to_exception = {
400: BadRequest,
401: Unauthorized,
404: ItemNotFound,
405: MethodNotAllowed,
413: OverLimit,
500: ApiError,
503: ServiceUnavailable
}
GNS3_CONTAINER_NAME = 'GNS3'
def __init__(self, username, api_key):
self.username = username
self.api_key = api_key
def _handle_exception(self, status, error_text, response_overrides=None):
""" Raise an exception based on the HTTP status. """
if response_overrides:
if status in response_overrides:
raise response_overrides[status](error_text)
raise self.http_status_to_exception[status](error_text)
def authenticate(self):
""" Validate cloud account credentials. Return boolean. """
raise NotImplementedError
def list_sizes(self):
""" Return a list of NodeSize objects. """
return self.driver.list_sizes()
def list_flavors(self):
""" Return an iterable of flavors """
raise NotImplementedError
def create_instance(self, name, size_id, image_id, keypair):
"""
Create a new instance with the supplied attributes.
Return a Node object.
"""
try:
image = self.get_image(image_id)
if image is None:
raise ItemNotFound("Image not found")
size = self.driver.ex_get_size(size_id)
args = {
"name": name,
"size": size,
"image": image,
}
if keypair is not None:
auth_key = NodeAuthSSHKey(keypair.public_key)
args["auth"] = auth_key
args["ex_keyname"] = name
return self.driver.create_node(**args)
except Exception as e:
status, error_text = parse_exception(e)
if status:
self._handle_exception(status, error_text)
else:
log.error("create_instance method raised an exception: {}".format(e))
log.error('image id {}'.format(image))
def delete_instance(self, instance):
""" Delete the specified instance. Returns True or False. """
try:
return self.driver.destroy_node(instance)
except Exception as e:
status, error_text = parse_exception(e)
if status:
self._handle_exception(status, error_text)
else:
raise e
def get_instance(self, instance):
""" Return a Node object representing the requested instance. """
for i in self.driver.list_nodes():
if i.id == instance.id:
return i
raise ItemNotFound("Instance not found")
def list_instances(self):
""" Return a list of instances in the current region. """
try:
return self.driver.list_nodes()
except Exception as e:
log.error("list_instances returned an error: {}".format(e))
def create_key_pair(self, name):
""" Create and return a new Key Pair. """
response_overrides = {
409: KeyPairExists
}
try:
return self.driver.create_key_pair(name)
except Exception as e:
status, error_text = parse_exception(e)
if status:
self._handle_exception(status, error_text, response_overrides)
else:
raise e
def delete_key_pair(self, keypair):
""" Delete the keypair. Returns True or False. """
try:
return self.driver.delete_key_pair(keypair)
except Exception as e:
status, error_text = parse_exception(e)
if status:
self._handle_exception(status, error_text)
else:
raise e
def delete_key_pair_by_name(self, keypair_name):
""" Utility method to incapsulate boilerplate code """
kp = KeyPair(name=keypair_name)
return self.delete_key_pair(kp)
def list_key_pairs(self):
""" Return a list of Key Pairs. """
return self.driver.list_key_pairs()
def upload_file(self, file_path, folder):
"""
Uploads file to cloud storage (if it is not identical to a file already in cloud storage).
:param file_path: path to file to upload
:param folder: folder in cloud storage to save file in
:return: True if file was uploaded, False if it was skipped because it already existed and was identical
"""
try:
gns3_container = self.storage_driver.create_container(self.GNS3_CONTAINER_NAME)
except ContainerAlreadyExistsError:
gns3_container = self.storage_driver.get_container(self.GNS3_CONTAINER_NAME)
with open(file_path, 'rb') as file:
local_file_hash = hashlib.md5(file.read()).hexdigest()
cloud_object_name = folder + '/' + os.path.basename(file_path)
cloud_hash_name = cloud_object_name + '.md5'
cloud_objects = [obj.name for obj in gns3_container.list_objects()]
# if the file and its hash are in object storage, and the local and storage file hashes match
# do not upload the file, otherwise upload it
if cloud_object_name in cloud_objects and cloud_hash_name in cloud_objects:
hash_object = gns3_container.get_object(cloud_hash_name)
cloud_object_hash = ''
for chunk in hash_object.as_stream():
cloud_object_hash += chunk.decode('utf8')
if cloud_object_hash == local_file_hash:
return False
file.seek(0)
self.storage_driver.upload_object_via_stream(file, gns3_container, cloud_object_name)
self.storage_driver.upload_object_via_stream(StringIO(local_file_hash), gns3_container, cloud_hash_name)
return True
def list_projects(self):
"""
Lists projects in cloud storage
:return: List of (project name, object name in storage)
"""
try:
gns3_container = self.storage_driver.get_container(self.GNS3_CONTAINER_NAME)
projects = [
(obj.name.replace('projects/', '').replace('.zip', ''), obj.name)
for obj in gns3_container.list_objects()
if obj.name.startswith('projects/') and obj.name[-4:] == '.zip'
]
return projects
except ContainerDoesNotExistError:
return []
def download_file(self, file_name, destination=None):
"""
Downloads file from cloud storage
:param file_name: name of file in cloud storage to download
:param destination: local path to save file to (if None, returns file contents as a file-like object)
:return: A file-like object if file contents are returned, or None if file is saved to filesystem
"""
gns3_container = self.storage_driver.get_container(self.GNS3_CONTAINER_NAME)
storage_object = gns3_container.get_object(file_name)
if destination is not None:
storage_object.download(destination)
else:
contents = b''
for chunk in storage_object.as_stream():
contents += chunk
return BytesIO(contents)

View File

@ -1,45 +0,0 @@
""" Exception classes for CloudCtrl classes. """
class ApiError(Exception):
""" Raised when the server returns 500 Compute Error. """
pass
class BadRequest(Exception):
""" Raised when the server returns 400 Bad Request. """
pass
class ComputeFault(Exception):
""" Raised when the server returns 400|500 Compute Fault. """
pass
class Forbidden(Exception):
""" Raised when the server returns 403 Forbidden. """
pass
class ItemNotFound(Exception):
""" Raised when the server returns 404 Not Found. """
pass
class KeyPairExists(Exception):
""" Raised when the server returns 409 Conflict Key pair exists. """
pass
class MethodNotAllowed(Exception):
""" Raised when the server returns 405 Method Not Allowed. """
pass
class OverLimit(Exception):
""" Raised when the server returns 413 Over Limit. """
pass
class ServerCapacityUnavailable(Exception):
""" Raised when the server returns 503 Server Capacity Uavailable. """
pass
class ServiceUnavailable(Exception):
""" Raised when the server returns 503 Service Unavailable. """
pass
class Unauthorized(Exception):
""" Raised when the server returns 401 Unauthorized. """
pass

View File

@ -1,311 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Interacts with Rackspace API to create and manage cloud instances. """
from .base_cloud_ctrl import BaseCloudCtrl
import json
import requests
from libcloud.compute.drivers.rackspace import ENDPOINT_ARGS_MAP
from libcloud.compute.providers import get_driver
from libcloud.compute.types import Provider
from libcloud.storage.providers import get_driver as get_storage_driver
from libcloud.storage.types import Provider as StorageProvider
from .exceptions import ItemNotFound, ApiError
from ..version import __version__
from collections import OrderedDict
import logging
log = logging.getLogger(__name__)
RACKSPACE_REGIONS = [{ENDPOINT_ARGS_MAP[k]['region']: k} for k in
ENDPOINT_ARGS_MAP]
class RackspaceCtrl(BaseCloudCtrl):
""" Controller class for interacting with Rackspace API. """
def __init__(self, username, api_key, gns3_ias_url):
super(RackspaceCtrl, self).__init__(username, api_key)
self.gns3_ias_url = gns3_ias_url
# set this up so it can be swapped out with a mock for testing
self.post_fn = requests.post
self.driver_cls = get_driver(Provider.RACKSPACE)
self.storage_driver_cls = get_storage_driver(StorageProvider.CLOUDFILES)
self.driver = None
self.storage_driver = None
self.region = None
self.instances = {}
self.authenticated = False
self.identity_ep = \
"https://identity.api.rackspacecloud.com/v2.0/tokens"
self.regions = []
self.token = None
self.tenant_id = None
self.flavor_ep = "https://dfw.servers.api.rackspacecloud.com/v2/{username}/flavors"
self._flavors = OrderedDict([
('2', '512MB, 1 VCPU'),
('3', '1GB, 1 VCPU'),
('4', '2GB, 2 VCPUs'),
('5', '4GB, 2 VCPUs'),
('6', '8GB, 4 VCPUs'),
('7', '15GB, 6 VCPUs'),
('8', '30GB, 8 VCPUs'),
('performance1-1', '1GB Performance, 1 VCPU'),
('performance1-2', '2GB Performance, 2 VCPUs'),
('performance1-4', '4GB Performance, 4 VCPUs'),
('performance1-8', '8GB Performance, 8 VCPUs'),
('performance2-15', '15GB Performance, 4 VCPUs'),
('performance2-30', '30GB Performance, 8 VCPUs'),
('performance2-60', '60GB Performance, 16 VCPUs'),
('performance2-90', '90GB Performance, 24 VCPUs'),
('performance2-120', '120GB Performance, 32 VCPUs',)
])
def authenticate(self):
"""
Submit username and api key to API service.
If authentication is successful, set self.regions and self.token.
Return boolean.
"""
self.authenticated = False
if len(self.username) < 1:
return False
if len(self.api_key) < 1:
return False
data = json.dumps({
"auth": {
"RAX-KSKEY:apiKeyCredentials": {
"username": self.username,
"apiKey": self.api_key
}
}
})
headers = {
'Content-type': 'application/json',
'Accept': 'application/json'
}
response = self.post_fn(self.identity_ep, data=data, headers=headers)
if response.status_code == 200:
api_data = response.json()
self.token = self._parse_token(api_data)
if self.token:
self.authenticated = True
user_regions = self._parse_endpoints(api_data)
self.regions = self._make_region_list(user_regions)
self.tenant_id = self._parse_tenant_id(api_data)
else:
self.regions = []
self.token = None
response.connection.close()
return self.authenticated
def list_regions(self):
""" Return a list the regions available to the user. """
return self.regions
def list_flavors(self):
""" Return the dictionary containing flavors id and names """
return self._flavors
def _parse_endpoints(self, api_data):
"""
Parse the JSON-encoded data returned by the Identity Service API.
Return a list of regions available for Compute v2.
"""
region_codes = []
for ep_type in api_data['access']['serviceCatalog']:
if ep_type['name'] == "cloudServersOpenStack" \
and ep_type['type'] == "compute":
for ep in ep_type['endpoints']:
if ep['versionId'] == "2":
region_codes.append(ep['region'])
return region_codes
def _parse_token(self, api_data):
""" Parse the token from the JSON-encoded data returned by the API. """
try:
token = api_data['access']['token']['id']
except KeyError:
return None
return token
def _parse_tenant_id(self, api_data):
""" """
try:
roles = api_data['access']['user']['roles']
for role in roles:
if 'tenantId' in role and role['name'] == 'compute:default':
return role['tenantId']
return None
except KeyError:
return None
def _make_region_list(self, region_codes):
"""
Make a list of regions for use in the GUI.
Returns a list of key-value pairs in the form:
<API's Region Name>: <libcloud's Region Name>
eg,
[
{'DFW': 'dfw'}
{'ORD': 'ord'},
...
]
"""
region_list = []
for ep in ENDPOINT_ARGS_MAP:
if ENDPOINT_ARGS_MAP[ep]['region'] in region_codes:
region_list.append({ENDPOINT_ARGS_MAP[ep]['region']: ep})
return region_list
def set_region(self, region):
""" Set self.region and self.driver. Returns True or False. """
try:
self.driver = self.driver_cls(self.username, self.api_key,
region=region)
self.storage_driver = self.storage_driver_cls(self.username, self.api_key,
region=region)
except ValueError:
return False
self.region = region
return True
def _get_shared_images(self, username, region, gns3_version):
"""
Given a GNS3 version, ask gns3-ias to share compatible images
Response:
[{"created_at": "", "schema": "", "status": "", "member_id": "", "image_id": "", "updated_at": ""},]
or, if access was already asked
[{"image_id": "", "member_id": "", "status": "ALREADYREQUESTED"},]
"""
endpoint = self.gns3_ias_url+"/images/grant_access"
params = {
"user_id": username,
"user_region": region.upper(),
"gns3_version": gns3_version,
}
try:
response = requests.get(endpoint, params=params)
except requests.ConnectionError:
raise ApiError("Unable to connect to IAS")
status = response.status_code
if status == 200:
return response.json()
elif status == 404:
raise ItemNotFound()
else:
raise ApiError("IAS status code: %d" % status)
def list_images(self):
"""
Return a dictionary containing RackSpace server images
retrieved from gns3-ias server
"""
if not (self.tenant_id and self.region):
return {}
try:
shared_images = self._get_shared_images(self.tenant_id, self.region, __version__)
images = {}
for i in shared_images:
images[i['image_id']] = i['image_name']
return images
except ItemNotFound:
return {}
except ApiError as e:
log.error('Error while retrieving image list: %s' % e)
return {}
def get_image(self, image_id):
return self.driver.get_image(image_id)
def get_provider(cloud_settings):
"""
Utility function to retrieve a cloud provider instance already authenticated and with the
region set
:param cloud_settings: cloud settings dictionary
:return: a provider instance or None on errors
"""
try:
username = cloud_settings['cloud_user_name']
apikey = cloud_settings['cloud_api_key']
region = cloud_settings['cloud_region']
ias_url = cloud_settings.get('gns3_ias_url', '')
except KeyError as e:
log.error("Unable to create cloud provider: {}".format(e))
return
provider = RackspaceCtrl(username, apikey, ias_url)
if not provider.authenticate():
log.error("Authentication failed for cloud provider")
return
if not region:
region = provider.list_regions().values()[0]
if not provider.set_region(region):
log.error("Unable to set cloud provider region")
return
return provider

View File

@ -1,401 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# __version__ is a human-readable version number.
# __version_info__ is a four-tuple for programmatic comparison. The first
# three numbers are the components of the version number. The fourth
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
"""
Monitors communication with the GNS3 client via tmp file. Will terminate the instance if
communication is lost.
"""
import os
import sys
import time
import getopt
import datetime
import logging
import signal
import configparser
from logging.handlers import *
from os.path import expanduser
SCRIPT_NAME = os.path.basename(__file__)
#Is the full path when used as an import
SCRIPT_PATH = os.path.dirname(__file__)
if not SCRIPT_PATH:
SCRIPT_PATH = os.path.join(os.path.dirname(os.path.abspath(
sys.argv[0])))
EXTRA_LIB = "%s/modules" % (SCRIPT_PATH)
sys.path.append(EXTRA_LIB)
from . import cloud
from rackspace_cloud import Rackspace
LOG_NAME = "gns3dms"
log = None
sys.path.append(EXTRA_LIB)
import daemon
my_daemon = None
usage = """
USAGE: %s
Options:
-d, --debug Enable debugging
-v, --verbose Enable verbose logging
-h, --help Display this menu :)
--cloud_api_key <api_key> Rackspace API key
--cloud_user_name
--instance_id ID of the Rackspace instance to terminate
--cloud_region Region of instance
--deadtime How long in seconds can the communication lose exist before we
shutdown this instance.
Default:
Example --deadtime=3600 (60 minutes)
--check-interval Defaults to --deadtime, used for debugging
--init-wait Inital wait time, how long before we start pulling the file.
Default: 300 (5 min)
Example --init-wait=300
--file The file we monitor for updates
-k Kill previous instance running in background
--background Run in background
""" % (SCRIPT_NAME)
# Parse cmd line options
def parse_cmd_line(argv):
"""
Parse command line arguments
argv: Pass in cmd line arguments
"""
short_args = "dvhk"
long_args = ("debug",
"verbose",
"help",
"cloud_user_name=",
"cloud_api_key=",
"instance_id=",
"region=",
"deadtime=",
"init-wait=",
"check-interval=",
"file=",
"background",
)
try:
opts, extra_opts = getopt.getopt(argv[1:], short_args, long_args)
except getopt.GetoptError as e:
print("Unrecognized command line option or missing required argument: %s" %(e))
print(usage)
sys.exit(2)
cmd_line_option_list = {}
cmd_line_option_list["debug"] = False
cmd_line_option_list["verbose"] = True
cmd_line_option_list["cloud_user_name"] = None
cmd_line_option_list["cloud_api_key"] = None
cmd_line_option_list["instance_id"] = None
cmd_line_option_list["region"] = None
cmd_line_option_list["deadtime"] = 60 * 60 #minutes
cmd_line_option_list["check-interval"] = None
cmd_line_option_list["init-wait"] = 5 * 60
cmd_line_option_list["file"] = None
cmd_line_option_list["shutdown"] = False
cmd_line_option_list["daemon"] = False
cmd_line_option_list['starttime'] = datetime.datetime.now()
if sys.platform == "linux":
cmd_line_option_list['syslog'] = "/dev/log"
elif sys.platform == "osx":
cmd_line_option_list['syslog'] = "/var/run/syslog"
else:
cmd_line_option_list['syslog'] = ('localhost',514)
get_gns3secrets(cmd_line_option_list)
for opt, val in opts:
if (opt in ("-h", "--help")):
print(usage)
sys.exit(0)
elif (opt in ("-d", "--debug")):
cmd_line_option_list["debug"] = True
elif (opt in ("-v", "--verbose")):
cmd_line_option_list["verbose"] = True
elif (opt in ("--cloud_user_name")):
cmd_line_option_list["cloud_user_name"] = val
elif (opt in ("--cloud_api_key")):
cmd_line_option_list["cloud_api_key"] = val
elif (opt in ("--instance_id")):
cmd_line_option_list["instance_id"] = val
elif (opt in ("--region")):
cmd_line_option_list["region"] = val
elif (opt in ("--deadtime")):
cmd_line_option_list["deadtime"] = int(val)
elif (opt in ("--check-interval")):
cmd_line_option_list["check-interval"] = int(val)
elif (opt in ("--init-wait")):
cmd_line_option_list["init-wait"] = int(val)
elif (opt in ("--file")):
cmd_line_option_list["file"] = val
elif (opt in ("-k")):
cmd_line_option_list["shutdown"] = True
elif (opt in ("--background")):
cmd_line_option_list["daemon"] = True
if cmd_line_option_list["shutdown"] == False:
if cmd_line_option_list["check-interval"] is None:
cmd_line_option_list["check-interval"] = cmd_line_option_list["deadtime"] + 120
if cmd_line_option_list["cloud_user_name"] is None:
print("You need to specify a username!!!!")
print(usage)
sys.exit(2)
if cmd_line_option_list["cloud_api_key"] is None:
print("You need to specify an apikey!!!!")
print(usage)
sys.exit(2)
if cmd_line_option_list["file"] is None:
print("You need to specify a file to watch!!!!")
print(usage)
sys.exit(2)
if cmd_line_option_list["instance_id"] is None:
print("You need to specify an instance_id")
print(usage)
sys.exit(2)
if cmd_line_option_list["cloud_region"] is None:
print("You need to specify a cloud_region")
print(usage)
sys.exit(2)
return cmd_line_option_list
def get_gns3secrets(cmd_line_option_list):
"""
Load cloud credentials from .gns3secrets
"""
gns3secret_paths = [
os.path.join(os.path.expanduser("~"), '.config', 'GNS3'),
SCRIPT_PATH,
]
config = configparser.ConfigParser()
for gns3secret_path in gns3secret_paths:
gns3secret_file = "%s/cloud.conf" % (gns3secret_path)
if os.path.isfile(gns3secret_file):
config.read(gns3secret_file)
try:
for key, value in config.items("CLOUD_SERVER"):
cmd_line_option_list[key] = value.strip()
except configparser.NoSectionError:
pass
def set_logging(cmd_options):
"""
Setup logging and format output for console and syslog
Syslog is using the KERN facility
"""
log = logging.getLogger("%s" % (LOG_NAME))
log_level = logging.INFO
log_level_console = logging.WARNING
if cmd_options['verbose'] == True:
log_level_console = logging.INFO
if cmd_options['debug'] == True:
log_level_console = logging.DEBUG
log_level = logging.DEBUG
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
sys_formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
console_log = logging.StreamHandler()
console_log.setLevel(log_level_console)
console_log.setFormatter(formatter)
syslog_hndlr = SysLogHandler(
address=cmd_options['syslog'],
facility=SysLogHandler.LOG_KERN
)
syslog_hndlr.setFormatter(sys_formatter)
log.setLevel(log_level)
log.addHandler(console_log)
log.addHandler(syslog_hndlr)
return log
def send_shutdown(pid_file):
"""
Sends the daemon process a kill signal
"""
try:
with open(pid_file, 'r') as pidf:
pid = int(pidf.readline().strip())
pidf.close()
os.kill(pid, 15)
except:
log.info("No running instance found!!!")
log.info("Missing PID file: %s" % (pid_file))
def _get_file_age(filename):
return datetime.datetime.fromtimestamp(
os.path.getmtime(filename)
)
def monitor_loop(options):
"""
Checks the options["file"] modification time against an interval. If the
modification time is too old we terminate the instance.
"""
log.debug("Waiting for init-wait to pass: %s" % (options["init-wait"]))
time.sleep(options["init-wait"])
log.info("Starting monitor_loop")
terminate_attempts = 0
while options['shutdown'] == False:
log.debug("In monitor_loop for : %s" % (
datetime.datetime.now() - options['starttime'])
)
file_last_modified = _get_file_age(options["file"])
now = datetime.datetime.now()
delta = now - file_last_modified
log.debug("File last updated: %s seconds ago" % (delta.seconds))
if delta.seconds > options["deadtime"]:
log.warning("Deadtime exceeded, terminating instance ...")
#Terminate involes many layers of HTTP / API calls, lots of
#different errors types could occur here.
try:
rksp = Rackspace(options)
rksp.terminate()
except Exception as e:
log.critical("Exception during terminate: %s" % (e))
terminate_attempts+=1
log.warning("Termination sent, attempt: %s" % (terminate_attempts))
time.sleep(600)
else:
time.sleep(options["check-interval"])
log.info("Leaving monitor_loop")
log.info("Shutting down")
def main():
global log
global my_daemon
options = parse_cmd_line(sys.argv)
log = set_logging(options)
def _shutdown(signalnum=None, frame=None):
"""
Handles the SIGINT and SIGTERM event, inside of main so it has access to
the log vars.
"""
log.info("Received shutdown signal")
options["shutdown"] = True
pid_file = "%s/.gns3dms.pid" % (expanduser("~"))
if options["shutdown"]:
send_shutdown(pid_file)
sys.exit(0)
if options["daemon"]:
my_daemon = MyDaemon(pid_file, options)
# Setup signal to catch Control-C / SIGINT and SIGTERM
signal.signal(signal.SIGINT, _shutdown)
signal.signal(signal.SIGTERM, _shutdown)
log.info("Starting ...")
log.debug("Using settings:")
for key, value in iter(sorted(options.items())):
log.debug("%s : %s" % (key, value))
log.debug("Checking file ....")
if os.path.isfile(options["file"]) == False:
log.critical("File does not exist!!!")
sys.exit(1)
test_acess = _get_file_age(options["file"])
if type(test_acess) is not datetime.datetime:
log.critical("Can't get file modification time!!!")
sys.exit(1)
if my_daemon:
my_daemon.start()
else:
monitor_loop(options)
class MyDaemon(daemon.daemon):
def run(self):
monitor_loop(self.options)
if __name__ == "__main__":
result = main()
sys.exit(result)

View File

@ -1,24 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# __version__ is a human-readable version number.
# __version_info__ is a four-tuple for programmatic comparison. The first
# three numbers are the components of the version number. The fourth
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)

View File

@ -1,138 +0,0 @@
"""Generic linux daemon base class for python 3.x."""
import sys, os, time, atexit, signal
class daemon:
"""A generic daemon class.
Usage: subclass the daemon class and override the run() method."""
def __init__(self, pidfile, options):
self.pidfile = pidfile
self.options = options
def daemonize(self):
"""Deamonize class. UNIX double fork mechanism."""
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError as err:
sys.stderr.write('fork #1 failed: {0}\n'.format(err))
sys.exit(1)
# decouple from parent environment
os.chdir('/')
os.setsid()
os.umask(0)
# do second fork
try:
pid = os.fork()
if pid > 0:
# exit from second parent
sys.exit(0)
except OSError as err:
sys.stderr.write('fork #2 failed: {0}\n'.format(err))
sys.exit(1)
# redirect standard file descriptors
sys.stdout.flush()
sys.stderr.flush()
si = open(os.devnull, 'r')
so = open(os.devnull, 'a+')
se = open(os.devnull, 'a+')
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
# write pidfile
atexit.register(self.delpid)
pid = str(os.getpid())
with open(self.pidfile,'w+') as f:
f.write(pid + '\n')
def delpid(self):
os.remove(self.pidfile)
def check_pid(self, pid):
""" Check For the existence of a unix pid. """
try:
os.kill(pid, 0)
except OSError:
return False
else:
return True
def start(self):
"""Start the daemon."""
# Check for a pidfile to see if the daemon already runs
try:
with open(self.pidfile,'r') as pf:
pid = int(pf.read().strip())
except IOError:
pid = None
if pid:
pid_exist = self.check_pid(pid)
if pid_exist:
message = "Already running: %s\n" % (pid)
sys.stderr.write(message)
sys.exit(1)
else:
message = "pidfile {0} already exist. " + \
"but process is dead\n"
sys.stderr.write(message.format(self.pidfile))
# Start the daemon
self.daemonize()
self.run()
def stop(self):
"""Stop the daemon."""
# Get the pid from the pidfile
try:
with open(self.pidfile,'r') as pf:
pid = int(pf.read().strip())
except IOError:
pid = None
if not pid:
message = "pidfile {0} does not exist. " + \
"Daemon not running?\n"
sys.stderr.write(message.format(self.pidfile))
return # not an error in a restart
# Try killing the daemon process
try:
while 1:
os.kill(pid, signal.SIGTERM)
time.sleep(0.1)
except OSError as err:
e = str(err.args)
if e.find("No such process") > 0:
if os.path.exists(self.pidfile):
os.remove(self.pidfile)
else:
print (str(err.args))
sys.exit(1)
def restart(self):
"""Restart the daemon."""
self.stop()
self.start()
def run(self):
"""You should override this method when you subclass Daemon.
It will be called after the process has been daemonized by
start() or restart()."""

View File

@ -1,70 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# __version__ is a human-readable version number.
# __version_info__ is a four-tuple for programmatic comparison. The first
# three numbers are the components of the version number. The fourth
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
import os, sys
import json
import logging
import socket
from gns3dms.cloud.rackspace_ctrl import RackspaceCtrl
LOG_NAME = "gns3dms.rksp"
log = logging.getLogger("%s" % (LOG_NAME))
class Rackspace(object):
def __init__(self, options):
self.username = options["cloud_user_name"]
self.apikey = options["cloud_api_key"]
self.authenticated = False
self.hostname = socket.gethostname()
self.instance_id = options["instance_id"]
self.region = options["region"]
log.debug("Authenticating with Rackspace")
log.debug("My hostname: %s" % (self.hostname))
self.rksp = RackspaceCtrl(self.username, self.apikey)
self.authenticated = self.rksp.authenticate()
def _find_my_instance(self):
if self.authenticated == False:
log.critical("Not authenticated against rackspace!!!!")
for region in self.rksp.list_regions():
log.debug("Rackspace regions: %s" % (region))
log.debug("Checking region: %s" % (self.region))
self.rksp.set_region(self.region)
for server in self.rksp.list_instances():
log.debug("Checking server: %s" % (server.name))
if server.name.lower() == self.hostname.lower() and server.id == self.instance_id:
log.info("Found matching instance: %s" % (server.id))
log.info("Startup id: %s" % (self.instance_id))
return server
def terminate(self):
server = self._find_my_instance()
log.warning("Sending termination")
self.rksp.delete_instance(server)

View File

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# __version__ is a human-readable version number.
# __version_info__ is a four-tuple for programmatic comparison. The first
# three numbers are the components of the version number. The fourth
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
__version__ = "0.1"
__version_info__ = (0, 0, 1, -99)

2
gns3server.bat Normal file
View File

@ -0,0 +1,2 @@
SET PYTHONPATH=%~dp0
python.exe %~dp0/gns3server/main.py --debug --local

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 GNS3 Technologies Inc.
# Copyright (C) 2015 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
@ -15,14 +14,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# __version__ is a human-readable version number.
# __version_info__ is a four-tuple for programmatic comparison. The first
# three numbers are the components of the version number. The fourth
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
#from .module_manager import ModuleManager
#from .server import Server
from .version import __version__

20
gns3server/__main__.py Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python
#
# Copyright (C) 2015 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .main import main
main()

View File

@ -1,36 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
PY2 = sys.version_info[0] == 2
if not PY2:
unichr = chr
range_type = range
text_type = str
string_types = (str,)
else:
unichr = unichr
text_type = unicode # @UndefinedVariable
range_type = xrange # @UndefinedVariable
string_types = (str, unicode) # @UndefinedVariable
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode

103
gns3server/alembic.ini Normal file
View File

@ -0,0 +1,103 @@
# A generic, single database configuration.
[alembic]
# path to migration scripts
script_location = db_migrations
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
# Uncomment the line below if you want the files to be prepended with date and time
# file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
# sys.path path, will be prepended to sys.path if present.
# defaults to the current working directory.
prepend_sys_path = .
# timezone to use when rendering the date within the migration file
# as well as the filename.
# If specified, requires the python-dateutil library that can be
# installed by adding `alembic[tz]` to the pip requirements
# string value is passed to dateutil.tz.gettz()
# leave blank for localtime
# timezone =
# max length of characters to apply to the
# "slug" field
# truncate_slug_length = 40
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
# set to 'true' to allow .pyc and .pyo files without
# a source .py file to be detected as revisions in the
# versions/ directory
# sourceless = false
# version location specification; This defaults
# to db_migrations/versions. When using multiple version
# directories, initial revisions must be specified with --version-path.
# The path separator used here should be the separator specified by "version_path_separator" below.
# version_locations = %(here)s/bar:%(here)s/bat:db_migrations/versions
# version path separator; As mentioned above, this is the character used to split
# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
# Valid values for version_path_separator are:
#
# version_path_separator = :
# version_path_separator = ;
# version_path_separator = space
version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
# the output encoding used when revision files
# are written from script.py.mako
# output_encoding = utf-8
sqlalchemy.url =
[post_write_hooks]
# post_write_hooks defines scripts or Python functions that are run
# on newly generated revision scripts. See the documentation for further
# detail and examples
# format using "black" - use the console_scripts runner, against the "black" entrypoint
# hooks = black
# black.type = console_scripts
# black.entrypoint = black
# black.options = -l 79 REVISION_SCRIPT_FILENAME
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

View File

@ -0,0 +1,267 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from fastapi import FastAPI, Request, Depends
from fastapi.responses import JSONResponse
from starlette.exceptions import HTTPException as StarletteHTTPException
from gns3server.controller.gns3vm.gns3_vm_error import GNS3VMError
from gns3server.compute.error import ImageMissingError, NodeError
from gns3server.compute.ubridge.ubridge_error import UbridgeError
from .dependencies.authentication import compute_authentication
from gns3server.compute.compute_error import (
ComputeError,
ComputeNotFoundError,
ComputeTimeoutError,
ComputeForbiddenError,
ComputeUnauthorizedError,
)
from . import capabilities
from . import compute
from . import projects
from . import notifications
from . import images
from . import atm_switch_nodes
from . import cloud_nodes
from . import docker_nodes
from . import dynamips_nodes
from . import ethernet_hub_nodes
from . import ethernet_switch_nodes
from . import frame_relay_switch_nodes
from . import iou_nodes
from . import nat_nodes
from . import qemu_nodes
from . import virtualbox_nodes
from . import vmware_nodes
from . import vpcs_nodes
import logging
log = logging.getLogger(__name__)
compute_api = FastAPI(
title="GNS3 compute API",
description="This page describes the private compute API for GNS3. PLEASE DO NOT USE DIRECTLY!",
version="v3",
)
compute_api.state.controller_host = None
@compute_api.exception_handler(ComputeError)
async def compute_error_handler(request: Request, exc: ComputeError):
log.error(f"Compute error: {exc}")
return JSONResponse(
status_code=409,
content={"message": str(exc)},
)
@compute_api.exception_handler(ComputeTimeoutError)
async def compute_timeout_error_handler(request: Request, exc: ComputeTimeoutError):
log.error(f"Compute timeout error: {exc}")
return JSONResponse(
status_code=408,
content={"message": str(exc)},
)
@compute_api.exception_handler(ComputeUnauthorizedError)
async def compute_unauthorized_error_handler(request: Request, exc: ComputeUnauthorizedError):
log.error(f"Compute unauthorized error: {exc}")
return JSONResponse(
status_code=401,
content={"message": str(exc)},
)
@compute_api.exception_handler(ComputeForbiddenError)
async def compute_forbidden_error_handler(request: Request, exc: ComputeForbiddenError):
log.error(f"Compute forbidden error: {exc}")
return JSONResponse(
status_code=403,
content={"message": str(exc)},
)
@compute_api.exception_handler(ComputeNotFoundError)
async def compute_not_found_error_handler(request: Request, exc: ComputeNotFoundError):
log.error(f"Compute not found error: {exc}")
return JSONResponse(
status_code=404,
content={"message": str(exc)},
)
@compute_api.exception_handler(GNS3VMError)
async def compute_gns3vm_error_handler(request: Request, exc: GNS3VMError):
log.error(f"Compute GNS3 VM error: {exc}")
return JSONResponse(
status_code=409,
content={"message": str(exc)},
)
@compute_api.exception_handler(ImageMissingError)
async def image_missing_error_handler(request: Request, exc: ImageMissingError):
log.error(f"Compute image missing error: {exc}")
return JSONResponse(
status_code=409,
content={"message": str(exc), "image": exc.image, "exception": exc.__class__.__name__},
)
@compute_api.exception_handler(NodeError)
async def node_error_handler(request: Request, exc: NodeError):
log.error(f"Compute node error: {exc}")
return JSONResponse(
status_code=409,
content={"message": str(exc), "exception": exc.__class__.__name__},
)
@compute_api.exception_handler(UbridgeError)
async def ubridge_error_handler(request: Request, exc: UbridgeError):
log.error(f"Compute uBridge error: {exc}")
return JSONResponse(
status_code=409,
content={"message": str(exc), "exception": exc.__class__.__name__},
)
# make sure the content key is "message", not "detail" per default
@compute_api.exception_handler(StarletteHTTPException)
async def http_exception_handler(request: Request, exc: StarletteHTTPException):
return JSONResponse(
status_code=exc.status_code,
content={"message": exc.detail},
)
compute_api.include_router(
capabilities.router,
dependencies=[Depends(compute_authentication)],
tags=["Capabilities"]
)
compute_api.include_router(
compute.router,
dependencies=[Depends(compute_authentication)],
tags=["Compute"]
)
compute_api.include_router(
notifications.router,
tags=["Notifications"]
)
compute_api.include_router(
projects.router,
dependencies=[Depends(compute_authentication)],
tags=["Projects"]
)
compute_api.include_router(
images.router,
dependencies=[Depends(compute_authentication)],
tags=["Images"]
)
compute_api.include_router(
atm_switch_nodes.router,
dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/atm_switch/nodes",
tags=["ATM switch"]
)
compute_api.include_router(
cloud_nodes.router,
dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/cloud/nodes",
tags=["Cloud nodes"]
)
compute_api.include_router(
docker_nodes.router,
prefix="/projects/{project_id}/docker/nodes",
tags=["Docker nodes"]
)
compute_api.include_router(
dynamips_nodes.router,
prefix="/projects/{project_id}/dynamips/nodes",
tags=["Dynamips nodes"]
)
compute_api.include_router(
ethernet_hub_nodes.router,
dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/ethernet_hub/nodes",
tags=["Ethernet hub nodes"]
)
compute_api.include_router(
ethernet_switch_nodes.router,
dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/ethernet_switch/nodes",
tags=["Ethernet switch nodes"]
)
compute_api.include_router(
frame_relay_switch_nodes.router,
dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/frame_relay_switch/nodes",
tags=["Frame Relay switch nodes"]
)
compute_api.include_router(
iou_nodes.router,
prefix="/projects/{project_id}/iou/nodes",
tags=["IOU nodes"])
compute_api.include_router(
nat_nodes.router,
dependencies=[Depends(compute_authentication)],
prefix="/projects/{project_id}/nat/nodes",
tags=["NAT nodes"]
)
compute_api.include_router(
qemu_nodes.router,
prefix="/projects/{project_id}/qemu/nodes",
tags=["Qemu nodes"]
)
compute_api.include_router(
virtualbox_nodes.router,
prefix="/projects/{project_id}/virtualbox/nodes",
tags=["VirtualBox nodes"]
)
compute_api.include_router(
vmware_nodes.router,
prefix="/projects/{project_id}/vmware/nodes",
tags=["VMware nodes"]
)
compute_api.include_router(
vpcs_nodes.router,
prefix="/projects/{project_id}/vpcs/nodes",
tags=["VPCS nodes"]
)

View File

@ -0,0 +1,233 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for ATM switch nodes.
"""
import os
from fastapi import APIRouter, Depends, Body, Path, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from gns3server import schemas
from gns3server.compute.dynamips import Dynamips
from gns3server.compute.dynamips.nodes.atm_switch import ATMSwitch
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or ATM switch node"}}
router = APIRouter(responses=responses)
async def dep_node(project_id: UUID, node_id: UUID) -> ATMSwitch:
"""
Dependency to retrieve a node.
"""
dynamips_manager = Dynamips.instance()
node = dynamips_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.ATMSwitch,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create ATM switch node"}},
)
async def create_atm_switch(project_id: UUID, node_data: schemas.ATMSwitchCreate) -> schemas.ATMSwitch:
"""
Create a new ATM switch node.
"""
# Use the Dynamips ATM switch to simulate this node
dynamips_manager = Dynamips.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await dynamips_manager.create_node(
node_data.get("name"),
str(project_id),
node_data.get("node_id"),
node_type="atm_switch",
mappings=node_data.get("mappings"),
)
return node.asdict()
@router.get("/{node_id}", response_model=schemas.ATMSwitch)
def get_atm_switch(node: ATMSwitch = Depends(dep_node)) -> schemas.ATMSwitch:
"""
Return an ATM switch node.
"""
return node.asdict()
@router.post("/{node_id}/duplicate", response_model=schemas.ATMSwitch, status_code=status.HTTP_201_CREATED)
async def duplicate_atm_switch(
destination_node_id: UUID = Body(..., embed=True),
node: ATMSwitch = Depends(dep_node)
) -> schemas.ATMSwitch:
"""
Duplicate an ATM switch node.
"""
new_node = await Dynamips.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.put("/{node_id}", response_model=schemas.ATMSwitch)
async def update_atm_switch(
node_data: schemas.ATMSwitchUpdate,
node: ATMSwitch = Depends(dep_node)
) -> schemas.ATMSwitch:
"""
Update an ATM switch node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
if "name" in node_data and node.name != node_data["name"]:
await node.set_name(node_data["name"])
if "mappings" in node_data:
node.mappings = node_data["mappings"]
node.updated()
return node.asdict()
@router.delete("/{node_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_atm_switch_node(node: ATMSwitch = Depends(dep_node)) -> None:
"""
Delete an ATM switch node.
"""
await Dynamips.instance().delete_node(node.id)
@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
def start_atm_switch(node: ATMSwitch = Depends(dep_node)) -> None:
"""
Start an ATM switch node.
This endpoint results in no action since ATM switch nodes are always on.
"""
pass
@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
def stop_atm_switch(node: ATMSwitch = Depends(dep_node)) -> None:
"""
Stop an ATM switch node.
This endpoint results in no action since ATM switch nodes are always on.
"""
pass
@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
def suspend_atm_switch(node: ATMSwitch = Depends(dep_node)) -> None:
"""
Suspend an ATM switch node.
This endpoint results in no action since ATM switch nodes are always on.
"""
pass
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
)
async def create_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: schemas.UDPNIO,
node: ATMSwitch = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The adapter number on the switch is always 0.
"""
nio = await Dynamips.instance().create_nio(node, jsonable_encoder(nio_data, exclude_unset=True))
await node.add_nio(nio, port_number)
return nio.asdict()
@router.delete("/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio", status_code=status.HTTP_204_NO_CONTENT)
async def delete_nio(adapter_number: int, port_number: int, node: ATMSwitch = Depends(dep_node)) -> None:
"""
Remove a NIO (Network Input/Output) from the node.
The adapter number on the switch is always 0.
"""
nio = await node.remove_nio(port_number)
await nio.delete()
@router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start")
async def start_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: ATMSwitch = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the switch is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop_capture",
status_code=status.HTTP_204_NO_CONTENT,
)
async def stop_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: ATMSwitch = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the switch is always 0.
"""
await node.stop_capture(port_number)
@router.get("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream")
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: ATMSwitch = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the switch is always 0.
"""
nio = node.get_nio(port_number)
stream = Dynamips.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,51 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for capabilities
"""
import sys
import psutil
from fastapi import APIRouter, Request
from gns3server.version import __version__
from gns3server.compute import MODULES
from gns3server.utils.path import get_default_project_directory
from gns3server import schemas
router = APIRouter()
@router.get("/capabilities", response_model=schemas.Capabilities)
def get_capabilities(request: Request) -> dict:
node_types = []
for module in MODULES:
node_types.extend(module.node_types())
# record the controller hostname or IP address
request.app.state.controller_host = request.client.host
return {
"version": __version__,
"platform": sys.platform,
"cpus": psutil.cpu_count(logical=True),
"memory": psutil.virtual_memory().total,
"disk_size": psutil.disk_usage(get_default_project_directory()).total,
"node_types": node_types,
}

View File

@ -0,0 +1,249 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for cloud nodes.
"""
import os
from fastapi import APIRouter, Depends, Path, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from typing import Union
from uuid import UUID
from gns3server import schemas
from gns3server.compute.builtin import Builtin
from gns3server.compute.builtin.nodes.cloud import Cloud
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or cloud node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> Cloud:
"""
Dependency to retrieve a node.
"""
builtin_manager = Builtin.instance()
node = builtin_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.Cloud,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create cloud node"}},
)
async def create_cloud(project_id: UUID, node_data: schemas.CloudCreate) -> schemas.Cloud:
"""
Create a new cloud node.
"""
builtin_manager = Builtin.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await builtin_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
node_type="cloud",
ports=node_data.get("ports_mapping"),
)
# add the remote console settings
node.remote_console_host = node_data.get("remote_console_host", node.remote_console_host)
node.remote_console_port = node_data.get("remote_console_port", node.remote_console_port)
node.remote_console_type = node_data.get("remote_console_type", node.remote_console_type)
node.remote_console_http_path = node_data.get("remote_console_http_path", node.remote_console_http_path)
node.usage = node_data.get("usage", "")
return node.asdict()
@router.get("/{node_id}", response_model=schemas.Cloud)
def get_cloud(node: Cloud = Depends(dep_node)) -> schemas.Cloud:
"""
Return a cloud node.
"""
return node.asdict()
@router.put("/{node_id}", response_model=schemas.Cloud)
async def update_cloud(node_data: schemas.CloudUpdate, node: Cloud = Depends(dep_node)) -> schemas.Cloud:
"""
Update a cloud node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
for name, value in node_data.items():
if hasattr(node, name) and getattr(node, name) != value:
setattr(node, name, value)
node.updated()
return node.asdict()
@router.delete("/{node_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_cloud(node: Cloud = Depends(dep_node)) -> None:
"""
Delete a cloud node.
"""
await Builtin.instance().delete_node(node.id)
@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
async def start_cloud(node: Cloud = Depends(dep_node)) -> None:
"""
Start a cloud node.
"""
await node.start()
@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
async def stop_cloud(node: Cloud = Depends(dep_node)) -> None:
"""
Stop a cloud node.
This endpoint results in no action since cloud nodes cannot be stopped.
"""
pass
@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
async def suspend_cloud(node: Cloud = Depends(dep_node)) -> None:
"""
Suspend a cloud node.
This endpoint results in no action since cloud nodes cannot be suspended.
"""
pass
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
)
async def create_cloud_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
node: Cloud = Depends(dep_node),
) -> Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO]:
"""
Add a NIO (Network Input/Output) to the node.
The adapter number on the cloud is always 0.
"""
nio = Builtin.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.add_nio(nio, port_number)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
)
async def update_cloud_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
node: Cloud = Depends(dep_node),
) -> Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO]:
"""
Update a NIO (Network Input/Output) to the node.
The adapter number on the cloud is always 0.
"""
nio = node.get_nio(port_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.update_nio(port_number, nio)
return nio.asdict()
@router.delete("/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio", status_code=status.HTTP_204_NO_CONTENT)
async def delete_cloud_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: Cloud = Depends(dep_node)
) -> None:
"""
Remove a NIO (Network Input/Output) from the node.
The adapter number on the cloud is always 0.
"""
await node.remove_nio(port_number)
@router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start")
async def start_cloud_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: Cloud = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the cloud is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop", status_code=status.HTTP_204_NO_CONTENT
)
async def stop_cloud_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: Cloud = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the cloud is always 0.
"""
await node.stop_capture(port_number)
@router.get("/{node_id}/adapters/{adapter_number}/ports/{port_number}/pcap")
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: Cloud = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the cloud is always 0.
"""
nio = node.get_nio(port_number)
stream = Builtin.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,143 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for compute.
"""
import os
import psutil
from gns3server.config import Config
from gns3server.utils.cpu_percent import CpuPercent
from gns3server.version import __version__
from gns3server.utils.path import get_default_project_directory, is_safe_path
from gns3server.compute.port_manager import PortManager
from gns3server.compute.project_manager import ProjectManager
from gns3server.utils.interfaces import interfaces
from gns3server.compute.qemu import Qemu
from gns3server.compute.virtualbox import VirtualBox
from gns3server.compute.vmware import VMware
from gns3server import schemas
from fastapi import APIRouter, HTTPException, Body, Response, status
from fastapi.encoders import jsonable_encoder
from uuid import UUID
from typing import Optional, List
router = APIRouter()
@router.post("/projects/{project_id}/ports/udp", status_code=status.HTTP_201_CREATED)
def allocate_udp_port(project_id: UUID) -> dict:
"""
Allocate a UDP port on the compute.
"""
pm = ProjectManager.instance()
project = pm.get_project(str(project_id))
m = PortManager.instance()
udp_port = m.get_free_udp_port(project)
return {"udp_port": udp_port}
@router.get("/network/interfaces")
def network_interfaces() -> List[dict]:
"""
List all the network interfaces available on the compute"
"""
network_interfaces = interfaces()
return network_interfaces
@router.get("/network/ports")
def network_ports() -> dict:
"""
List all the ports used on the compute"
"""
m = PortManager.instance()
return m.asdict()
@router.get("/version")
def compute_version() -> dict:
"""
Retrieve the server version number.
"""
return {"version": __version__}
@router.get("/statistics")
def compute_statistics() -> dict:
"""
Retrieve the server version number.
"""
try:
memory_total = psutil.virtual_memory().total
memory_free = psutil.virtual_memory().available
memory_used = memory_total - memory_free # actual memory usage in a cross platform fashion
swap_total = psutil.swap_memory().total
swap_free = psutil.swap_memory().free
swap_used = psutil.swap_memory().used
cpu_percent = int(CpuPercent.get())
load_average_percent = [int(x / psutil.cpu_count() * 100) for x in psutil.getloadavg()]
memory_percent = int(psutil.virtual_memory().percent)
swap_percent = int(psutil.swap_memory().percent)
disk_usage_percent = int(psutil.disk_usage(get_default_project_directory()).percent)
except psutil.Error as e:
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR)
# raise HTTPConflict(text="Psutil error detected: {}".format(e))
return {
"memory_total": memory_total,
"memory_free": memory_free,
"memory_used": memory_used,
"swap_total": swap_total,
"swap_free": swap_free,
"swap_used": swap_used,
"cpu_usage_percent": cpu_percent,
"memory_usage_percent": memory_percent,
"swap_usage_percent": swap_percent,
"disk_usage_percent": disk_usage_percent,
"load_average_percent": load_average_percent,
}
@router.get("/qemu/capabilities")
async def get_qemu_capabilities() -> dict:
capabilities = {"kvm": []}
kvms = await Qemu.get_kvm_archs()
if kvms:
capabilities["kvm"] = kvms
return capabilities
@router.get("/virtualbox/vms", response_model=List[dict])
async def get_virtualbox_vms() -> List[dict]:
vbox_manager = VirtualBox.instance()
return await vbox_manager.list_vms()
@router.get("/vmware/vms", response_model=List[dict])
async def get_vms() -> List[dict]:
vmware_manager = VMware.instance()
return await vmware_manager.list_vms()

View File

@ -0,0 +1,83 @@
#
# Copyright (C) 2021 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import secrets
import base64
import binascii
import logging
from fastapi import Depends, HTTPException, WebSocket, status
from fastapi.security import HTTPBasic, HTTPBasicCredentials
from fastapi.security.utils import get_authorization_scheme_param
from gns3server.config import Config
from typing import Optional, Union
log = logging.getLogger(__name__)
security = HTTPBasic()
def compute_authentication(credentials: Optional[HTTPBasicCredentials] = Depends(security)) -> None:
server_settings = Config.instance().settings.Server
username = secrets.compare_digest(credentials.username, server_settings.compute_username)
password = secrets.compare_digest(credentials.password, server_settings.compute_password.get_secret_value())
if not (username and password):
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Invalid compute username or password",
headers={"WWW-Authenticate": "Basic"},
)
async def ws_compute_authentication(websocket: WebSocket) -> Union[None, WebSocket]:
"""
"""
await websocket.accept()
# handle basic HTTP authentication
invalid_user_credentials_exc = HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Could not validate credentials",
headers={"WWW-Authenticate": "Basic"},
)
try:
authorization = websocket.headers.get("Authorization")
scheme, param = get_authorization_scheme_param(authorization)
if not authorization or scheme.lower() != "basic":
raise invalid_user_credentials_exc
try:
data = base64.b64decode(param).decode("ascii")
except (ValueError, UnicodeDecodeError, binascii.Error):
raise invalid_user_credentials_exc
username, separator, password = data.partition(":")
if not separator:
raise invalid_user_credentials_exc
server_settings = Config.instance().settings.Server
username = secrets.compare_digest(username, server_settings.compute_username)
password = secrets.compare_digest(password, server_settings.compute_password.get_secret_value())
if not (username and password):
raise invalid_user_credentials_exc
except HTTPException as e:
err_msg = f"Could not authenticate while connecting to compute WebSocket: {e.detail}"
websocket_error = {"action": "log.error", "event": {"message": err_msg}}
await websocket.send_json(websocket_error)
log.error(err_msg)
return await websocket.close(code=1008)
return websocket

View File

@ -0,0 +1,393 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for Docker nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Depends, Body, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from typing import Union
from gns3server import schemas
from gns3server.compute.docker import Docker
from gns3server.compute.docker.docker_vm import DockerVM
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Docker node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> DockerVM:
"""
Dependency to retrieve a node.
"""
docker_manager = Docker.instance()
node = docker_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.Docker,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create Docker node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_docker_node(project_id: UUID, node_data: schemas.DockerCreate) -> schemas.Docker:
"""
Create a new Docker node.
"""
docker_manager = Docker.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
container = await docker_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
image=node_data.pop("image"),
start_command=node_data.get("start_command"),
environment=node_data.get("environment"),
adapters=node_data.get("adapters"),
mac_address=node_data.get("mac_address"),
console=node_data.get("console"),
console_type=node_data.get("console_type"),
console_resolution=node_data.get("console_resolution", "1024x768"),
console_http_port=node_data.get("console_http_port", 80),
console_http_path=node_data.get("console_http_path", "/"),
aux=node_data.get("aux"),
aux_type=node_data.pop("aux_type", "none"),
extra_hosts=node_data.get("extra_hosts"),
extra_volumes=node_data.get("extra_volumes"),
memory=node_data.get("memory", 0),
cpus=node_data.get("cpus", 0),
)
for name, value in node_data.items():
if name != "node_id":
if hasattr(container, name) and getattr(container, name) != value:
setattr(container, name, value)
return container.asdict()
@router.get(
"/{node_id}",
response_model=schemas.Docker,
dependencies=[Depends(compute_authentication)]
)
def get_docker_node(node: DockerVM = Depends(dep_node)) -> schemas.Docker:
"""
Return a Docker node.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.Docker,
dependencies=[Depends(compute_authentication)]
)
async def update_docker_node(node_data: schemas.DockerUpdate, node: DockerVM = Depends(dep_node)) -> schemas.Docker:
"""
Update a Docker node.
"""
props = [
"name",
"console",
"console_type",
"aux",
"aux_type",
"console_resolution",
"console_http_port",
"console_http_path",
"start_command",
"environment",
"adapters",
"mac_address",
"custom_adapters",
"extra_hosts",
"extra_volumes",
"memory",
"cpus",
]
changed = False
node_data = jsonable_encoder(node_data, exclude_unset=True)
for prop in props:
if prop in node_data and node_data[prop] != getattr(node, prop):
setattr(node, prop, node_data[prop])
changed = True
# We don't call container.update for nothing because it will restart the container
if changed:
await node.update()
node.updated()
return node.asdict()
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Start a Docker node.
"""
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Stop a Docker node.
"""
await node.stop()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def suspend_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Suspend a Docker node.
"""
await node.pause()
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Reload a Docker node.
"""
await node.restart()
@router.post(
"/{node_id}/pause",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def pause_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Pause a Docker node.
"""
await node.pause()
@router.post(
"/{node_id}/unpause",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def unpause_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Unpause a Docker node.
"""
await node.unpause()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_docker_node(node: DockerVM = Depends(dep_node)) -> None:
"""
Delete a Docker node.
"""
await node.delete()
@router.post(
"/{node_id}/duplicate",
response_model=schemas.Docker,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(compute_authentication)]
)
async def duplicate_docker_node(
destination_node_id: UUID = Body(..., embed=True),
node: DockerVM = Depends(dep_node)
) -> schemas.Docker:
"""
Duplicate a Docker node.
"""
new_node = await Docker.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def create_docker_node_nio(
adapter_number: int, port_number: int, nio_data: schemas.UDPNIO, node: DockerVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The port number on the Docker node is always 0.
"""
nio = Docker.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.adapter_add_nio_binding(adapter_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def update_docker_node_nio(
adapter_number: int, port_number: int, nio_data: schemas.UDPNIO, node: DockerVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Update a NIO (Network Input/Output) on the node.
The port number on the Docker node is always 0.
"""
nio = node.get_nio(adapter_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.adapter_update_nio_binding(adapter_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_docker_node_nio(
adapter_number: int,
port_number: int,
node: DockerVM = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The port number on the Docker node is always 0.
"""
await node.adapter_remove_nio_binding(adapter_number)
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_docker_node_capture(
adapter_number: int,
port_number: int,
node_capture_data: schemas.NodeCapture,
node: DockerVM = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The port number on the Docker node is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, pcap_file_path)
return {"pcap_file_path": str(pcap_file_path)}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_docker_node_capture(
adapter_number: int,
port_number: int,
node: DockerVM = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The port number on the Docker node is always 0.
"""
await node.stop_capture(adapter_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
adapter_number: int,
port_number: int,
node: DockerVM = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The port number on the Docker node is always 0.
"""
nio = node.get_nio(adapter_number)
stream = Docker.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.websocket("/{node_id}/console/ws")
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: DockerVM = Depends(dep_node)
) -> None:
"""
Console WebSocket.
"""
if websocket:
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: DockerVM = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,367 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for Dynamips nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Body, Depends, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from typing import List, Union
from uuid import UUID
from gns3server.compute.dynamips import Dynamips
from gns3server.compute.dynamips.nodes.router import Router
from gns3server import schemas
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Dynamips node"}}
router = APIRouter(responses=responses)
DEFAULT_CHASSIS = {"c1700": "1720", "c2600": "2610", "c3600": "3640"}
def dep_node(project_id: UUID, node_id: UUID) -> Router:
"""
Dependency to retrieve a node.
"""
dynamips_manager = Dynamips.instance()
node = dynamips_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.Dynamips,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create Dynamips node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_router(project_id: UUID, node_data: schemas.DynamipsCreate) -> schemas.Dynamips:
"""
Create a new Dynamips router.
"""
dynamips_manager = Dynamips.instance()
platform = node_data.platform
print(node_data.chassis, platform in DEFAULT_CHASSIS)
if not node_data.chassis and platform in DEFAULT_CHASSIS:
chassis = DEFAULT_CHASSIS[platform]
else:
chassis = node_data.chassis
node_data = jsonable_encoder(node_data, exclude_unset=True)
vm = await dynamips_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
dynamips_id=node_data.get("dynamips_id"),
platform=platform,
console=node_data.get("console"),
console_type=node_data.get("console_type", "telnet"),
aux=node_data.get("aux"),
aux_type=node_data.pop("aux_type", "none"),
chassis=chassis,
node_type="dynamips",
)
await dynamips_manager.update_vm_settings(vm, node_data)
return vm.asdict()
@router.get(
"/{node_id}",
response_model=schemas.Dynamips,
dependencies=[Depends(compute_authentication)]
)
def get_router(node: Router = Depends(dep_node)) -> schemas.Dynamips:
"""
Return Dynamips router.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.Dynamips,
dependencies=[Depends(compute_authentication)]
)
async def update_router(node_data: schemas.DynamipsUpdate, node: Router = Depends(dep_node)) -> schemas.Dynamips:
"""
Update a Dynamips router.
"""
await Dynamips.instance().update_vm_settings(node, jsonable_encoder(node_data, exclude_unset=True))
node.updated()
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_router(node: Router = Depends(dep_node)) -> None:
"""
Delete a Dynamips router.
"""
await Dynamips.instance().delete_node(node.id)
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_router(node: Router = Depends(dep_node)) -> None:
"""
Start a Dynamips router.
"""
try:
await Dynamips.instance().ghost_ios_support(node)
except GeneratorExit:
pass
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_router(node: Router = Depends(dep_node)) -> None:
"""
Stop a Dynamips router.
"""
await node.stop()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def suspend_router(node: Router = Depends(dep_node)) -> None:
await node.suspend()
@router.post(
"/{node_id}/resume",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def resume_router(node: Router = Depends(dep_node)) -> None:
"""
Resume a suspended Dynamips router.
"""
await node.resume()
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_router(node: Router = Depends(dep_node)) -> None:
"""
Reload a suspended Dynamips router.
"""
await node.reload()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def create_nio(
adapter_number: int,
port_number: int,
nio_data: schemas.UDPNIO,
node: Router = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
"""
nio = await Dynamips.instance().create_nio(node, jsonable_encoder(nio_data, exclude_unset=True))
await node.slot_add_nio_binding(adapter_number, port_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def update_nio(
adapter_number: int,
port_number: int,
nio_data: schemas.UDPNIO,
node: Router = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Update a NIO (Network Input/Output) on the node.
"""
nio = node.get_nio(adapter_number, port_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.slot_update_nio_binding(adapter_number, port_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_nio(adapter_number: int, port_number: int, node: Router = Depends(dep_node)) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
"""
nio = await node.slot_remove_nio_binding(adapter_number, port_number)
await nio.delete()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_capture(
adapter_number: int,
port_number: int,
node_capture_data: schemas.NodeCapture,
node: Router = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_capture(adapter_number: int, port_number: int, node: Router = Depends(dep_node)) -> None:
"""
Stop a packet capture on the node.
"""
await node.stop_capture(adapter_number, port_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
adapter_number: int,
port_number: int,
node: Router = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
"""
nio = node.get_nio(adapter_number, port_number)
stream = Dynamips.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.get(
"/{node_id}/idlepc_proposals",
dependencies=[Depends(compute_authentication)]
)
async def get_idlepcs(node: Router = Depends(dep_node)) -> List[str]:
"""
Retrieve Dynamips idle-pc proposals
"""
await node.set_idlepc("0x0")
return await node.get_idle_pc_prop()
@router.get(
"/{node_id}/auto_idlepc",
dependencies=[Depends(compute_authentication)]
)
async def get_auto_idlepc(node: Router = Depends(dep_node)) -> dict:
"""
Get an automatically guessed best idle-pc value.
"""
idlepc = await Dynamips.instance().auto_idlepc(node)
return {"idlepc": idlepc}
@router.post(
"/{node_id}/duplicate",
response_model=schemas.Dynamips,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(compute_authentication)]
)
async def duplicate_router(destination_node_id: UUID = Body(..., embed=True), node: Router = Depends(dep_node)) -> schemas.Dynamips:
"""
Duplicate a router.
"""
new_node = await Dynamips.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.websocket("/{node_id}/console/ws")
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: Router = Depends(dep_node)
) -> None:
"""
Console WebSocket.
"""
if websocket:
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: Router = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,236 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for Ethernet hub nodes.
"""
import os
from fastapi import APIRouter, Depends, Body, Path, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from gns3server.compute.dynamips import Dynamips
from gns3server.compute.dynamips.nodes.ethernet_hub import EthernetHub
from gns3server import schemas
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Ethernet hub node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> EthernetHub:
"""
Dependency to retrieve a node.
"""
dynamips_manager = Dynamips.instance()
node = dynamips_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.EthernetHub,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create Ethernet hub node"}},
)
async def create_ethernet_hub(project_id: UUID, node_data: schemas.EthernetHubCreate) -> schemas.EthernetHub:
"""
Create a new Ethernet hub.
"""
# Use the Dynamips Ethernet hub to simulate this node
dynamips_manager = Dynamips.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await dynamips_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
node_type="ethernet_hub",
ports=node_data.get("ports_mapping"),
)
return node.asdict()
@router.get("/{node_id}", response_model=schemas.EthernetHub)
def get_ethernet_hub(node: EthernetHub = Depends(dep_node)) -> schemas.EthernetHub:
"""
Return an Ethernet hub.
"""
return node.asdict()
@router.post("/{node_id}/duplicate", response_model=schemas.EthernetHub, status_code=status.HTTP_201_CREATED)
async def duplicate_ethernet_hub(
destination_node_id: UUID = Body(..., embed=True), node: EthernetHub = Depends(dep_node)
) -> schemas.EthernetHub:
"""
Duplicate an Ethernet hub.
"""
new_node = await Dynamips.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.put("/{node_id}", response_model=schemas.EthernetHub)
async def update_ethernet_hub(
node_data: schemas.EthernetHubUpdate,
node: EthernetHub = Depends(dep_node)
) -> schemas.EthernetHub:
"""
Update an Ethernet hub.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
if "name" in node_data and node.name != node_data["name"]:
await node.set_name(node_data["name"])
if "ports_mapping" in node_data:
node.ports_mapping = node_data["ports_mapping"]
node.updated()
return node.asdict()
@router.delete("/{node_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_ethernet_hub(node: EthernetHub = Depends(dep_node)) -> None:
"""
Delete an Ethernet hub.
"""
await Dynamips.instance().delete_node(node.id)
@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
def start_ethernet_hub(node: EthernetHub = Depends(dep_node)) -> None:
"""
Start an Ethernet hub.
This endpoint results in no action since Ethernet hub nodes are always on.
"""
pass
@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
def stop_ethernet_hub(node: EthernetHub = Depends(dep_node)) -> None:
"""
Stop an Ethernet hub.
This endpoint results in no action since Ethernet hub nodes are always on.
"""
pass
@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
def suspend_ethernet_hub(node: EthernetHub = Depends(dep_node)) -> None:
"""
Suspend an Ethernet hub.
This endpoint results in no action since Ethernet hub nodes are always on.
"""
pass
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
)
async def create_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: schemas.UDPNIO,
node: EthernetHub = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The adapter number on the hub is always 0.
"""
nio = await Dynamips.instance().create_nio(node, jsonable_encoder(nio_data, exclude_unset=True))
await node.add_nio(nio, port_number)
return nio.asdict()
@router.delete("/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio", status_code=status.HTTP_204_NO_CONTENT)
async def delete_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: EthernetHub = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The adapter number on the hub is always 0.
"""
nio = await node.remove_nio(port_number)
await nio.delete()
@router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start")
async def start_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: EthernetHub = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the hub is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop", status_code=status.HTTP_204_NO_CONTENT
)
async def stop_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: EthernetHub = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the hub is always 0.
"""
await node.stop_capture(port_number)
@router.get("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream")
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: EthernetHub = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the hub is always 0.
"""
nio = node.get_nio(port_number)
stream = Dynamips.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,246 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for Ethernet switch nodes.
"""
import os
from fastapi import APIRouter, Depends, Body, Path, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from gns3server.compute.dynamips import Dynamips
from gns3server.compute.dynamips.nodes.ethernet_switch import EthernetSwitch
from gns3server import schemas
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Ethernet switch node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> EthernetSwitch:
"""
Dependency to retrieve a node.
"""
dynamips_manager = Dynamips.instance()
node = dynamips_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.EthernetSwitch,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create Ethernet switch node"}},
)
async def create_ethernet_switch(project_id: UUID, node_data: schemas.EthernetSwitchCreate) -> schemas.EthernetSwitch:
"""
Create a new Ethernet switch.
"""
# Use the Dynamips Ethernet switch to simulate this node
dynamips_manager = Dynamips.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await dynamips_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
console=node_data.get("console"),
console_type=node_data.get("console_type"),
node_type="ethernet_switch",
ports=node_data.get("ports_mapping"),
)
return node.asdict()
@router.get("/{node_id}", response_model=schemas.EthernetSwitch)
def get_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> schemas.EthernetSwitch:
return node.asdict()
@router.post("/{node_id}/duplicate", response_model=schemas.EthernetSwitch, status_code=status.HTTP_201_CREATED)
async def duplicate_ethernet_switch(
destination_node_id: UUID = Body(..., embed=True),
node: EthernetSwitch = Depends(dep_node)
) -> schemas.EthernetSwitch:
"""
Duplicate an Ethernet switch.
"""
new_node = await Dynamips.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.put("/{node_id}", response_model=schemas.EthernetSwitch)
async def update_ethernet_switch(
node_data: schemas.EthernetSwitchUpdate,
node: EthernetSwitch = Depends(dep_node)
) -> schemas.EthernetSwitch:
"""
Update an Ethernet switch.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
if "name" in node_data and node.name != node_data["name"]:
await node.set_name(node_data["name"])
if "ports_mapping" in node_data:
node.ports_mapping = node_data["ports_mapping"]
await node.update_port_settings()
if "console_type" in node_data:
node.console_type = node_data["console_type"]
node.updated()
return node.asdict()
@router.delete("/{node_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> None:
"""
Delete an Ethernet switch.
"""
await Dynamips.instance().delete_node(node.id)
@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
def start_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> None:
"""
Start an Ethernet switch.
This endpoint results in no action since Ethernet switch nodes are always on.
"""
pass
@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
def stop_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> None:
"""
Stop an Ethernet switch.
This endpoint results in no action since Ethernet switch nodes are always on.
"""
pass
@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
def suspend_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> None:
"""
Suspend an Ethernet switch.
This endpoint results in no action since Ethernet switch nodes are always on.
"""
pass
@router.post("/{node_id}/reload", status_code=status.HTTP_204_NO_CONTENT)
def reload_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> None:
"""
Reload an Ethernet switch.
This endpoint results in no action since Ethernet switch nodes are always on.
"""
pass
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
)
async def create_ethernet_switch_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: schemas.UDPNIO,
node: EthernetSwitch = Depends(dep_node)
) -> schemas.UDPNIO:
nio = await Dynamips.instance().create_nio(node, jsonable_encoder(nio_data, exclude_unset=True))
await node.add_nio(nio, port_number)
return nio.asdict()
@router.delete("/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio", status_code=status.HTTP_204_NO_CONTENT)
async def delete_ethernet_switch_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: EthernetSwitch = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The adapter number on the switch is always 0.
"""
nio = await node.remove_nio(port_number)
await nio.delete()
@router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start")
async def start_ethernet_switch_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: EthernetSwitch = Depends(dep_node),
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the switch is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop", status_code=status.HTTP_204_NO_CONTENT
)
async def stop_ethernet_switch_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: EthernetSwitch = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the switch is always 0.
"""
await node.stop_capture(port_number)
@router.get("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream")
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: EthernetSwitch = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the switch is always 0.
"""
nio = node.get_nio(port_number)
stream = Dynamips.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,240 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for Frame Relay switch nodes.
"""
import os
from fastapi import APIRouter, Depends, Body, Path, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from gns3server import schemas
from gns3server.compute.dynamips import Dynamips
from gns3server.compute.dynamips.nodes.frame_relay_switch import FrameRelaySwitch
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Frame Relay switch node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> FrameRelaySwitch:
"""
Dependency to retrieve a node.
"""
dynamips_manager = Dynamips.instance()
node = dynamips_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.FrameRelaySwitch,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create Frame Relay switch node"}},
)
async def create_frame_relay_switch(
project_id: UUID,
node_data: schemas.FrameRelaySwitchCreate
) -> schemas.FrameRelaySwitch:
"""
Create a new Frame Relay switch node.
"""
# Use the Dynamips Frame Relay switch to simulate this node
dynamips_manager = Dynamips.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await dynamips_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
node_type="frame_relay_switch",
mappings=node_data.get("mappings"),
)
return node.asdict()
@router.get("/{node_id}", response_model=schemas.FrameRelaySwitch)
def get_frame_relay_switch(node: FrameRelaySwitch = Depends(dep_node)) -> schemas.FrameRelaySwitch:
"""
Return a Frame Relay switch node.
"""
return node.asdict()
@router.post("/{node_id}/duplicate", response_model=schemas.FrameRelaySwitch, status_code=status.HTTP_201_CREATED)
async def duplicate_frame_relay_switch(
destination_node_id: UUID = Body(..., embed=True),
node: FrameRelaySwitch = Depends(dep_node)
) -> schemas.FrameRelaySwitch:
"""
Duplicate a Frame Relay switch node.
"""
new_node = await Dynamips.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.put("/{node_id}", response_model=schemas.FrameRelaySwitch)
async def update_frame_relay_switch(
node_data: schemas.FrameRelaySwitchUpdate,
node: FrameRelaySwitch = Depends(dep_node)
) -> schemas.FrameRelaySwitch:
"""
Update an Frame Relay switch node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
if "name" in node_data and node.name != node_data["name"]:
await node.set_name(node_data["name"])
if "mappings" in node_data:
node.mappings = node_data["mappings"]
node.updated()
return node.asdict()
@router.delete("/{node_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_frame_relay_switch(node: FrameRelaySwitch = Depends(dep_node)) -> None:
"""
Delete a Frame Relay switch node.
"""
await Dynamips.instance().delete_node(node.id)
@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
def start_frame_relay_switch(node: FrameRelaySwitch = Depends(dep_node)) -> None:
"""
Start a Frame Relay switch node.
This endpoint results in no action since Frame Relay switch nodes are always on.
"""
pass
@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
def stop_frame_relay_switch(node: FrameRelaySwitch = Depends(dep_node)) -> None:
"""
Stop a Frame Relay switch node.
This endpoint results in no action since Frame Relay switch nodes are always on.
"""
pass
@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
def suspend_frame_relay_switch(node: FrameRelaySwitch = Depends(dep_node)) -> None:
"""
Suspend a Frame Relay switch node.
This endpoint results in no action since Frame Relay switch nodes are always on.
"""
pass
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
)
async def create_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: schemas.UDPNIO,
node: FrameRelaySwitch = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The adapter number on the switch is always 0.
"""
nio = await Dynamips.instance().create_nio(node, jsonable_encoder(nio_data, exclude_unset=True))
await node.add_nio(nio, port_number)
return nio.asdict()
@router.delete("/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio", status_code=status.HTTP_204_NO_CONTENT)
async def delete_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: FrameRelaySwitch = Depends(dep_node)
) -> None:
"""
Remove a NIO (Network Input/Output) from the node.
The adapter number on the switch is always 0.
"""
nio = await node.remove_nio(port_number)
await nio.delete()
@router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start")
async def start_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: FrameRelaySwitch = Depends(dep_node),
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the switch is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop", status_code=status.HTTP_204_NO_CONTENT
)
async def stop_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: FrameRelaySwitch = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the switch is always 0.
"""
await node.stop_capture(port_number)
@router.get("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream")
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: FrameRelaySwitch = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the hub is always 0.
"""
nio = node.get_nio(port_number)
stream = Dynamips.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,156 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for images.
"""
import os
import urllib.parse
from fastapi import APIRouter, Request, status, Response, HTTPException
from fastapi.responses import FileResponse
from typing import List
from gns3server.compute.docker import Docker
from gns3server.compute.dynamips import Dynamips
from gns3server.compute.iou import IOU
from gns3server.compute.qemu import Qemu
router = APIRouter()
@router.get("/docker/images")
async def get_docker_images() -> List[dict]:
"""
Get all Docker images.
"""
docker_manager = Docker.instance()
return await docker_manager.list_images()
@router.get("/dynamips/images")
async def get_dynamips_images() -> List[dict]:
"""
Get all Dynamips images.
"""
dynamips_manager = Dynamips.instance()
return await dynamips_manager.list_images()
@router.post("/dynamips/images/{filename:path}", status_code=status.HTTP_204_NO_CONTENT)
async def upload_dynamips_image(filename: str, request: Request) -> None:
"""
Upload a Dynamips IOS image.
"""
dynamips_manager = Dynamips.instance()
await dynamips_manager.write_image(urllib.parse.unquote(filename), request.stream())
@router.get("/dynamips/images/{filename:path}")
async def download_dynamips_image(filename: str) -> FileResponse:
"""
Download a Dynamips IOS image.
"""
filename = urllib.parse.unquote(filename)
# Raise error if user try to escape
if filename[0] == "." or os.path.sep in filename:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
dynamips_manager = Dynamips.instance()
image_path = dynamips_manager.get_abs_image_path(filename)
if not os.path.exists(image_path):
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
return FileResponse(image_path, media_type="application/octet-stream")
@router.get("/iou/images")
async def get_iou_images() -> List[dict]:
"""
Get all IOU images.
"""
iou_manager = IOU.instance()
return await iou_manager.list_images()
@router.post("/iou/images/{filename:path}", status_code=status.HTTP_204_NO_CONTENT)
async def upload_iou_image(filename: str, request: Request) -> None:
"""
Upload an IOU image.
"""
iou_manager = IOU.instance()
await iou_manager.write_image(urllib.parse.unquote(filename), request.stream())
@router.get("/iou/images/{filename:path}")
async def download_iou_image(filename: str) -> FileResponse:
"""
Download an IOU image.
"""
filename = urllib.parse.unquote(filename)
# Raise error if user try to escape
if filename[0] == "." or os.path.sep in filename:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
iou_manager = IOU.instance()
image_path = iou_manager.get_abs_image_path(filename)
if not os.path.exists(image_path):
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
return FileResponse(image_path, media_type="application/octet-stream")
@router.get("/qemu/images")
async def get_qemu_images() -> List[dict]:
qemu_manager = Qemu.instance()
return await qemu_manager.list_images()
@router.post("/qemu/images/{filename:path}", status_code=status.HTTP_204_NO_CONTENT)
async def upload_qemu_image(filename: str, request: Request) -> None:
qemu_manager = Qemu.instance()
await qemu_manager.write_image(urllib.parse.unquote(filename), request.stream())
@router.get("/qemu/images/{filename:path}")
async def download_qemu_image(filename: str) -> FileResponse:
filename = urllib.parse.unquote(filename)
# Raise error if user try to escape
if filename[0] == "." or os.path.sep in filename:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
qemu_manager = Qemu.instance()
image_path = qemu_manager.get_abs_image_path(filename)
if not os.path.exists(image_path):
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
return FileResponse(image_path, media_type="application/octet-stream")

View File

@ -0,0 +1,344 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for IOU nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Depends, Body, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from typing import Union
from uuid import UUID
from gns3server import schemas
from gns3server.compute.iou import IOU
from gns3server.compute.iou.iou_vm import IOUVM
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or IOU node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> IOUVM:
"""
Dependency to retrieve a node.
"""
iou_manager = IOU.instance()
node = iou_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.IOU,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create IOU node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_iou_node(project_id: UUID, node_data: schemas.IOUCreate) -> schemas.IOU:
"""
Create a new IOU node.
"""
iou = IOU.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
vm = await iou.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
application_id=node_data.get("application_id"),
path=node_data.get("path"),
console=node_data.get("console"),
console_type=node_data.get("console_type", "telnet"),
)
for name, value in node_data.items():
if hasattr(vm, name) and getattr(vm, name) != value:
if name == "application_id":
continue # we must ignore this to avoid overwriting the application_id allocated by the controller
if name == "startup_config_content" and (vm.startup_config_content and len(vm.startup_config_content) > 0):
continue
if name == "private_config_content" and (vm.private_config_content and len(vm.private_config_content) > 0):
continue
if node_data.get("use_default_iou_values") and (name == "ram" or name == "nvram"):
continue
setattr(vm, name, value)
return vm.asdict()
@router.get(
"/{node_id}",
response_model=schemas.IOU,
dependencies=[Depends(compute_authentication)]
)
def get_iou_node(node: IOUVM = Depends(dep_node)) -> schemas.IOU:
"""
Return an IOU node.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.IOU,
dependencies=[Depends(compute_authentication)]
)
async def update_iou_node(node_data: schemas.IOUUpdate, node: IOUVM = Depends(dep_node)) -> schemas.IOU:
"""
Update an IOU node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
for name, value in node_data.items():
if hasattr(node, name) and getattr(node, name) != value:
if name == "application_id":
continue # we must ignore this to avoid overwriting the application_id allocated by the IOU manager
setattr(node, name, value)
if node.use_default_iou_values:
# update the default IOU values in case the image or use_default_iou_values have changed
# this is important to have the correct NVRAM amount in order to correctly push the configs to the NVRAM
await node.update_default_iou_values()
node.updated()
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_iou_node(node: IOUVM = Depends(dep_node)) -> None:
"""
Delete an IOU node.
"""
await IOU.instance().delete_node(node.id)
@router.post(
"/{node_id}/duplicate",
response_model=schemas.IOU,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(compute_authentication)]
)
async def duplicate_iou_node(
destination_node_id: UUID = Body(..., embed=True),
node: IOUVM = Depends(dep_node)
) -> schemas.IOU:
"""
Duplicate an IOU node.
"""
new_node = await IOU.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_iou_node(start_data: schemas.IOUStart, node: IOUVM = Depends(dep_node)) -> None:
"""
Start an IOU node.
"""
start_data = jsonable_encoder(start_data, exclude_unset=True)
for name, value in start_data.items():
if hasattr(node, name) and getattr(node, name) != value:
setattr(node, name, value)
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_iou_node(node: IOUVM = Depends(dep_node)) -> None:
"""
Stop an IOU node.
"""
await node.stop()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
def suspend_iou_node(node: IOUVM = Depends(dep_node)) -> None:
"""
Suspend an IOU node.
Does nothing since IOU doesn't support being suspended.
"""
pass
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_iou_node(node: IOUVM = Depends(dep_node)) -> None:
"""
Reload an IOU node.
"""
await node.reload()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
dependencies=[Depends(compute_authentication)]
)
async def create_iou_node_nio(
adapter_number: int,
port_number: int,
nio_data: Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
node: IOUVM = Depends(dep_node),
) -> Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO]:
"""
Add a NIO (Network Input/Output) to the node.
"""
nio = IOU.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.adapter_add_nio_binding(adapter_number, port_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
dependencies=[Depends(compute_authentication)]
)
async def update_iou_node_nio(
adapter_number: int,
port_number: int,
nio_data: Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
node: IOUVM = Depends(dep_node),
) -> Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO]:
"""
Update a NIO (Network Input/Output) on the node.
"""
nio = node.get_nio(adapter_number, port_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.adapter_update_nio_binding(adapter_number, port_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_iou_node_nio(adapter_number: int, port_number: int, node: IOUVM = Depends(dep_node)) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
"""
await node.adapter_remove_nio_binding(adapter_number, port_number)
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_iou_node_capture(
adapter_number: int,
port_number: int,
node_capture_data: schemas.NodeCapture,
node: IOUVM = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, pcap_file_path)
return {"pcap_file_path": str(pcap_file_path)}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_iou_node_capture(adapter_number: int, port_number: int, node: IOUVM = Depends(dep_node)) -> None:
"""
Stop a packet capture on the node.
"""
await node.stop_capture(adapter_number, port_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
adapter_number: int,
port_number: int,
node: IOUVM = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
"""
nio = node.get_nio(adapter_number, port_number)
stream = IOU.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.websocket(
"/{node_id}/console/ws",
)
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: IOUVM = Depends(dep_node)
) -> None:
"""
Console WebSocket.
"""
if websocket:
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: IOUVM = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,244 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for NAT nodes.
"""
import os
from fastapi import APIRouter, Depends, Path, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from typing import Union
from uuid import UUID
from gns3server import schemas
from gns3server.compute.builtin import Builtin
from gns3server.compute.builtin.nodes.nat import Nat
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or NAT node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> Nat:
"""
Dependency to retrieve a node.
"""
builtin_manager = Builtin.instance()
node = builtin_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.NAT,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create NAT node"}},
)
async def create_nat_node(project_id: UUID, node_data: schemas.NATCreate) -> schemas.NAT:
"""
Create a new NAT node.
"""
builtin_manager = Builtin.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await builtin_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
node_type="nat",
ports=node_data.get("ports_mapping"),
)
node.usage = node_data.get("usage", "")
return node.asdict()
@router.get("/{node_id}", response_model=schemas.NAT)
def get_nat_node(node: Nat = Depends(dep_node)) -> schemas.NAT:
"""
Return a NAT node.
"""
return node.asdict()
@router.put("/{node_id}", response_model=schemas.NAT)
async def update_nat_node(node_data: schemas.NATUpdate, node: Nat = Depends(dep_node)) -> schemas.NAT:
"""
Update a NAT node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
for name, value in node_data.items():
if hasattr(node, name) and getattr(node, name) != value:
setattr(node, name, value)
node.updated()
return node.asdict()
@router.delete("/{node_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_nat_node(node: Nat = Depends(dep_node)) -> None:
"""
Delete a cloud node.
"""
await Builtin.instance().delete_node(node.id)
@router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT)
async def start_nat_node(node: Nat = Depends(dep_node)) -> None:
"""
Start a NAT node.
"""
await node.start()
@router.post("/{node_id}/stop", status_code=status.HTTP_204_NO_CONTENT)
async def stop_nat_node(node: Nat = Depends(dep_node)) -> None:
"""
Stop a NAT node.
This endpoint results in no action since cloud nodes cannot be stopped.
"""
pass
@router.post("/{node_id}/suspend", status_code=status.HTTP_204_NO_CONTENT)
async def suspend_nat_node(node: Nat = Depends(dep_node)) -> None:
"""
Suspend a NAT node.
This endpoint results in no action since NAT nodes cannot be suspended.
"""
pass
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
)
async def create_nat_node_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
node: Nat = Depends(dep_node),
) -> Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO]:
"""
Add a NIO (Network Input/Output) to the node.
The adapter number on the cloud is always 0.
"""
nio = Builtin.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.add_nio(nio, port_number)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
)
async def update_nat_node_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO],
node: Nat = Depends(dep_node),
) -> Union[schemas.EthernetNIO, schemas.TAPNIO, schemas.UDPNIO]:
"""
Update a NIO (Network Input/Output) to the node.
The adapter number on the cloud is always 0.
"""
nio = node.get_nio(port_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.update_nio(port_number, nio)
return nio.asdict()
@router.delete("/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio", status_code=status.HTTP_204_NO_CONTENT)
async def delete_nat_node_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: Nat = Depends(dep_node)
) -> None:
"""
Remove a NIO (Network Input/Output) from the node.
The adapter number on the cloud is always 0.
"""
await node.remove_nio(port_number)
@router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start")
async def start_nat_node_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: Nat = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the cloud is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(port_number, pcap_file_path, node_capture_data.data_link_type)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop", status_code=status.HTTP_204_NO_CONTENT
)
async def stop_nat_node_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: Nat = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the cloud is always 0.
"""
await node.stop_capture(port_number)
@router.get("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream")
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: Nat = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the cloud is always 0.
"""
nio = node.get_nio(port_number)
stream = Builtin.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,88 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for compute notifications.
"""
from fastapi import APIRouter, Depends, WebSocket, WebSocketDisconnect
from typing import Union
from websockets.exceptions import ConnectionClosed, WebSocketException
from gns3server.compute.notification_manager import NotificationManager
from .dependencies.authentication import ws_compute_authentication
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.websocket("/notifications/ws")
async def project_ws_notifications(websocket: Union[None, WebSocket] = Depends(ws_compute_authentication)) -> None:
"""
Receive project notifications about the project from WebSocket.
"""
if websocket:
log.info(f"New client {websocket.client.host}:{websocket.client.port} has connected to compute WebSocket")
try:
with NotificationManager.instance().queue() as queue:
while True:
notification = await queue.get_json(5)
await websocket.send_text(notification)
except (ConnectionClosed, WebSocketDisconnect):
log.info(f"Client {websocket.client.host}:{websocket.client.port} has disconnected from compute WebSocket")
except WebSocketException as e:
log.warning(f"Error while sending to controller event to WebSocket client: {e}")
if __name__ == "__main__":
import uvicorn
from fastapi import FastAPI
from starlette.responses import HTMLResponse
app = FastAPI()
app.include_router(router)
html = """
<!DOCTYPE html>
<html>
<body>
<ul id='messages'>
</ul>
<script>
var ws = new WebSocket("ws://localhost:8000/notifications/ws");
ws.onmessage = function(event) {
var messages = document.getElementById('messages')
var message = document.createElement('li')
var content = document.createTextNode(event.data)
message.appendChild(content)
messages.appendChild(message)
};
</script>
</body>
</html>
"""
@app.get("/")
async def get() -> HTMLResponse:
return HTMLResponse(html)
uvicorn.run(app, host="localhost", port=8000)

View File

@ -0,0 +1,243 @@
#
# Copyright (C) 2015 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for projects.
"""
import os
import urllib.parse
import logging
log = logging.getLogger()
from fastapi import APIRouter, Depends, HTTPException, Request, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import FileResponse
from typing import List
from uuid import UUID
from gns3server.compute.project_manager import ProjectManager
from gns3server.compute.project import Project
from gns3server.utils.path import is_safe_path
from gns3server import schemas
router = APIRouter()
# How many clients have subscribed to notifications
_notifications_listening = {}
def dep_project(project_id: UUID) -> Project:
"""
Dependency to retrieve a project.
"""
pm = ProjectManager.instance()
project = pm.get_project(str(project_id))
return project
@router.get("/projects", response_model=List[schemas.Project])
def get_compute_projects() -> List[schemas.Project]:
"""
Get all projects opened on the compute.
"""
pm = ProjectManager.instance()
return [p.asdict() for p in pm.projects]
@router.post("/projects", status_code=status.HTTP_201_CREATED, response_model=schemas.Project)
def create_compute_project(project_data: schemas.ProjectCreate) -> schemas.Project:
"""
Create a new project on the compute.
"""
pm = ProjectManager.instance()
project_data = jsonable_encoder(project_data, exclude_unset=True)
project = pm.create_project(
name=project_data.get("name"),
path=project_data.get("path"),
project_id=project_data.get("project_id"),
variables=project_data.get("variables", None),
)
return project.asdict()
@router.put("/projects/{project_id}", response_model=schemas.Project)
async def update_compute_project(
project_data: schemas.ProjectUpdate,
project: Project = Depends(dep_project)
) -> schemas.Project:
"""
Update project on the compute.
"""
await project.update(variables=project_data.variables)
return project.asdict()
@router.get("/projects/{project_id}", response_model=schemas.Project)
def get_compute_project(project: Project = Depends(dep_project)) -> schemas.Project:
"""
Return a project from the compute.
"""
return project.asdict()
@router.post("/projects/{project_id}/close", status_code=status.HTTP_204_NO_CONTENT)
async def close_compute_project(project: Project = Depends(dep_project)) -> None:
"""
Close a project on the compute.
"""
# FIXME
if _notifications_listening.setdefault(project.id, 0) <= 1:
await project.close()
ProjectManager.instance().remove_project(project.id)
try:
del _notifications_listening[project.id]
except KeyError:
pass
else:
log.warning("Skip project closing, another client is listening for project notifications")
@router.delete("/projects/{project_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_compute_project(project: Project = Depends(dep_project)) -> None:
"""
Delete project from the compute.
"""
await project.delete()
ProjectManager.instance().remove_project(project.id)
# @Route.get(
# r"/projects/{project_id}/notifications",
# description="Receive notifications about the project",
# parameters={
# "project_id": "Project UUID",
# },
# status_codes={
# 200: "End of stream",
# 404: "The project doesn't exist"
# })
# async def notification(request, response):
#
# pm = ProjectManager.instance()
# project = pm.get_project(request.match_info["project_id"])
#
# response.content_type = "application/json"
# response.set_status(200)
# response.enable_chunked_encoding()
#
# response.start(request)
# queue = project.get_listen_queue()
# ProjectHandler._notifications_listening.setdefault(project.id, 0)
# ProjectHandler._notifications_listening[project.id] += 1
# await response.write("{}\n".format(json.dumps(ProjectHandler._getPingMessage())).encode("utf-8"))
# while True:
# try:
# (action, msg) = await asyncio.wait_for(queue.get(), 5)
# if hasattr(msg, "asdict"):
# msg = json.dumps({"action": action, "event": msg.asdict()}, sort_keys=True)
# else:
# msg = json.dumps({"action": action, "event": msg}, sort_keys=True)
# log.debug("Send notification: %s", msg)
# await response.write(("{}\n".format(msg)).encode("utf-8"))
# except asyncio.TimeoutError:
# await response.write("{}\n".format(json.dumps(ProjectHandler._getPingMessage())).encode("utf-8"))
# project.stop_listen_queue(queue)
# if project.id in ProjectHandler._notifications_listening:
# ProjectHandler._notifications_listening[project.id] -= 1
# def _getPingMessage(cls):
# """
# Ping messages are regularly sent to the client to
# keep the connection open. We send with it some information about server load.
#
# :returns: hash
# """
# stats = {}
# # Non blocking call in order to get cpu usage. First call will return 0
# stats["cpu_usage_percent"] = CpuPercent.get(interval=None)
# stats["memory_usage_percent"] = psutil.virtual_memory().percent
# stats["disk_usage_percent"] = psutil.disk_usage(get_default_project_directory()).percent
# return {"action": "ping", "event": stats}
@router.get("/projects/{project_id}/files", response_model=List[schemas.ProjectFile])
async def get_compute_project_files(project: Project = Depends(dep_project)) -> List[schemas.ProjectFile]:
"""
Return files belonging to a project.
"""
return await project.list_files()
@router.get("/projects/{project_id}/files/{file_path:path}")
async def get_compute_project_file(file_path: str, project: Project = Depends(dep_project)) -> FileResponse:
"""
Get a file from a project.
"""
file_path = urllib.parse.unquote(file_path)
path = os.path.normpath(file_path)
# Raise error if user try to escape
if not is_safe_path(path, project.path):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
path = os.path.join(project.path, path)
if not os.path.exists(path):
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
return FileResponse(path, media_type="application/octet-stream")
@router.post("/projects/{project_id}/files/{file_path:path}", status_code=status.HTTP_204_NO_CONTENT)
async def write_compute_project_file(
file_path: str,
request: Request,
project: Project = Depends(dep_project)
) -> None:
file_path = urllib.parse.unquote(file_path)
path = os.path.normpath(file_path)
# Raise error if user try to escape
if not is_safe_path(path, project.path):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
path = os.path.join(project.path, path)
try:
os.makedirs(os.path.dirname(path), exist_ok=True)
try:
with open(path, "wb+") as f:
async for chunk in request.stream():
f.write(chunk)
except (UnicodeEncodeError, OSError) as e:
pass # FIXME
except FileNotFoundError:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
except PermissionError:
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)

View File

@ -0,0 +1,412 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for Qemu nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Depends, Body, Path, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from typing import Union
from uuid import UUID
from gns3server import schemas
from gns3server.compute.qemu import Qemu
from gns3server.compute.qemu.qemu_vm import QemuVM
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Qemu node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> QemuVM:
"""
Dependency to retrieve a node.
"""
qemu_manager = Qemu.instance()
node = qemu_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.Qemu,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create Qemu node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_qemu_node(project_id: UUID, node_data: schemas.QemuCreate) -> schemas.Qemu:
"""
Create a new Qemu node.
"""
qemu = Qemu.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
vm = await qemu.create_node(
node_data.pop("name"),
str(project_id),
node_data.pop("node_id", None),
linked_clone=node_data.get("linked_clone", True),
qemu_path=node_data.pop("qemu_path", None),
console=node_data.pop("console", None),
console_type=node_data.pop("console_type", "telnet"),
aux=node_data.get("aux"),
aux_type=node_data.pop("aux_type", "none"),
platform=node_data.pop("platform", None),
)
for name, value in node_data.items():
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
return vm.asdict()
@router.get(
"/{node_id}",
response_model=schemas.Qemu,
dependencies=[Depends(compute_authentication)]
)
def get_qemu_node(node: QemuVM = Depends(dep_node)) -> schemas.Qemu:
"""
Return a Qemu node.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.Qemu,
dependencies=[Depends(compute_authentication)]
)
async def update_qemu_node(node_data: schemas.QemuUpdate, node: QemuVM = Depends(dep_node)) -> schemas.Qemu:
"""
Update a Qemu node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
# update the console first to avoid issue if updating console type
node.console = node_data.pop("console", node.console)
for name, value in node_data.items():
if hasattr(node, name) and getattr(node, name) != value:
await node.update_property(name, value)
node.updated()
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_qemu_node(node: QemuVM = Depends(dep_node)) -> None:
"""
Delete a Qemu node.
"""
await Qemu.instance().delete_node(node.id)
@router.post(
"/{node_id}/duplicate",
response_model=schemas.Qemu,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(compute_authentication)]
)
async def duplicate_qemu_node(
destination_node_id: UUID = Body(..., embed=True),
node: QemuVM = Depends(dep_node)
) -> schemas.Qemu:
"""
Duplicate a Qemu node.
"""
new_node = await Qemu.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.post(
"/{node_id}/disk_image/{disk_name}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def create_qemu_disk_image(
disk_name: str,
disk_data: schemas.QemuDiskImageCreate,
node: QemuVM = Depends(dep_node)
) -> None:
"""
Create a Qemu disk image.
"""
options = jsonable_encoder(disk_data, exclude_unset=True)
await node.create_disk_image(disk_name, options)
@router.put(
"/{node_id}/disk_image/{disk_name}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def update_qemu_disk_image(
disk_name: str,
disk_data: schemas.QemuDiskImageUpdate,
node: QemuVM = Depends(dep_node)
) -> None:
"""
Update a Qemu disk image.
"""
if disk_data.extend:
await node.resize_disk_image(disk_name, disk_data.extend)
@router.delete(
"/{node_id}/disk_image/{disk_name}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_qemu_disk_image(
disk_name: str,
node: QemuVM = Depends(dep_node)
) -> None:
"""
Delete a Qemu disk image.
"""
node.delete_disk_image(disk_name)
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_qemu_node(node: QemuVM = Depends(dep_node)) -> None:
"""
Start a Qemu node.
"""
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_qemu_node(node: QemuVM = Depends(dep_node)) -> None:
"""
Stop a Qemu node.
"""
await node.stop()
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_qemu_node(node: QemuVM = Depends(dep_node)) -> None:
"""
Reload a Qemu node.
"""
await node.reload()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def suspend_qemu_node(node: QemuVM = Depends(dep_node)) -> None:
"""
Suspend a Qemu node.
"""
await node.suspend()
@router.post(
"/{node_id}/resume",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def resume_qemu_node(node: QemuVM = Depends(dep_node)) -> None:
"""
Resume a Qemu node.
"""
await node.resume()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def create_qemu_node_nio(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
nio_data: schemas.UDPNIO,
node: QemuVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The port number on the Qemu node is always 0.
"""
nio = Qemu.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.adapter_add_nio_binding(adapter_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def update_qemu_node_nio(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
nio_data: schemas.UDPNIO,
node: QemuVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Update a NIO (Network Input/Output) on the node.
The port number on the Qemu node is always 0.
"""
nio = node.get_nio(adapter_number)
if nio_data.filters:
nio.filters = nio_data.filters
if nio_data.suspend:
nio.suspend = nio_data.suspend
await node.adapter_update_nio_binding(adapter_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_qemu_node_nio(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: QemuVM = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The port number on the Qemu node is always 0.
"""
await node.adapter_remove_nio_binding(adapter_number)
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_qemu_node_capture(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node_capture_data: schemas.NodeCapture,
node: QemuVM = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The port number on the Qemu node is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, pcap_file_path)
return {"pcap_file_path": str(pcap_file_path)}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_qemu_node_capture(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: QemuVM = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The port number on the Qemu node is always 0.
"""
await node.stop_capture(adapter_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: QemuVM = Depends(dep_node)) -> StreamingResponse:
"""
Stream the pcap capture file.
The port number on the Qemu node is always 0.
"""
nio = node.get_nio(adapter_number)
stream = Qemu.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.websocket(
"/{node_id}/console/ws"
)
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: QemuVM = Depends(dep_node)
) -> None:
"""
Console WebSocket.
"""
if websocket:
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: QemuVM = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,377 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for VirtualBox nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Depends, Path, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from typing import Union
from gns3server import schemas
from gns3server.compute.virtualbox import VirtualBox
from gns3server.compute.virtualbox.virtualbox_error import VirtualBoxError
from gns3server.compute.virtualbox.virtualbox_vm import VirtualBoxVM
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or VirtualBox node"}}
router = APIRouter(responses=responses, deprecated=True)
def dep_node(project_id: UUID, node_id: UUID) -> VirtualBoxVM:
"""
Dependency to retrieve a node.
"""
vbox_manager = VirtualBox.instance()
node = vbox_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.VirtualBox,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create VirtualBox node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_virtualbox_node(project_id: UUID, node_data: schemas.VirtualBoxCreate) -> schemas.VirtualBox:
"""
Create a new VirtualBox node.
"""
vbox_manager = VirtualBox.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
vm = await vbox_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
node_data.pop("vmname"),
linked_clone=node_data.pop("linked_clone", False),
console=node_data.get("console", None),
console_type=node_data.get("console_type", "telnet"),
adapters=node_data.get("adapters", 0),
)
if "ram" in node_data:
ram = node_data.pop("ram")
if ram != vm.ram:
await vm.set_ram(ram)
for name, value in node_data.items():
if name != "node_id":
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
return vm.asdict()
@router.get(
"/{node_id}",
response_model=schemas.VirtualBox,
dependencies=[Depends(compute_authentication)]
)
def get_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> schemas.VirtualBox:
"""
Return a VirtualBox node.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.VirtualBox,
dependencies=[Depends(compute_authentication)]
)
async def update_virtualbox_node(
node_data: schemas.VirtualBoxUpdate,
node: VirtualBoxVM = Depends(dep_node)
) -> schemas.VirtualBox:
"""
Update a VirtualBox node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
if "name" in node_data:
name = node_data.pop("name")
vmname = node_data.pop("vmname", None)
if name != node.name:
oldname = node.name
node.name = name
if node.linked_clone:
try:
await node.set_vmname(node.name)
except VirtualBoxError as e: # In case of error we rollback (we can't change the name when running)
node.name = oldname
node.updated()
raise e
if "adapters" in node_data:
adapters = node_data.pop("adapters")
if adapters != node.adapters:
await node.set_adapters(adapters)
if "ram" in node_data:
ram = node_data.pop("ram")
if ram != node.ram:
await node.set_ram(ram)
# update the console first to avoid issue if updating console type
node.console = node_data.pop("console", node.console)
for name, value in node_data.items():
if hasattr(node, name) and getattr(node, name) != value:
setattr(node, name, value)
node.updated()
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> None:
"""
Delete a VirtualBox node.
"""
await VirtualBox.instance().delete_node(node.id)
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> None:
"""
Start a VirtualBox node.
"""
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> None:
"""
Stop a VirtualBox node.
"""
await node.stop()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def suspend_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> None:
"""
Suspend a VirtualBox node.
"""
await node.suspend()
@router.post(
"/{node_id}/resume",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def resume_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> None:
"""
Resume a VirtualBox node.
"""
await node.resume()
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_virtualbox_node(node: VirtualBoxVM = Depends(dep_node)) -> None:
"""
Reload a VirtualBox node.
"""
await node.reload()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def create_virtualbox_node_nio(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
nio_data: schemas.UDPNIO,
node: VirtualBoxVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The port number on the VirtualBox node is always 0.
"""
nio = VirtualBox.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.adapter_add_nio_binding(adapter_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def update_virtualbox_node_nio(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
nio_data: schemas.UDPNIO,
node: VirtualBoxVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Update a NIO (Network Input/Output) on the node.
The port number on the VirtualBox node is always 0.
"""
nio = node.get_nio(adapter_number)
if nio_data.filters:
nio.filters = nio_data.filters
if nio_data.suspend:
nio.suspend = nio_data.suspend
await node.adapter_update_nio_binding(adapter_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_virtualbox_node_nio(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: VirtualBoxVM = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The port number on the VirtualBox node is always 0.
"""
await node.adapter_remove_nio_binding(adapter_number)
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_virtualbox_node_capture(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node_capture_data: schemas.NodeCapture,
node: VirtualBoxVM = Depends(dep_node),
) -> dict:
"""
Start a packet capture on the node.
The port number on the VirtualBox node is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, pcap_file_path)
return {"pcap_file_path": str(pcap_file_path)}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_virtualbox_node_capture(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: VirtualBoxVM = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The port number on the VirtualBox node is always 0.
"""
await node.stop_capture(adapter_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: VirtualBoxVM = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The port number on the VirtualBox node is always 0.
"""
nio = node.get_nio(adapter_number)
stream = VirtualBox.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.websocket(
"/{node_id}/console/ws"
)
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: VirtualBoxVM = Depends(dep_node)
) -> None:
"""
Console WebSocket.
"""
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: VirtualBoxVM = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,355 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for VMware nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Depends, Path, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from uuid import UUID
from typing import Union
from gns3server import schemas
from gns3server.compute.vmware import VMware
from gns3server.compute.vmware.vmware_vm import VMwareVM
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or VMware node"}}
router = APIRouter(responses=responses, deprecated=True)
def dep_node(project_id: UUID, node_id: UUID) -> VMwareVM:
"""
Dependency to retrieve a node.
"""
vmware_manager = VMware.instance()
node = vmware_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.VMware,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create VMware node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_vmware_node(project_id: UUID, node_data: schemas.VMwareCreate) -> schemas.VMware:
"""
Create a new VMware node.
"""
vmware_manager = VMware.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
vm = await vmware_manager.create_node(
node_data.pop("name"),
str(project_id),
node_data.get("node_id"),
node_data.pop("vmx_path"),
linked_clone=node_data.pop("linked_clone"),
console=node_data.get("console", None),
console_type=node_data.get("console_type", "telnet"),
)
for name, value in node_data.items():
if name != "node_id":
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
return vm.asdict()
@router.get(
"/{node_id}",
response_model=schemas.VMware,
dependencies=[Depends(compute_authentication)]
)
def get_vmware_node(node: VMwareVM = Depends(dep_node)) -> schemas.VMware:
"""
Return a VMware node.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.VMware,
dependencies=[Depends(compute_authentication)]
)
async def update_vmware_node(node_data: schemas.VMwareUpdate, node: VMwareVM = Depends(dep_node)) -> schemas.VMware:
"""
Update a VMware node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
# update the console first to avoid issue if updating console type
node.console = node_data.pop("console", node.console)
for name, value in node_data.items():
if hasattr(node, name) and getattr(node, name) != value:
setattr(node, name, value)
node.updated()
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_vmware_node(node: VMwareVM = Depends(dep_node)) -> None:
"""
Delete a VMware node.
"""
await VMware.instance().delete_node(node.id)
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_vmware_node(node: VMwareVM = Depends(dep_node)) -> None:
"""
Start a VMware node.
"""
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_vmware_node(node: VMwareVM = Depends(dep_node)) -> None:
"""
Stop a VMware node.
"""
await node.stop()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def suspend_vmware_node(node: VMwareVM = Depends(dep_node)) -> None:
"""
Suspend a VMware node.
"""
await node.suspend()
@router.post(
"/{node_id}/resume",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def resume_vmware_node(node: VMwareVM = Depends(dep_node)) -> None:
"""
Resume a VMware node.
"""
await node.resume()
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_vmware_node(node: VMwareVM = Depends(dep_node)) -> None:
"""
Reload a VMware node.
"""
await node.reload()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def create_vmware_node_nio(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
nio_data: schemas.UDPNIO,
node: VMwareVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The port number on the VMware node is always 0.
"""
nio = VMware.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.adapter_add_nio_binding(adapter_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def update_vmware_node_nio(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
nio_data: schemas.UDPNIO,
node: VMwareVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Update a NIO (Network Input/Output) on the node.
The port number on the VMware node is always 0.
"""
nio = node.get_nio(adapter_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.adapter_update_nio_binding(adapter_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_vmware_node_nio(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: VMwareVM = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The port number on the VMware node is always 0.
"""
await node.adapter_remove_nio_binding(adapter_number)
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_vmware_node_capture(
*,
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node_capture_data: schemas.NodeCapture,
node: VMwareVM = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The port number on the VMware node is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, pcap_file_path)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_vmware_node_capture(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: VMwareVM = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The port number on the VMware node is always 0.
"""
await node.stop_capture(adapter_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
adapter_number: int,
port_number: int = Path(..., ge=0, le=0),
node: VMwareVM = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The port number on the VMware node is always 0.
"""
nio = node.get_nio(adapter_number)
stream = VMware.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.post(
"/{node_id}/interfaces/vmnet",
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(compute_authentication)]
)
def allocate_vmnet(node: VMwareVM = Depends(dep_node)) -> dict:
"""
Allocate a VMware VMnet interface on the server.
"""
vmware_manager = VMware.instance()
vmware_manager.refresh_vmnet_list(ubridge=False)
vmnet = vmware_manager.allocate_vmnet()
node.vmnets.append(vmnet)
return {"vmnet": vmnet}
@router.websocket("/{node_id}/console/ws")
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: VMwareVM = Depends(dep_node)
) -> None:
"""
Console WebSocket.
"""
if websocket:
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: VMwareVM = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,343 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for VPCS nodes.
"""
import os
from fastapi import APIRouter, WebSocket, Depends, Body, Path, status
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse
from typing import Union
from uuid import UUID
from gns3server import schemas
from gns3server.compute.vpcs import VPCS
from gns3server.compute.vpcs.vpcs_vm import VPCSVM
from .dependencies.authentication import compute_authentication, ws_compute_authentication
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or VMware node"}}
router = APIRouter(responses=responses)
def dep_node(project_id: UUID, node_id: UUID) -> VPCSVM:
"""
Dependency to retrieve a node.
"""
vpcs_manager = VPCS.instance()
node = vpcs_manager.get_node(str(node_id), project_id=str(project_id))
return node
@router.post(
"",
response_model=schemas.VPCS,
status_code=status.HTTP_201_CREATED,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create VMware node"}},
dependencies=[Depends(compute_authentication)]
)
async def create_vpcs_node(project_id: UUID, node_data: schemas.VPCSCreate) -> schemas.VPCS:
"""
Create a new VPCS node.
"""
vpcs = VPCS.instance()
node_data = jsonable_encoder(node_data, exclude_unset=True)
vm = await vpcs.create_node(
node_data["name"],
str(project_id),
node_data.get("node_id"),
console=node_data.get("console"),
console_type=node_data.get("console_type", "telnet"),
startup_script=node_data.get("startup_script"),
)
return vm.asdict()
@router.get(
"/{node_id}",
response_model=schemas.VPCS,
dependencies=[Depends(compute_authentication)]
)
def get_vpcs_node(node: VPCSVM = Depends(dep_node)) -> schemas.VPCS:
"""
Return a VPCS node.
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.VPCS,
dependencies=[Depends(compute_authentication)]
)
async def update_vpcs_node(node_data: schemas.VPCSUpdate, node: VPCSVM = Depends(dep_node)) -> schemas.VPCS:
"""
Update a VPCS node.
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
name = node_data.get("name", node.name)
if node.name != name:
node.name = name
console = node_data.get("console", node.console)
if node.console != console:
node.console = console
console_type = node_data.get("console_type", node.console_type)
if node.console_type != console_type:
node.console_type = console_type
node.updated()
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_vpcs_node(node: VPCSVM = Depends(dep_node)) -> None:
"""
Delete a VPCS node.
"""
await VPCS.instance().delete_node(node.id)
@router.post(
"/{node_id}/duplicate",
response_model=schemas.VPCS,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(compute_authentication)]
)
async def duplicate_vpcs_node(
destination_node_id: UUID = Body(..., embed=True),
node: VPCSVM = Depends(dep_node)) -> None:
"""
Duplicate a VPCS node.
"""
new_node = await VPCS.instance().duplicate_node(node.id, str(destination_node_id))
return new_node.asdict()
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def start_vpcs_node(node: VPCSVM = Depends(dep_node)) -> None:
"""
Start a VPCS node.
"""
await node.start()
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_vpcs_node(node: VPCSVM = Depends(dep_node)) -> None:
"""
Stop a VPCS node.
"""
await node.stop()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def suspend_vpcs_node(node: VPCSVM = Depends(dep_node)) -> None:
"""
Suspend a VPCS node.
Does nothing, suspend is not supported by VPCS.
"""
pass
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reload_vpcs_node(node: VPCSVM = Depends(dep_node)) -> None:
"""
Reload a VPCS node.
"""
await node.reload()
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def create_vpcs_node_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: schemas.UDPNIO,
node: VPCSVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Add a NIO (Network Input/Output) to the node.
The adapter number on the VPCS node is always 0.
"""
nio = VPCS.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True))
await node.port_add_nio_binding(port_number, nio)
return nio.asdict()
@router.put(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_201_CREATED,
response_model=schemas.UDPNIO,
dependencies=[Depends(compute_authentication)]
)
async def update_vpcs_node_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
nio_data: schemas.UDPNIO,
node: VPCSVM = Depends(dep_node)
) -> schemas.UDPNIO:
"""
Update a NIO (Network Input/Output) on the node.
The adapter number on the VPCS node is always 0.
"""
nio = node.get_nio(port_number)
if nio_data.filters:
nio.filters = nio_data.filters
await node.port_update_nio_binding(port_number, nio)
return nio.asdict()
@router.delete(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/nio",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def delete_vpcs_node_nio(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: VPCSVM = Depends(dep_node)
) -> None:
"""
Delete a NIO (Network Input/Output) from the node.
The adapter number on the VPCS node is always 0.
"""
await node.port_remove_nio_binding(port_number)
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start",
dependencies=[Depends(compute_authentication)]
)
async def start_vpcs_node_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node_capture_data: schemas.NodeCapture,
node: VPCSVM = Depends(dep_node)
) -> dict:
"""
Start a packet capture on the node.
The adapter number on the VPCS node is always 0.
"""
pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name)
await node.start_capture(adapter_number, pcap_file_path)
return {"pcap_file_path": pcap_file_path}
@router.post(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def stop_vpcs_node_capture(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: VPCSVM = Depends(dep_node)
) -> None:
"""
Stop a packet capture on the node.
The adapter number on the VPCS node is always 0.
"""
await node.stop_capture(port_number)
@router.get(
"/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream",
dependencies=[Depends(compute_authentication)]
)
async def stream_pcap_file(
*,
adapter_number: int = Path(..., ge=0, le=0),
port_number: int,
node: VPCSVM = Depends(dep_node)
) -> StreamingResponse:
"""
Stream the pcap capture file.
The adapter number on the VPCS node is always 0.
"""
nio = node.get_nio(port_number)
stream = VPCS.instance().stream_pcap_file(nio, node.project.id)
return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap")
@router.websocket(
"/{node_id}/console/ws"
)
async def console_ws(
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
node: VPCSVM = Depends(dep_node)) -> None:
"""
Console WebSocket.
"""
await node.start_websocket_console(websocket)
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(compute_authentication)]
)
async def reset_console(node: VPCSVM = Depends(dep_node)) -> None:
await node.reset_console()

View File

@ -0,0 +1,147 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from fastapi import APIRouter, Depends
from . import controller
from . import appliances
from . import computes
from . import drawings
from . import gns3vm
from . import links
from . import nodes
from . import projects
from . import snapshots
from . import symbols
from . import templates
from . import images
from . import users
from . import groups
from . import roles
from . import acl
from . import pools
from . import privileges
from .dependencies.authentication import get_current_active_user
router = APIRouter()
router.include_router(
controller.router,
tags=["Controller"]
)
router.include_router(
users.router,
prefix="/access/users",
tags=["Users"]
)
router.include_router(
groups.router,
prefix="/access/groups",
tags=["Users groups"]
)
router.include_router(
roles.router,
prefix="/access/roles",
tags=["Roles"]
)
router.include_router(
privileges.router,
dependencies=[Depends(get_current_active_user)],
prefix="/access/privileges",
tags=["Privileges"]
)
router.include_router(
acl.router,
prefix="/access/acl",
tags=["ACL"]
)
router.include_router(
images.router,
prefix="/images",
tags=["Images"]
)
router.include_router(
templates.router,
prefix="/templates",
tags=["Templates"]
)
router.include_router(
projects.router,
prefix="/projects",
tags=["Projects"])
router.include_router(
nodes.router,
prefix="/projects/{project_id}/nodes",
tags=["Nodes"]
)
router.include_router(
links.router,
prefix="/projects/{project_id}/links",
tags=["Links"]
)
router.include_router(
drawings.router,
prefix="/projects/{project_id}/drawings",
tags=["Drawings"])
router.include_router(
symbols.router,
prefix="/symbols", tags=["Symbols"]
)
router.include_router(
snapshots.router,
prefix="/projects/{project_id}/snapshots",
tags=["Snapshots"])
router.include_router(
computes.router,
dependencies=[Depends(get_current_active_user)],
prefix="/computes",
tags=["Computes"]
)
router.include_router(
appliances.router,
prefix="/appliances",
tags=["Appliances"]
)
router.include_router(
pools.router,
prefix="/pools",
tags=["Resource pools"]
)
router.include_router(
gns3vm.router,
dependencies=[Depends(get_current_active_user)],
deprecated=True,
prefix="/gns3vm",
tags=["GNS3 VM"]
)

View File

@ -0,0 +1,268 @@
#!/usr/bin/env python
#
# Copyright (C) 2023 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for ACL.
"""
import re
from fastapi import APIRouter, Depends, Request, status
from fastapi.routing import APIRoute
from uuid import UUID
from typing import List
from gns3server import schemas
from gns3server.controller.controller_error import (
ControllerBadRequestError,
ControllerNotFoundError
)
from gns3server.controller import Controller
from gns3server.db.repositories.users import UsersRepository
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.db.repositories.images import ImagesRepository
from gns3server.db.repositories.templates import TemplatesRepository
from gns3server.db.repositories.pools import ResourcePoolsRepository
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"/endpoints",
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("ACE.Audit"))]
)
async def endpoints(
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> List[dict]:
"""
List all endpoints to be used in ACL entries.
"""
controller = Controller.instance()
endpoints = [{"endpoint": "/", "name": "All endpoints", "endpoint_type": "root"}]
def add_to_endpoints(endpoint: str, name: str, endpoint_type: str) -> None:
if endpoint not in endpoints:
endpoints.append({"endpoint": endpoint, "name": name, "endpoint_type": endpoint_type})
# projects
add_to_endpoints("/projects", "All projects", "project")
projects = [p for p in controller.projects.values()]
for project in projects:
add_to_endpoints(f"/projects/{project.id}", f'Project "{project.name}"', "project")
if project.status == "closed":
nodes = project.nodes.values()
links = project.links.values()
else:
nodes = [v.asdict() for v in project.nodes.values()]
links = [v.asdict() for v in project.links.values()]
# nodes
add_to_endpoints(f"/projects/{project.id}/nodes", f'All nodes in project "{project.name}"', "node")
for node in nodes:
add_to_endpoints(
f"/projects/{project.id}/nodes/{node['node_id']}",
f'Node "{node["name"]}" in project "{project.name}"',
endpoint_type="node"
)
# links
add_to_endpoints(f"/projects/{project.id}/links", f'All links in project "{project.name}"', "link")
for link in links:
node_id_1 = link["nodes"][0]["node_id"]
node_id_2 = link["nodes"][1]["node_id"]
node_name_1 = node_name_2 = "N/A"
for node in nodes:
if node["node_id"] == node_id_1:
node_name_1 = node["name"]
if node["node_id"] == node_id_2:
node_name_2 = node["name"]
add_to_endpoints(
f"/projects/{project.id}/links/{link['link_id']}",
f'Link from "{node_name_1}" to "{node_name_2}" in project "{project.name}"',
endpoint_type="link"
)
# users
add_to_endpoints("/access/users", "All users", "user")
users = await users_repo.get_users()
for user in users:
add_to_endpoints(f"/users/{user.user_id}", f'User "{user.username}"', "user")
# groups
add_to_endpoints("/access/groups", "All groups", "group")
groups = await users_repo.get_user_groups()
for group in groups:
add_to_endpoints(f"/groups/{group.user_group_id}", f'Group "{group.name}"', "group")
# roles
add_to_endpoints("/access/roles", "All roles", "role")
roles = await rbac_repo.get_roles()
for role in roles:
add_to_endpoints(f"/roles/{role.role_id}", f'Role "{role.name}"', "role")
# images
add_to_endpoints("/images", "All images", "image")
images = await images_repo.get_images()
for image in images:
add_to_endpoints(f"/images/{image.filename}", f'Image "{image.filename}"', "image")
# templates
add_to_endpoints("/templates", "All templates", "template")
templates = await templates_repo.get_templates()
for template in templates:
add_to_endpoints(f"/templates/{template.template_id}", f'Template "{template.name}"', "template")
# resource pools
add_to_endpoints("/pools", "All resource pools", "pool")
pools = await pools_repo.get_resource_pools()
for pool in pools:
add_to_endpoints(f"/pools/{pool.resource_pool_id}", f'Resource pool "{pool.name}"', "pool")
return endpoints
@router.get(
"",
response_model=List[schemas.ACE],
dependencies=[Depends(has_privilege("ACE.Audit"))]
)
async def get_aces(
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> List[schemas.ACE]:
"""
Get all ACL entries.
Required privilege: ACE.Audit
"""
return await rbac_repo.get_aces()
@router.post(
"",
response_model=schemas.ACE,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("ACE.Allocate"))]
)
async def create_ace(
request: Request,
ace_create: schemas.ACECreate,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.ACE:
"""
Create a new ACL entry.
Required privilege: ACE.Allocate
"""
for route in request.app.routes:
if isinstance(route, APIRoute):
# remove the prefix (e.g. "/v3") from the route path
route_path = re.sub(r"^/v[0-9]", "", route.path)
# replace route path ID parameters by a UUID regex
route_path = re.sub(r"{\w+_id}", "[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", route_path)
# replace remaining route path parameters by a word matching regex
route_path = re.sub(r"/{[\w:]+}", r"/\\w+", route_path)
if re.fullmatch(route_path, ace_create.path):
log.info(f"Creating ACE for route path {route_path}")
return await rbac_repo.create_ace(ace_create)
raise ControllerBadRequestError(f"Path '{ace_create.path}' doesn't match any existing endpoint")
@router.get(
"/{ace_id}",
response_model=schemas.ACE,
dependencies=[Depends(has_privilege("ACE.Audit"))]
)
async def get_ace(
ace_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> schemas.ACE:
"""
Get an ACL entry.
Required privilege: ACE.Audit
"""
ace = await rbac_repo.get_ace(ace_id)
if not ace:
raise ControllerNotFoundError(f"ACL entry '{ace_id}' not found")
return ace
@router.put(
"/{ace_id}",
response_model=schemas.ACE,
dependencies=[Depends(has_privilege("ACE.Modify"))]
)
async def update_ace(
ace_id: UUID,
ace_update: schemas.ACEUpdate,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.ACE:
"""
Update an ACL entry.
Required privilege: ACE.Modify
"""
ace = await rbac_repo.get_ace(ace_id)
if not ace:
raise ControllerNotFoundError(f"ACL entry '{ace_id}' not found")
return await rbac_repo.update_ace(ace_id, ace_update)
@router.delete(
"/{ace_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("ACE.Allocate"))]
)
async def delete_ace(
ace_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete an ACL entry.
Required privilege: ACE.Allocate
"""
ace = await rbac_repo.get_ace(ace_id)
if not ace:
raise ControllerNotFoundError(f"ACL entry '{ace_id}' not found")
success = await rbac_repo.delete_ace(ace_id)
if not success:
raise ControllerNotFoundError(f"ACL entry '{ace_id}' could not be deleted")

View File

@ -0,0 +1,150 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for appliances.
"""
import logging
from fastapi import APIRouter, Depends, status
from typing import Optional, List
from uuid import UUID
from gns3server import schemas
from gns3server.controller import Controller
from gns3server.controller.controller_error import (
ControllerError,
ControllerBadRequestError,
ControllerNotFoundError
)
from gns3server.db.repositories.images import ImagesRepository
from gns3server.db.repositories.templates import TemplatesRepository
from gns3server.db.repositories.rbac import RbacRepository
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"",
response_model=List[schemas.Appliance],
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Appliance.Audit"))]
)
async def get_appliances(
update: Optional[bool] = False,
symbol_theme: Optional[str] = None
) -> List[schemas.Appliance]:
"""
Return all appliances known by the controller.
Required privilege: Appliance.Audit
"""
controller = Controller.instance()
if update:
await controller.appliance_manager.download_appliances()
controller.appliance_manager.load_appliances(symbol_theme)
return [c.asdict() for c in controller.appliance_manager.appliances.values()]
@router.get(
"/{appliance_id}",
response_model=schemas.Appliance,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Appliance.Audit"))]
)
def get_appliance(appliance_id: UUID) -> schemas.Appliance:
"""
Get an appliance file.
Required privilege: Appliance.Audit
"""
controller = Controller.instance()
appliance = controller.appliance_manager.appliances.get(str(appliance_id))
if not appliance:
raise ControllerNotFoundError(message=f"Could not find appliance '{appliance_id}'")
return appliance.asdict()
@router.post(
"/{appliance_id}/version",
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Appliance.Allocate"))]
)
def add_appliance_version(appliance_id: UUID, appliance_version: schemas.ApplianceVersion) -> dict:
"""
Add a version to an appliance.
Required privilege: Appliance.Allocate
"""
controller = Controller.instance()
appliance = controller.appliance_manager.appliances.get(str(appliance_id))
if not appliance:
raise ControllerNotFoundError(message=f"Could not find appliance '{appliance_id}'")
if not appliance.versions:
raise ControllerBadRequestError(message=f"Appliance '{appliance_id}' do not have versions")
if not appliance_version.images:
raise ControllerBadRequestError(message=f"Version '{appliance_version.name}' must contain images")
for version in appliance.versions:
if version.get("name") == appliance_version.name:
raise ControllerError(message=f"Appliance '{appliance_id}' already has version '{appliance_version.name}'")
appliance.versions.append(appliance_version.model_dump(exclude_unset=True))
return appliance.asdict()
@router.post(
"/{appliance_id}/install",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Appliance.Allocate"))]
)
async def install_appliance(
appliance_id: UUID,
version: Optional[str] = None,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
current_user: schemas.User = Depends(get_current_active_user),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Install an appliance.
Required privilege: Appliance.Allocate
"""
controller = Controller.instance()
await controller.appliance_manager.install_appliance(
appliance_id,
version,
images_repo,
templates_repo,
rbac_repo,
current_user
)

View File

@ -0,0 +1,231 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for computes.
"""
from fastapi import APIRouter, Depends, status
from typing import Any, List, Union, Optional
from uuid import UUID
from gns3server.controller import Controller
from gns3server.db.repositories.computes import ComputesRepository
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.services.computes import ComputesService
from gns3server import schemas
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
responses = {404: {"model": schemas.ErrorMessage, "description": "Compute not found"}}
router = APIRouter(responses=responses)
@router.post(
"",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Compute,
responses={
404: {"model": schemas.ErrorMessage, "description": "Could not connect to compute"},
409: {"model": schemas.ErrorMessage, "description": "Could not create compute"},
401: {"model": schemas.ErrorMessage, "description": "Invalid authentication for compute"},
},
dependencies=[Depends(has_privilege("Compute.Allocate"))]
)
async def create_compute(
compute_create: schemas.ComputeCreate,
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
connect: Optional[bool] = False
) -> schemas.Compute:
"""
Create a new compute on the controller.
Required privilege: Compute.Allocate
"""
return await ComputesService(computes_repo).create_compute(compute_create, connect)
@router.post(
"/{compute_id}/connect",
status_code=status.HTTP_204_NO_CONTENT,
#dependencies=[Depends(has_privilege("Compute.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
)
async def connect_compute(compute_id: Union[str, UUID]) -> None:
"""
Connect to compute on the controller.
Required privilege: Compute.Audit
"""
compute = Controller.instance().get_compute(str(compute_id))
if not compute.connected:
await compute.connect(report_failed_connection=True)
@router.get(
"/{compute_id}",
response_model=schemas.Compute,
response_model_exclude_unset=True,
#dependencies=[Depends(has_privilege("Compute.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
)
async def get_compute(
compute_id: Union[str, UUID], computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository))
) -> schemas.Compute:
"""
Return a compute from the controller.
Required privilege: Compute.Audit
"""
return await ComputesService(computes_repo).get_compute(compute_id)
@router.get(
"",
response_model=List[schemas.Compute],
response_model_exclude_unset=True,
#dependencies=[Depends(has_privilege("Compute.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
)
async def get_computes(
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
) -> List[schemas.Compute]:
"""
Return all computes known by the controller.
Required privilege: Compute.Audit
"""
return await ComputesService(computes_repo).get_computes()
@router.put(
"/{compute_id}",
response_model=schemas.Compute,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Compute.Modify"))]
)
async def update_compute(
compute_id: Union[str, UUID],
compute_update: schemas.ComputeUpdate,
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
) -> schemas.Compute:
"""
Update a compute on the controller.
Required privilege: Compute.Modify
"""
return await ComputesService(computes_repo).update_compute(compute_id, compute_update)
@router.delete(
"/{compute_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Compute.Allocate"))]
)
async def delete_compute(
compute_id: Union[str, UUID],
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a compute from the controller.
Required privilege: Compute.Allocate
"""
await ComputesService(computes_repo).delete_compute(compute_id)
await rbac_repo.delete_all_ace_starting_with_path(f"/computes/{compute_id}")
@router.get("/{compute_id}/docker/images", response_model=List[schemas.ComputeDockerImage])
async def docker_get_images(compute_id: Union[str, UUID]) -> List[schemas.ComputeDockerImage]:
"""
Get Docker images from a compute.
"""
compute = Controller.instance().get_compute(str(compute_id))
result = await compute.forward("GET", "docker", "images")
return result
@router.get("/{compute_id}/virtualbox/vms", response_model=List[schemas.ComputeVirtualBoxVM])
async def virtualbox_vms(compute_id: Union[str, UUID]) -> List[schemas.ComputeVirtualBoxVM]:
"""
Get VirtualBox VMs from a compute.
"""
compute = Controller.instance().get_compute(str(compute_id))
result = await compute.forward("GET", "virtualbox", "vms")
return result
@router.get("/{compute_id}/vmware/vms", response_model=List[schemas.ComputeVMwareVM])
async def vmware_vms(compute_id: Union[str, UUID]) -> List[schemas.ComputeVMwareVM]:
"""
Get VMware VMs from a compute.
"""
compute = Controller.instance().get_compute(str(compute_id))
result = await compute.forward("GET", "vmware", "vms")
return result
@router.post("/{compute_id}/dynamips/auto_idlepc")
async def dynamips_autoidlepc(compute_id: Union[str, UUID], auto_idle_pc: schemas.AutoIdlePC) -> str:
"""
Find a suitable Idle-PC value for a given IOS image. This may take a few minutes.
"""
controller = Controller.instance()
return await controller.autoidlepc(str(compute_id), auto_idle_pc.platform, auto_idle_pc.image, auto_idle_pc.ram)
@router.get("/{compute_id}/{emulator}/{endpoint_path:path}", deprecated=True)
async def forward_get(compute_id: Union[str, UUID], emulator: str, endpoint_path: str) -> Any:
"""
Forward a GET request to a compute.
Read the full compute API documentation for available routes.
"""
compute = Controller.instance().get_compute(str(compute_id))
result = await compute.forward("GET", emulator, endpoint_path)
return result
@router.post("/{compute_id}/{emulator}/{endpoint_path:path}", deprecated=True)
async def forward_post(compute_id: Union[str, UUID], emulator: str, endpoint_path: str, compute_data: dict) -> Any:
"""
Forward a POST request to a compute.
Read the full compute API documentation for available routes.
"""
compute = Controller.instance().get_compute(str(compute_id))
return await compute.forward("POST", emulator, endpoint_path, data=compute_data)
@router.put("/{compute_id}/{emulator}/{endpoint_path:path}", deprecated=True)
async def forward_put(compute_id: Union[str, UUID], emulator: str, endpoint_path: str, compute_data: dict) -> Any:
"""
Forward a PUT request to a compute.
Read the full compute API documentation for available routes.
"""
compute = Controller.instance().get_compute(str(compute_id))
return await compute.forward("PUT", emulator, endpoint_path, data=compute_data)

View File

@ -0,0 +1,319 @@
#
# Copyright (C) 2015 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import asyncio
import signal
import os
from fastapi import APIRouter, Request, Depends, WebSocket, WebSocketDisconnect, status
from fastapi.responses import StreamingResponse
from fastapi.encoders import jsonable_encoder
from fastapi.routing import Mount
from websockets.exceptions import ConnectionClosed, WebSocketException
from typing import List
from gns3server.config import Config
from gns3server.controller import Controller
from gns3server.version import __version__
from gns3server.controller.controller_error import ControllerError, ControllerForbiddenError
from gns3server import schemas
from .dependencies.authentication import get_current_active_user, get_current_active_user_from_websocket
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"/version",
response_model=schemas.Version,
)
def get_version(request: Request) -> dict:
"""
Return the server version number.
"""
# retrieve the controller host information from the mounted
# compute subapp
controller_host = None
for route in request.app.routes:
if isinstance(route, Mount) and route.name == "compute":
controller_host = route.app.state.controller_host
local_server = Config.instance().settings.Server.local
return {
"controller_host": controller_host,
"version": __version__,
"local": local_server
}
@router.post(
"/version",
response_model=schemas.Version,
response_model_exclude_defaults=True,
responses={409: {"model": schemas.ErrorMessage, "description": "Invalid version"}},
)
def check_version(version: schemas.Version) -> dict:
"""
Check if version is the same as the server.
"""
if version.version != __version__:
raise ControllerError(f"Client version {version.version} is not the same as server version {__version__}")
return {"version": __version__}
@router.post(
"/reload",
dependencies=[Depends(get_current_active_user)],
status_code=status.HTTP_204_NO_CONTENT,
)
async def reload() -> None:
"""
Reload the controller
"""
await Controller.instance().reload()
@router.post(
"/shutdown",
dependencies=[Depends(get_current_active_user)],
status_code=status.HTTP_204_NO_CONTENT,
responses={403: {"model": schemas.ErrorMessage, "description": "Server shutdown not allowed"}},
)
async def shutdown() -> None:
"""
Shutdown the server
"""
if Config.instance().settings.Server.local is False:
raise ControllerForbiddenError("You can only stop a local server")
log.info("Start shutting down the server")
# close all the projects first
controller = Controller.instance()
projects = controller.projects.values()
tasks = []
for project in projects:
tasks.append(asyncio.ensure_future(project.close()))
if tasks:
done, _ = await asyncio.wait(tasks)
for future in done:
try:
future.result()
except Exception as e:
log.error(f"Could not close project: {e}", exc_info=1)
continue
# then shutdown the server itself
os.kill(os.getpid(), signal.SIGTERM)
@router.get(
"/iou_license",
dependencies=[Depends(get_current_active_user)],
response_model=schemas.IOULicense
)
def get_iou_license() -> schemas.IOULicense:
"""
Return the IOU license settings
"""
return Controller.instance().iou_license
@router.put(
"/iou_license",
dependencies=[Depends(get_current_active_user)],
status_code=status.HTTP_201_CREATED,
response_model=schemas.IOULicense
)
async def update_iou_license(iou_license: schemas.IOULicense) -> schemas.IOULicense:
"""
Update the IOU license settings.
"""
controller = Controller().instance()
current_iou_license = controller.iou_license
current_iou_license.update(jsonable_encoder(iou_license))
controller.save()
return current_iou_license
@router.get("/statistics", dependencies=[Depends(get_current_active_user)])
async def statistics() -> List[dict]:
"""
Return server statistics.
"""
compute_statistics = []
for compute in list(Controller.instance().computes.values()):
try:
r = await compute.get("/statistics")
compute_statistics.append({"compute_id": compute.id, "compute_name": compute.name, "statistics": r.json})
except ControllerError as e:
log.error(f"Could not retrieve statistics on compute {compute.name}: {e}")
return compute_statistics
@router.get("/notifications", dependencies=[Depends(get_current_active_user)])
async def controller_http_notifications(request: Request) -> StreamingResponse:
"""
Receive controller notifications about the controller from HTTP stream.
"""
from gns3server.api.server import app
log.info(f"New client {request.client.host}:{request.client.port} has connected to controller HTTP "
f"notification stream")
async def event_stream():
try:
with Controller.instance().notification.controller_queue() as queue:
while not app.state.exiting:
msg = await queue.get_json(5)
yield f"{msg}\n".encode("utf-8")
finally:
log.info(f"Client {request.client.host}:{request.client.port} has disconnected from controller HTTP "
f"notification stream")
return StreamingResponse(event_stream(), media_type="application/json")
@router.websocket("/notifications/ws")
async def controller_ws_notifications(
websocket: WebSocket,
current_user: schemas.User = Depends(get_current_active_user_from_websocket)
) -> None:
"""
Receive project notifications about the controller from WebSocket.
"""
if current_user is None:
return
log.info(f"New client {websocket.client.host}:{websocket.client.port} has connected to controller WebSocket")
try:
with Controller.instance().notification.controller_queue() as queue:
while True:
notification = await queue.get_json(5)
await websocket.send_text(notification)
except (ConnectionClosed, WebSocketDisconnect):
log.info(f"Client {websocket.client.host}:{websocket.client.port} has disconnected from controller WebSocket")
except WebSocketException as e:
log.warning(f"Error while sending to controller event to WebSocket client: {e}")
# @Route.post(
# r"/debug",
# description="Dump debug information to disk (debug directory in config directory). Work only for local server",
# status_codes={
# 201: "Written"
# })
# async def debug(request, response):
#
# config = Config.instance()
# if config.get_section_config("Server").getboolean("local", False) is False:
# raise ControllerForbiddenError("You can only debug a local server")
#
# debug_dir = os.path.join(config.config_dir, "debug")
# try:
# if os.path.exists(debug_dir):
# shutil.rmtree(debug_dir)
# os.makedirs(debug_dir)
# with open(os.path.join(debug_dir, "controller.txt"), "w+") as f:
# f.write(ServerHandler._getDebugData())
# except Exception as e:
# # If something is wrong we log the info to the log and we hope the log will be include correctly to the debug export
# log.error("Could not export debug information {}".format(e), exc_info=1)
#
# try:
# if Controller.instance().gns3vm.engine == "vmware":
# vmx_path = Controller.instance().gns3vm.current_engine().vmx_path
# if vmx_path:
# shutil.copy(vmx_path, os.path.join(debug_dir, os.path.basename(vmx_path)))
# except OSError as e:
# # If something is wrong we log the info to the log and we hope the log will be include correctly to the debug export
# log.error("Could not copy VMware VMX file {}".format(e), exc_info=1)
#
# for compute in list(Controller.instance().computes.values()):
# try:
# r = await compute.get("/debug", raw=True)
# data = r.body.decode("utf-8")
# except Exception as e:
# data = str(e)
# with open(os.path.join(debug_dir, "compute_{}.txt".format(compute.id)), "w+") as f:
# f.write("Compute ID: {}\n".format(compute.id))
# f.write(data)
#
# response.set_status(201)
#
# @staticmethod
# def _getDebugData():
# try:
# connections = psutil.net_connections()
# # You need to be root for OSX
# except psutil.AccessDenied:
# connections = None
#
# try:
# addrs = ["* {}: {}".format(key, val) for key, val in psutil.net_if_addrs().items()]
# except UnicodeDecodeError:
# addrs = ["INVALID ADDR WITH UNICODE CHARACTERS"]
#
# data = """Version: {version}
# OS: {os}
# Python: {python}
# CPU: {cpu}
# Memory: {memory}
#
# Networks:
# {addrs}
#
# Open connections:
# {connections}
#
# Processus:
# """.format(
# version=__version__,
# os=platform.platform(),
# python=platform.python_version(),
# memory=psutil.virtual_memory(),
# cpu=psutil.cpu_times(),
# connections=connections,
# addrs="\n".join(addrs)
# )
# for proc in psutil.process_iter():
# try:
# psinfo = proc.as_dict(attrs=["name", "exe"])
# data += "* {} {}\n".format(psinfo["name"], psinfo["exe"])
# except psutil.NoSuchProcess:
# pass
#
# data += "\n\nProjects"
# for project in Controller.instance().projects.values():
# data += "\n\nProject name: {}\nProject ID: {}\n".format(project.name, project.id)
# if project.status != "closed":
# for link in project.links.values():
# data += "Link {}: {}".format(link.id, link.debug_link_data)
#
# return data

View File

@ -0,0 +1,117 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
from fastapi import Request, Query, Depends, HTTPException, WebSocket, status
from fastapi.security import OAuth2PasswordBearer
from typing import Optional
from gns3server import schemas
from gns3server.db.repositories.users import UsersRepository
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.services import auth_service
from .database import get_repository
log = logging.getLogger(__name__)
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/v3/access/users/login", auto_error=False)
async def get_user_from_token(
bearer_token: str = Depends(oauth2_scheme),
user_repo: UsersRepository = Depends(get_repository(UsersRepository)),
token: Optional[str] = Query(None, include_in_schema=False)
) -> schemas.User:
if bearer_token:
# bearer token is used first, then any token passed as a URL parameter
token = bearer_token
if token is None:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Not authenticated",
headers={"WWW-Authenticate": "Bearer"},
)
username = auth_service.get_username_from_token(token)
user = await user_repo.get_user_by_username(username)
if user is None:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Could not validate credentials",
headers={"WWW-Authenticate": "Bearer"},
)
return user
async def get_current_active_user(
request: Request,
current_user: schemas.User = Depends(get_user_from_token),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.User:
# Super admin is always authorized
if current_user.is_superadmin:
return current_user
if not current_user.is_active:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Not an active user",
headers={"WWW-Authenticate": "Bearer"},
)
return current_user
async def get_current_active_user_from_websocket(
websocket: WebSocket,
token: str = Query(...),
user_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> Optional[schemas.User]:
await websocket.accept()
try:
username = auth_service.get_username_from_token(token)
user = await user_repo.get_user_by_username(username)
if user is None:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail=f"Could not validate credentials for '{username}'"
)
# Super admin is always authorized
if user.is_superadmin:
return user
if not user.is_active:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail=f"'{username}' is not an active user"
)
return user
except HTTPException as e:
err_msg = f"Could not authenticate while connecting to controller WebSocket: {e.detail}"
websocket_error = {"action": "log.error", "event": {"message": err_msg}}
await websocket.send_json(websocket_error)
log.error(err_msg)
return await websocket.close(code=1008)

View File

@ -0,0 +1,38 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from typing import Callable, Type
from fastapi import Depends
from starlette.requests import HTTPConnection
from sqlalchemy.ext.asyncio import AsyncSession
from gns3server.db.repositories.base import BaseRepository
async def get_db_session(request: HTTPConnection) -> AsyncSession:
async with AsyncSession(request.app.state._db_engine, expire_on_commit=False) as session:
try:
yield session
finally:
await session.close()
def get_repository(repo: Type[BaseRepository]) -> Callable:
def get_repo(db_session: AsyncSession = Depends(get_db_session)) -> Type[BaseRepository]:
return repo(db_session)
return get_repo

View File

@ -0,0 +1,78 @@
#
# Copyright (C) 2023 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import re
from fastapi import Request, WebSocket, Depends, HTTPException
from gns3server import schemas
from gns3server.db.repositories.rbac import RbacRepository
from .authentication import get_current_active_user, get_current_active_user_from_websocket
from .database import get_repository
import logging
log = logging.getLogger()
def has_privilege(
privilege_name: str
):
async def get_user_and_check_privilege(
request: Request,
current_user: schemas.User = Depends(get_current_active_user),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
):
if not current_user.is_superadmin:
path = re.sub(r"^/v[0-9]", "", request.url.path) # remove the prefix (e.g. "/v3") from URL path
log.debug(f"Checking user {current_user.username} has privilege {privilege_name} on '{path}'")
if not await rbac_repo.check_user_has_privilege(current_user.user_id, path, privilege_name):
raise HTTPException(status_code=403, detail=f"Permission denied (privilege {privilege_name} is required)")
return current_user
return get_user_and_check_privilege
def has_privilege_on_websocket(
privilege_name: str
):
async def get_user_and_check_privilege(
websocket: WebSocket,
current_user: schemas.User = Depends(get_current_active_user_from_websocket),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
):
if not current_user.is_superadmin:
path = re.sub(r"^/v[0-9]", "", websocket.url.path) # remove the prefix (e.g. "/v3") from URL path
log.debug(f"Checking user {current_user.username} has privilege {privilege_name} on '{path}'")
if not await rbac_repo.check_user_has_privilege(current_user.user_id, path, privilege_name):
raise HTTPException(status_code=403, detail=f"Permission denied (privilege {privilege_name} is required)")
return current_user
return get_user_and_check_privilege
# class PrivilegeChecker:
#
# def __init__(self, required_privilege: str) -> None:
# self._required_privilege = required_privilege
#
# async def __call__(
# self,
# current_user: schemas.User = Depends(get_current_active_user),
# rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
# ) -> bool:
#
# if not await rbac_repo.check_user_has_privilege(current_user.user_id, "/projects", self._required_privilege):
# raise HTTPException(status_code=403, detail=f"Permission denied (privilege {self._required_privilege} is required)")
# return True
# Depends(PrivilegeChecker("Project.Audit"))

View File

@ -0,0 +1,131 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for drawings.
"""
from fastapi import APIRouter, Depends, status
from fastapi.encoders import jsonable_encoder
from typing import List
from uuid import UUID
from gns3server.controller import Controller
from gns3server.db.repositories.rbac import RbacRepository
from gns3server import schemas
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
responses = {404: {"model": schemas.ErrorMessage, "description": "Project or drawing not found"}}
router = APIRouter(responses=responses)
@router.get(
"",
response_model=List[schemas.Drawing],
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Drawing.Audit"))]
)
async def get_drawings(project_id: UUID) -> List[schemas.Drawing]:
"""
Return the list of all drawings for a given project.
Required privilege: Drawing.Audit
"""
project = await Controller.instance().get_loaded_project(str(project_id))
if project.status == "closed":
# allow to retrieve drawings from a closed project
return project.drawings.values()
return [v.asdict() for v in project.drawings.values()]
@router.post(
"",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Drawing,
dependencies=[Depends(has_privilege("Drawing.Allocate"))]
)
async def create_drawing(project_id: UUID, drawing_data: schemas.Drawing) -> schemas.Drawing:
"""
Create a new drawing.
Required privilege: Drawing.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
drawing = await project.add_drawing(**jsonable_encoder(drawing_data, exclude_unset=True))
return drawing.asdict()
@router.get(
"/{drawing_id}",
response_model=schemas.Drawing,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Drawing.Audit"))]
)
async def get_drawing(project_id: UUID, drawing_id: UUID) -> schemas.Drawing:
"""
Return a drawing.
Required privilege: Drawing.Audit
"""
project = await Controller.instance().get_loaded_project(str(project_id))
drawing = project.get_drawing(str(drawing_id))
return drawing.asdict()
@router.put(
"/{drawing_id}",
response_model=schemas.Drawing,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Drawing.Modify"))]
)
async def update_drawing(project_id: UUID, drawing_id: UUID, drawing_data: schemas.Drawing) -> schemas.Drawing:
"""
Update a drawing.
Required privilege: Drawing.Modify
"""
project = await Controller.instance().get_loaded_project(str(project_id))
drawing = project.get_drawing(str(drawing_id))
await drawing.update(**jsonable_encoder(drawing_data, exclude_unset=True))
return drawing.asdict()
@router.delete(
"/{drawing_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Drawing.Allocate"))]
)
async def delete_drawing(
project_id: UUID,
drawing_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a drawing.
Required privilege: Drawing.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
await project.delete_drawing(str(drawing_id))
await rbac_repo.delete_all_ace_starting_with_path(f"/drawings/{drawing_id}")

View File

@ -0,0 +1,71 @@
#!/usr/bin/env python
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for managing the GNS3 VM.
"""
from fastapi import APIRouter
from fastapi.encoders import jsonable_encoder
from typing import List
from gns3server.controller import Controller
from gns3server import schemas
router = APIRouter()
@router.get("/engines")
async def get_engines() -> List[dict]:
"""
Return the list of supported engines for the GNS3VM.
"""
gns3_vm = Controller().instance().gns3vm
return gns3_vm.engine_list()
@router.get("/engines/{engine}/vms")
async def get_vms(engine: str) -> List[dict]:
"""
Return all the available VMs for a specific virtualization engine.
"""
vms = await Controller.instance().gns3vm.list(engine)
return vms
@router.get("", response_model=schemas.GNS3VM)
async def get_gns3vm_settings() -> schemas.GNS3VM:
"""
Return the GNS3 VM settings.
"""
return Controller.instance().gns3vm.asdict()
@router.put("", response_model=schemas.GNS3VM, response_model_exclude_unset=True)
async def update_gns3vm_settings(gns3vm_data: schemas.GNS3VM) -> schemas.GNS3VM:
"""
Update the GNS3 VM settings.
"""
controller = Controller().instance()
gns3_vm = controller.gns3vm
await gns3_vm.update_settings(jsonable_encoder(gns3vm_data, exclude_unset=True))
controller.save()
return gns3_vm.asdict()

View File

@ -0,0 +1,231 @@
#!/usr/bin/env python
#
# Copyright (C) 2021 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for user groups.
"""
from fastapi import APIRouter, Depends, status
from uuid import UUID
from typing import List
from gns3server import schemas
from gns3server.controller.controller_error import (
ControllerError,
ControllerBadRequestError,
ControllerNotFoundError,
ControllerForbiddenError,
)
from gns3server.db.repositories.users import UsersRepository
from gns3server.db.repositories.rbac import RbacRepository
from .dependencies.rbac import has_privilege
from .dependencies.database import get_repository
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"",
response_model=List[schemas.UserGroup],
dependencies=[Depends(has_privilege("Group.Audit"))]
)
async def get_user_groups(
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.UserGroup]:
"""
Get all user groups.
Required privilege: Group.Audit
"""
return await users_repo.get_user_groups()
@router.post(
"",
response_model=schemas.UserGroup,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Group.Allocate"))]
)
async def create_user_group(
user_group_create: schemas.UserGroupCreate,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.UserGroup:
"""
Create a new user group.
Required privilege: Group.Allocate
"""
if await users_repo.get_user_group_by_name(user_group_create.name):
raise ControllerBadRequestError(f"User group '{user_group_create.name}' already exists")
return await users_repo.create_user_group(user_group_create)
@router.get(
"/{user_group_id}",
response_model=schemas.UserGroup,
dependencies=[Depends(has_privilege("Group.Audit"))]
)
async def get_user_group(
user_group_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> schemas.UserGroup:
"""
Get a user group.
Required privilege: Group.Audit
"""
user_group = await users_repo.get_user_group(user_group_id)
if not user_group:
raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
return user_group
@router.put(
"/{user_group_id}",
response_model=schemas.UserGroup,
dependencies=[Depends(has_privilege("Group.Modify"))]
)
async def update_user_group(
user_group_id: UUID,
user_group_update: schemas.UserGroupUpdate,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.UserGroup:
"""
Update a user group.
Required privilege: Group.Modify
"""
user_group = await users_repo.get_user_group(user_group_id)
if not user_group:
raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
if user_group.is_builtin:
raise ControllerForbiddenError(f"Built-in user group '{user_group_id}' cannot be updated")
return await users_repo.update_user_group(user_group_id, user_group_update)
@router.delete(
"/{user_group_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Group.Allocate"))]
)
async def delete_user_group(
user_group_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a user group.
Required privilege: Group.Allocate
"""
user_group = await users_repo.get_user_group(user_group_id)
if not user_group:
raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
if user_group.is_builtin:
raise ControllerForbiddenError(f"Built-in user group '{user_group_id}' cannot be deleted")
success = await users_repo.delete_user_group(user_group_id)
if not success:
raise ControllerError(f"User group '{user_group_id}' could not be deleted")
await rbac_repo.delete_all_ace_starting_with_path(f"/groups/{user_group_id}")
@router.get(
"/{user_group_id}/members",
response_model=List[schemas.User],
dependencies=[Depends(has_privilege("Group.Audit"))]
)
async def get_user_group_members(
user_group_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.User]:
"""
Get all user group members.
Required privilege: Group.Audit
"""
return await users_repo.get_user_group_members(user_group_id)
@router.put(
"/{user_group_id}/members/{user_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Group.Modify"))]
)
async def add_member_to_group(
user_group_id: UUID,
user_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> None:
"""
Add member to a user group.
Required privilege: Group.Modify
"""
user = await users_repo.get_user(user_id)
if not user:
raise ControllerNotFoundError(f"User '{user_id}' not found")
user_groups = await users_repo.get_user_memberships(user_id)
for group in user_groups:
if group.user_group_id == user_group_id:
raise ControllerBadRequestError(f"Username '{user.username}' is already member of group '{group.name}'")
user_group = await users_repo.add_member_to_user_group(user_group_id, user)
if not user_group:
raise ControllerNotFoundError(f"User group '{user_group_id}' not found")
@router.delete(
"/{user_group_id}/members/{user_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Group.Modify"))]
)
async def remove_member_from_group(
user_group_id: UUID,
user_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> None:
"""
Remove member from a user group.
Required privilege: Group.Modify
"""
user = await users_repo.get_user(user_id)
if not user:
raise ControllerNotFoundError(f"User '{user_id}' not found")
user_group = await users_repo.remove_member_from_user_group(user_group_id, user)
if not user_group:
raise ControllerNotFoundError(f"User group '{user_group_id}' not found")

View File

@ -0,0 +1,255 @@
#
# Copyright (C) 2021 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for images.
"""
import os
import logging
import urllib.parse
from fastapi import APIRouter, Request, Depends, status
from fastapi.encoders import jsonable_encoder
from starlette.requests import ClientDisconnect
from sqlalchemy.orm.exc import MultipleResultsFound
from typing import List, Optional
from gns3server import schemas
from gns3server.config import Config
from gns3server.compute.qemu import Qemu
from gns3server.utils.images import InvalidImageError, write_image, read_image_info, default_images_directory
from gns3server.db.repositories.images import ImagesRepository
from gns3server.db.repositories.templates import TemplatesRepository
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.controller import Controller
from gns3server.controller.controller_error import (
ControllerError,
ControllerNotFoundError,
ControllerForbiddenError,
ControllerBadRequestError
)
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
log = logging.getLogger(__name__)
router = APIRouter()
@router.post(
"/qemu/{image_path:path}",
response_model=schemas.Image,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Image.Allocate"))]
)
async def create_qemu_image(
image_path: str,
image_data: schemas.QemuDiskImageCreate,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> schemas.Image:
"""
Create a new blank Qemu image.
Required privilege: Image.Allocate
"""
allow_raw_image = Config.instance().settings.Server.allow_raw_images
if image_data.format == schemas.QemuDiskImageFormat.raw and not allow_raw_image:
raise ControllerBadRequestError("Raw images are not allowed")
disk_image_path = urllib.parse.unquote(image_path)
image_dir, image_name = os.path.split(disk_image_path)
# check if the path is within the default images directory
base_images_directory = os.path.expanduser(Config.instance().settings.Server.images_path)
full_path = os.path.abspath(os.path.join(base_images_directory, image_dir, image_name))
if os.path.commonprefix([base_images_directory, full_path]) != base_images_directory:
raise ControllerForbiddenError(f"Cannot write disk image, '{disk_image_path}' is forbidden")
if not image_dir:
# put the image in the default images directory for Qemu
directory = default_images_directory(image_type="qemu")
os.makedirs(directory, exist_ok=True)
disk_image_path = os.path.abspath(os.path.join(directory, disk_image_path))
if await images_repo.get_image(disk_image_path):
raise ControllerBadRequestError(f"Disk image '{disk_image_path}' already exists")
options = jsonable_encoder(image_data, exclude_unset=True)
# FIXME: should we have the create_disk_image in the compute code since
# this code is used to create images on the controller?
await Qemu.instance().create_disk_image(disk_image_path, options)
image_info = await read_image_info(disk_image_path, "qemu")
return await images_repo.add_image(**image_info)
@router.get(
"",
response_model=List[schemas.Image],
dependencies=[Depends(has_privilege("Image.Audit"))]
)
async def get_images(
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
image_type: Optional[schemas.ImageType] = None
) -> List[schemas.Image]:
"""
Return all images.
Required privilege: Image.Audit
"""
return await images_repo.get_images(image_type)
@router.post(
"/upload/{image_path:path}",
response_model=schemas.Image,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Image.Allocate"))]
)
async def upload_image(
image_path: str,
request: Request,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
current_user: schemas.User = Depends(get_current_active_user),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
install_appliances: Optional[bool] = False,
) -> schemas.Image:
"""
Upload an image.
Example: curl -X POST http://host:port/v3/images/upload/my_image_name.qcow2 \
-H 'Authorization: Bearer <token>' --data-binary @"/path/to/image.qcow2"
Required privilege: Image.Allocate
"""
image_path = urllib.parse.unquote(image_path)
image_dir, image_name = os.path.split(image_path)
# check if the path is within the default images directory
base_images_directory = os.path.expanduser(Config.instance().settings.Server.images_path)
full_path = os.path.abspath(os.path.join(base_images_directory, image_dir, image_name))
if os.path.commonprefix([base_images_directory, full_path]) != base_images_directory:
raise ControllerForbiddenError(f"Cannot write image, '{image_path}' is forbidden")
image = await images_repo.get_image(image_path)
if image:
log.warning(f"Image '{image_path}' already exists")
return image
try:
allow_raw_image = Config.instance().settings.Server.allow_raw_images
image = await write_image(image_path, full_path, request.stream(), images_repo, allow_raw_image=allow_raw_image)
except (OSError, InvalidImageError, ClientDisconnect) as e:
raise ControllerError(f"Could not save image '{image_path}': {e}")
if install_appliances:
# attempt to automatically create templates based on image checksum
await Controller.instance().appliance_manager.install_appliances_from_image(
image_path,
image.checksum,
images_repo,
templates_repo,
rbac_repo,
current_user,
os.path.dirname(image.path)
)
return image
@router.get(
"/{image_path:path}",
response_model=schemas.Image,
dependencies=[Depends(has_privilege("Image.Audit"))]
)
async def get_image(
image_path: str,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> schemas.Image:
"""
Return an image.
Required privilege: Image.Audit
"""
image_path = urllib.parse.unquote(image_path)
image = await images_repo.get_image(image_path)
if not image:
raise ControllerNotFoundError(f"Image '{image_path}' not found")
return image
@router.delete(
"/{image_path:path}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Image.Allocate"))]
)
async def delete_image(
image_path: str,
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> None:
"""
Delete an image.
Required privilege: Image.Allocate
"""
image_path = urllib.parse.unquote(image_path)
try:
image = await images_repo.get_image(image_path)
except MultipleResultsFound:
raise ControllerBadRequestError(f"Image '{image_path}' matches multiple images. "
f"Please include the relative path of the image")
if not image:
raise ControllerNotFoundError(f"Image '{image_path}' not found")
templates = await images_repo.get_image_templates(image.image_id)
if templates:
template_names = ", ".join([template.name for template in templates])
raise ControllerError(f"Image '{image_path}' is used by one or more templates: {template_names}")
try:
os.remove(image.path)
except OSError:
log.warning(f"Could not delete image file {image.path}")
success = await images_repo.delete_image(image_path)
if not success:
raise ControllerError(f"Image '{image_path}' could not be deleted")
@router.post(
"/prune",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Image.Allocate"))]
)
async def prune_images(
images_repo: ImagesRepository = Depends(get_repository(ImagesRepository)),
) -> None:
"""
Prune images not attached to any template.
Required privilege: Image.Allocate
"""
await images_repo.prune_images()

View File

@ -0,0 +1,287 @@
#
# Copyright (C) 2023 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for links.
"""
import multidict
import aiohttp
from fastapi import APIRouter, Depends, Request, status
from fastapi.responses import StreamingResponse
from fastapi.encoders import jsonable_encoder
from typing import List
from uuid import UUID
from gns3server.controller import Controller
from gns3server.controller.controller_error import ControllerError
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.controller.link import Link
from gns3server.utils.http_client import HTTPClient
from gns3server import schemas
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
import logging
log = logging.getLogger(__name__)
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or link"}}
router = APIRouter(responses=responses)
async def dep_link(project_id: UUID, link_id: UUID) -> Link:
"""
Dependency to retrieve a link.
"""
project = await Controller.instance().get_loaded_project(str(project_id))
link = project.get_link(str(link_id))
return link
@router.get(
"",
response_model=List[schemas.Link],
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Link.Audit"))]
)
async def get_links(project_id: UUID) -> List[schemas.Link]:
"""
Return all links for a given project.
Required privilege: Link.Audit
"""
project = await Controller.instance().get_loaded_project(str(project_id))
if project.status == "closed":
# allow to retrieve links from a closed project
return project.links.values()
return [v.asdict() for v in project.links.values()]
@router.post(
"",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Link,
responses={
404: {"model": schemas.ErrorMessage, "description": "Could not find project"},
409: {"model": schemas.ErrorMessage, "description": "Could not create link"},
},
dependencies=[Depends(has_privilege("Link.Allocate"))]
)
async def create_link(project_id: UUID, link_data: schemas.LinkCreate) -> schemas.Link:
"""
Create a new link.
Required privilege: Link.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
link = await project.add_link()
link_data = jsonable_encoder(link_data, exclude_unset=True)
if "filters" in link_data:
await link.update_filters(link_data["filters"])
if "link_style" in link_data:
await link.update_link_style(link_data["link_style"])
if "suspend" in link_data:
await link.update_suspend(link_data["suspend"])
try:
for node in link_data["nodes"]:
await link.add_node(
project.get_node(node["node_id"]),
node.get("adapter_number", 0),
node.get("port_number", 0),
label=node.get("label"),
)
except ControllerError as e:
await project.delete_link(link.id)
raise e
return link.asdict()
@router.get(
"/{link_id}/available_filters",
dependencies=[Depends(has_privilege("Link.Audit"))]
)
async def get_filters(link: Link = Depends(dep_link)) -> List[dict]:
"""
Return all filters available for a given link.
Required privilege: Link.Audit
"""
return link.available_filters()
@router.get(
"/{link_id}",
response_model=schemas.Link,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Link.Audit"))]
)
async def get_link(link: Link = Depends(dep_link)) -> schemas.Link:
"""
Return a link.
Required privilege: Link.Audit
"""
return link.asdict()
@router.put(
"/{link_id}",
response_model=schemas.Link,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Link.Modify"))]
)
async def update_link(link_data: schemas.LinkUpdate, link: Link = Depends(dep_link)) -> schemas.Link:
"""
Update a link.
Required privilege: Link.Modify
"""
link_data = jsonable_encoder(link_data, exclude_unset=True)
if "filters" in link_data:
await link.update_filters(link_data["filters"])
if "link_style" in link_data:
await link.update_link_style(link_data["link_style"])
if "suspend" in link_data:
await link.update_suspend(link_data["suspend"])
if "nodes" in link_data:
await link.update_nodes(link_data["nodes"])
return link.asdict()
@router.delete(
"/{link_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Link.Allocate"))]
)
async def delete_link(
project_id: UUID,
link: Link = Depends(dep_link),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a link.
Required privilege: Link.Allocate
"""
project = await Controller.instance().get_loaded_project(str(project_id))
await project.delete_link(link.id)
await rbac_repo.delete_all_ace_starting_with_path(f"/links/{link.id}")
@router.post(
"/{link_id}/reset",
response_model=schemas.Link,
dependencies=[Depends(has_privilege("Link.Modify"))]
)
async def reset_link(link: Link = Depends(dep_link)) -> schemas.Link:
"""
Reset a link.
Required privilege: Link.Modify
"""
await link.reset()
return link.asdict()
@router.post(
"/{link_id}/capture/start",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Link,
dependencies=[Depends(has_privilege("Link.Capture"))]
)
async def start_capture(capture_data: dict, link: Link = Depends(dep_link)) -> schemas.Link:
"""
Start packet capture on the link.
Required privilege: Link.Capture
"""
await link.start_capture(
data_link_type=capture_data.get("data_link_type", "DLT_EN10MB"),
capture_file_name=capture_data.get("capture_file_name"),
)
return link.asdict()
@router.post(
"/{link_id}/capture/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Link.Capture"))]
)
async def stop_capture(link: Link = Depends(dep_link)) -> None:
"""
Stop packet capture on the link.
Required privilege: Link.Capture
"""
await link.stop_capture()
@router.get(
"/{link_id}/capture/stream",
dependencies=[Depends(has_privilege("Link.Capture"))]
)
async def stream_pcap(request: Request, link: Link = Depends(dep_link)) -> StreamingResponse:
"""
Stream the PCAP capture file from compute.
Required privilege: Link.Capture
"""
if not link.capturing:
raise ControllerError("This link has no active packet capture")
compute = link.compute
pcap_streaming_url = link.pcap_streaming_url()
headers = multidict.MultiDict(request.headers)
headers["Host"] = compute.host
headers["Router-Host"] = request.client.host
body = await request.body()
async def compute_pcap_stream():
try:
ssl_context = Controller.instance().ssl_context()
async with HTTPClient.request(
request.method,
pcap_streaming_url,
user=compute.user,
password=compute.password,
ssl_context=ssl_context,
timeout=None,
data=body
) as response:
async for data in response.content.iter_any():
if not data:
break
yield data
except aiohttp.ClientError as e:
raise ControllerError(f"Client error received when receiving pcap stream from compute: {e}")
return StreamingResponse(compute_pcap_stream(), media_type="application/vnd.tcpdump.pcap")

View File

@ -0,0 +1,619 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for nodes.
"""
import aiohttp
import asyncio
import ipaddress
from fastapi import APIRouter, Depends, WebSocket, WebSocketDisconnect, Request, Response, status
from fastapi.encoders import jsonable_encoder
from fastapi.routing import APIRoute
from typing import List, Callable
from uuid import UUID
from gns3server.controller import Controller
from gns3server.config import Config
from gns3server.controller.node import Node
from gns3server.controller.project import Project
from gns3server.utils import force_unix_path
from gns3server.utils.http_client import HTTPClient
from gns3server.controller.controller_error import ControllerForbiddenError, ControllerBadRequestError
from gns3server.db.repositories.rbac import RbacRepository
from gns3server import schemas
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege, has_privilege_on_websocket
import logging
log = logging.getLogger(__name__)
node_locks = {}
class NodeConcurrency(APIRoute):
"""
To avoid strange effects, we prevent concurrency
between the same instance of the node
(excepting when streaming a PCAP file and for WebSocket consoles).
"""
def get_route_handler(self) -> Callable:
original_route_handler = super().get_route_handler()
async def custom_route_handler(request: Request) -> Response:
node_id = request.path_params.get("node_id")
project_id = request.path_params.get("project_id")
if node_id and "pcap" not in request.url.path and not request.url.path.endswith("console/ws"):
lock_key = f"{project_id}:{node_id}"
node_locks.setdefault(lock_key, {"lock": asyncio.Lock(), "concurrency": 0})
node_locks[lock_key]["concurrency"] += 1
async with node_locks[lock_key]["lock"]:
response = await original_route_handler(request)
node_locks[lock_key]["concurrency"] -= 1
if node_locks[lock_key]["concurrency"] <= 0:
del node_locks[lock_key]
else:
response = await original_route_handler(request)
return response
return custom_route_handler
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or node"}}
router = APIRouter(route_class=NodeConcurrency, responses=responses)
async def dep_project(project_id: UUID) -> Project:
"""
Dependency to retrieve a project.
"""
project = await Controller.instance().get_loaded_project(str(project_id))
return project
async def dep_node(node_id: UUID, project: Project = Depends(dep_project)) -> None:
"""
Dependency to retrieve a node.
"""
node = project.get_node(str(node_id))
return node
@router.post(
"",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Node,
responses={
404: {"model": schemas.ErrorMessage, "description": "Could not find project"},
409: {"model": schemas.ErrorMessage, "description": "Could not create node"},
},
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def create_node(node_data: schemas.NodeCreate, project: Project = Depends(dep_project)) -> schemas.Node:
"""
Create a new node.
Required privilege: Node.Allocate
"""
controller = Controller.instance()
compute = controller.get_compute(str(node_data.compute_id))
node_data = jsonable_encoder(node_data, exclude_unset=True)
node = await project.add_node(compute, node_data.pop("name"), node_data.pop("node_id", None), **node_data)
return node.asdict()
@router.get(
"",
response_model=List[schemas.Node],
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Node.Audit"))]
)
def get_nodes(project: Project = Depends(dep_project)) -> List[schemas.Node]:
"""
Return all nodes belonging to a given project.
Required privilege: Node.Audit
"""
if project.status == "closed":
# allow to retrieve nodes from a closed project
return project.nodes.values()
return [v.asdict() for v in project.nodes.values()]
@router.post("/start", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def start_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Start all nodes belonging to a given project.
Required privilege: Node.PowerMgmt
"""
await project.start_all()
@router.post("/stop", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def stop_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Stop all nodes belonging to a given project.
Required privilege: Node.PowerMgmt
"""
await project.stop_all()
@router.post("/suspend", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def suspend_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Suspend all nodes belonging to a given project.
Required privilege: Node.PowerMgmt
"""
await project.suspend_all()
@router.post("/reload", status_code=status.HTTP_204_NO_CONTENT, dependencies=[Depends(has_privilege("Node.PowerMgmt"))])
async def reload_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Reload all nodes belonging to a given project.
Required privilege: Node.PowerMgmt
"""
await project.stop_all()
await project.start_all()
@router.get("/{node_id}", response_model=schemas.Node, dependencies=[Depends(has_privilege("Node.Audit"))])
def get_node(node: Node = Depends(dep_node)) -> schemas.Node:
"""
Return a node from a given project.
Required privilege: Node.Audit
"""
return node.asdict()
@router.put(
"/{node_id}",
response_model=schemas.Node,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Node.Modify"))]
)
async def update_node(node_data: schemas.NodeUpdate, node: Node = Depends(dep_node)) -> schemas.Node:
"""
Update a node.
Required privilege: Node.Modify
"""
node_data = jsonable_encoder(node_data, exclude_unset=True)
# Ignore these because we only use them when creating a node
node_data.pop("node_id", None)
node_data.pop("node_type", None)
node_data.pop("compute_id", None)
await node.update(**node_data)
return node.asdict()
@router.delete(
"/{node_id}",
status_code=status.HTTP_204_NO_CONTENT,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Cannot delete node"}},
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def delete_node(
node_id: UUID, project: Project = Depends(dep_project),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a node from a project.
Required privilege: Node.Allocate
"""
await project.delete_node(str(node_id))
await rbac_repo.delete_all_ace_starting_with_path(f"/projects/{project.id}/nodes/{node_id}")
@router.post(
"/{node_id}/duplicate",
response_model=schemas.Node,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def duplicate_node(duplicate_data: schemas.NodeDuplicate, node: Node = Depends(dep_node)) -> schemas.Node:
"""
Duplicate a node.
Required privilege: Node.Allocate
"""
new_node = await node.project.duplicate_node(node, duplicate_data.x, duplicate_data.y, duplicate_data.z)
return new_node.asdict()
@router.post(
"/{node_id}/start",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
)
async def start_node(start_data: dict, node: Node = Depends(dep_node)) -> None:
"""
Start a node.
Required privilege: Node.PowerMgmt
"""
await node.start(data=start_data)
@router.post(
"/{node_id}/stop",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
)
async def stop_node(node: Node = Depends(dep_node)) -> None:
"""
Stop a node.
Required privilege: Node.PowerMgmt
"""
await node.stop()
@router.post(
"/{node_id}/suspend",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
)
async def suspend_node(node: Node = Depends(dep_node)) -> None:
"""
Suspend a node.
Required privilege: Node.PowerMgmt
"""
await node.suspend()
@router.post(
"/{node_id}/reload",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.PowerMgmt"))]
)
async def reload_node(node: Node = Depends(dep_node)) -> None:
"""
Reload a node.
Required privilege: Node.PowerMgmt
"""
await node.reload()
@router.post(
"/{node_id}/isolate",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Link.Modify"))]
)
async def isolate_node(node: Node = Depends(dep_node)) -> None:
"""
Isolate a node (suspend all attached links).
Required privilege: Link.Modify
"""
for link in node.links:
await link.update_suspend(True)
@router.post(
"/{node_id}/unisolate",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Link.Modify"))]
)
async def unisolate_node(node: Node = Depends(dep_node)) -> None:
"""
Un-isolate a node (resume all attached suspended links).
Required privilege: Link.Modify
"""
for link in node.links:
await link.update_suspend(False)
@router.get(
"/{node_id}/links",
response_model=List[schemas.Link],
response_model_exclude_unset=True,
dependencies = [Depends(has_privilege("Link.Audit"))]
)
async def get_node_links(node: Node = Depends(dep_node)) -> List[schemas.Link]:
"""
Return all the links connected to a node.
Required privilege: Link.Audit
"""
links = []
for link in node.links:
links.append(link.asdict())
return links
@router.get("/{node_id}/dynamips/auto_idlepc", dependencies=[Depends(has_privilege("Node.Audit"))])
async def auto_idlepc(node: Node = Depends(dep_node)) -> dict:
"""
Compute an Idle-PC value for a Dynamips node
Required privilege: Node.Audit
"""
if node.node_type != "dynamips":
raise ControllerBadRequestError("Auto Idle-PC is only supported on a Dynamips node")
return await node.dynamips_auto_idlepc()
@router.get("/{node_id}/dynamips/idlepc_proposals", dependencies=[Depends(has_privilege("Node.Audit"))])
async def idlepc_proposals(node: Node = Depends(dep_node)) -> List[str]:
"""
Compute a list of potential idle-pc values for a Dynamips node
Required privilege: Node.Audit
"""
if node.node_type != "dynamips":
raise ControllerBadRequestError("Idle-PC proposals is only supported on a Dynamips node")
return await node.dynamips_idlepc_proposals()
@router.post(
"/{node_id}/qemu/disk_image/{disk_name}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def create_disk_image(
disk_name: str,
disk_data: schemas.QemuDiskImageCreate,
node: Node = Depends(dep_node)
) -> None:
"""
Create a Qemu disk image.
Required privilege: Node.Allocate
"""
if node.node_type != "qemu":
raise ControllerBadRequestError("Creating a disk image is only supported on a Qemu node")
await node.post(f"/disk_image/{disk_name}", data=disk_data.model_dump(exclude_unset=True))
@router.put(
"/{node_id}/qemu/disk_image/{disk_name}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def update_disk_image(
disk_name: str,
disk_data: schemas.QemuDiskImageUpdate,
node: Node = Depends(dep_node)
) -> None:
"""
Update a Qemu disk image.
Required privilege: Node.Allocate
"""
if node.node_type != "qemu":
raise ControllerBadRequestError("Updating a disk image is only supported on a Qemu node")
await node.put(f"/disk_image/{disk_name}", data=disk_data.model_dump(exclude_unset=True))
@router.delete(
"/{node_id}/qemu/disk_image/{disk_name}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def delete_disk_image(
disk_name: str,
node: Node = Depends(dep_node)
) -> None:
"""
Delete a Qemu disk image.
Required privilege: Node.Allocate
"""
if node.node_type != "qemu":
raise ControllerBadRequestError("Deleting a disk image is only supported on a Qemu node")
await node.delete(f"/disk_image/{disk_name}")
@router.get("/{node_id}/files/{file_path:path}", dependencies=[Depends(has_privilege("Node.Audit"))])
async def get_file(file_path: str, node: Node = Depends(dep_node)) -> Response:
"""
Return a file from the node directory.
Required privilege: Node.Audit
"""
path = force_unix_path(file_path)
# Raise error if user try to escape
if path[0] == ".":
raise ControllerForbiddenError("It is forbidden to get a file outside the project directory")
node_type = node.node_type
path = f"/project-files/{node_type}/{node.id}/{path}"
res = await node.compute.http_query("GET", f"/projects/{node.project.id}/files{path}", timeout=None, raw=True)
return Response(res.body, media_type="application/octet-stream", status_code=res.status)
@router.post(
"/{node_id}/files/{file_path:path}",
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Node.Modify"))]
)
async def post_file(file_path: str, request: Request, node: Node = Depends(dep_node)):
"""
Write a file in the node directory.
Required privilege: Node.Modify
"""
path = force_unix_path(file_path)
# Raise error if user try to escape
if path[0] == ".":
raise ControllerForbiddenError("Cannot write outside the node directory")
node_type = node.node_type
path = f"/project-files/{node_type}/{node.id}/{path}"
data = await request.body() # FIXME: are we handling timeout or large files correctly?
await node.compute.http_query("POST", f"/projects/{node.project.id}/files{path}", data=data, timeout=None, raw=True)
# FIXME: response with correct status code (from compute)
@router.websocket("/{node_id}/console/ws")
async def ws_console(
websocket: WebSocket,
current_user: schemas.User = Depends(has_privilege_on_websocket("Node.Console")),
node: Node = Depends(dep_node)
) -> None:
"""
WebSocket console.
Required privilege: Node.Console
"""
if current_user is None:
return
compute = node.compute
log.info(
f"New client {websocket.client.host}:{websocket.client.port} has connected to controller console WebSocket"
)
compute_host = compute.host
try:
# handle IPv6 address
ip = ipaddress.ip_address(compute_host)
if isinstance(ip, ipaddress.IPv6Address):
compute_host = '[' + compute_host + ']'
except ValueError:
pass
ws_console_compute_url = (
f"{websocket.url.scheme}://{compute_host}:{compute.port}/v3/compute/projects/"
f"{node.project.id}/{node.node_type}/nodes/{node.id}/console/ws"
)
async def ws_receive(ws_console_compute):
"""
Receive WebSocket data from client and forward to compute console WebSocket.
"""
try:
while True:
data = await websocket.receive_text()
if data:
await ws_console_compute.send_str(data)
except WebSocketDisconnect:
await ws_console_compute.close()
log.info(
f"Client {websocket.client.host}:{websocket.client.port} has disconnected from controller"
f" console WebSocket"
)
try:
# receive WebSocket data from compute console WebSocket and forward to client.
log.info(f"Forwarding console WebSocket to '{ws_console_compute_url}'")
server_config = Config.instance().settings.Server
user = server_config.compute_username
password = server_config.compute_password
if not user:
raise ControllerForbiddenError("Compute username is not set")
user = user.strip()
if user and password:
auth = aiohttp.BasicAuth(user, password.get_secret_value(), "utf-8")
else:
auth = aiohttp.BasicAuth(user, "")
ssl_context = Controller.instance().ssl_context()
async with HTTPClient.get_client().ws_connect(ws_console_compute_url, auth=auth, ssl_context=ssl_context) as ws:
asyncio.ensure_future(ws_receive(ws))
async for msg in ws:
if msg.type == aiohttp.WSMsgType.TEXT:
await websocket.send_text(msg.data)
elif msg.type == aiohttp.WSMsgType.BINARY:
await websocket.send_bytes(msg.data)
elif msg.type == aiohttp.WSMsgType.ERROR:
break
except aiohttp.ClientError as e:
log.error(f"Client error received when forwarding to compute console WebSocket: {e}")
@router.post(
"/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.Console"))]
)
async def reset_console_all_nodes(project: Project = Depends(dep_project)) -> None:
"""
Reset console for all nodes belonging to the project.
Required privilege: Node.Console
"""
await project.reset_console_all()
@router.post(
"/{node_id}/console/reset",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Node.Console"))]
)
async def console_reset(node: Node = Depends(dep_node)) -> None:
"""
Reset a console for a given node.
Required privilege: Node.Console
"""
await node.post("/console/reset")

View File

@ -0,0 +1,239 @@
#!/usr/bin/env python
#
# Copyright (C) 2023 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for resource pools.
"""
from fastapi import APIRouter, Depends, status
from uuid import UUID
from typing import List
from gns3server import schemas
from gns3server.controller.controller_error import (
ControllerError,
ControllerBadRequestError,
ControllerNotFoundError
)
from gns3server.controller import Controller
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.db.repositories.pools import ResourcePoolsRepository
from .dependencies.rbac import has_privilege
from .dependencies.database import get_repository
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"",
response_model=List[schemas.ResourcePool],
dependencies=[Depends(has_privilege("Pool.Audit"))]
)
async def get_resource_pools(
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> List[schemas.ResourcePool]:
"""
Get all resource pools.
Required privilege: Pool.Audit
"""
return await pools_repo.get_resource_pools()
@router.post(
"",
response_model=schemas.ResourcePool,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Pool.Allocate"))]
)
async def create_resource_pool(
resource_pool_create: schemas.ResourcePoolCreate,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> schemas.ResourcePool:
"""
Create a new resource pool
Required privilege: Pool.Allocate
"""
if await pools_repo.get_resource_pool_by_name(resource_pool_create.name):
raise ControllerBadRequestError(f"Resource pool '{resource_pool_create.name}' already exists")
return await pools_repo.create_resource_pool(resource_pool_create)
@router.get(
"/{resource_pool_id}",
response_model=schemas.ResourcePool,
dependencies=[Depends(has_privilege("Pool.Audit"))]
)
async def get_resource_pool(
resource_pool_id: UUID,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> schemas.ResourcePool:
"""
Get a resource pool.
Required privilege: Pool.Audit
"""
resource_pool = await pools_repo.get_resource_pool(resource_pool_id)
if not resource_pool:
raise ControllerNotFoundError(f"Resource pool '{resource_pool_id}' not found")
return resource_pool
@router.put(
"/{resource_pool_id}",
response_model=schemas.ResourcePool,
dependencies=[Depends(has_privilege("Pool.Modify"))]
)
async def update_resource_pool(
resource_pool_id: UUID,
resource_pool_update: schemas.ResourcePoolUpdate,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> schemas.ResourcePool:
"""
Update a resource pool.
Required privilege: Pool.Modify
"""
resource_pool = await pools_repo.get_resource_pool(resource_pool_id)
if not resource_pool:
raise ControllerNotFoundError(f"Resource pool '{resource_pool_id}' not found")
return await pools_repo.update_resource_pool(resource_pool_id, resource_pool_update)
@router.delete(
"/{resource_pool_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Pool.Allocate"))]
)
async def delete_resource_pool(
resource_pool_id: UUID,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository)),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a resource pool.
Required privilege: Pool.Allocate
"""
resource_pool = await pools_repo.get_resource_pool(resource_pool_id)
if not resource_pool:
raise ControllerNotFoundError(f"Resource pool '{resource_pool_id}' not found")
success = await pools_repo.delete_resource_pool(resource_pool_id)
if not success:
raise ControllerError(f"Resource pool '{resource_pool_id}' could not be deleted")
await rbac_repo.delete_all_ace_starting_with_path(f"/pools/{resource_pool_id}")
@router.get(
"/{resource_pool_id}/resources",
response_model=List[schemas.Resource],
dependencies=[Depends(has_privilege("Pool.Audit"))]
)
async def get_pool_resources(
resource_pool_id: UUID,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository)),
) -> List[schemas.Resource]:
"""
Get all resource in a pool.
Required privilege: Pool.Audit
"""
return await pools_repo.get_pool_resources(resource_pool_id)
@router.put(
"/{resource_pool_id}/resources/{resource_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Pool.Modify"))]
)
async def add_resource_to_pool(
resource_pool_id: UUID,
resource_id: UUID,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository)),
) -> None:
"""
Add resource to a resource pool.
Required privilege: Pool.Modify
"""
resource_pool = await pools_repo.get_resource_pool(resource_pool_id)
if not resource_pool:
raise ControllerNotFoundError(f"Resource pool '{resource_pool_id}' not found")
# TODO: consider if a resource can belong to multiple pools
resources = await pools_repo.get_pool_resources(resource_pool_id)
for resource in resources:
if resource.resource_id == resource_id:
raise ControllerBadRequestError(f"Resource '{resource_id}' is already in '{resource_pool.name}'")
# we only support projects in resource pools for now
project = Controller.instance().get_project(str(resource_id))
resource = await pools_repo.get_resource(resource_id)
if not resource:
# the resource is not in the database yet, create it
resource_create = schemas.ResourceCreate(resource_id=resource_id, resource_type="project", name=project.name)
resource = await pools_repo.create_resource(resource_create)
await pools_repo.add_resource_to_pool(resource_pool_id, resource)
@router.delete(
"/{resource_pool_id}/resources/{resource_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Pool.Modify"))]
)
async def remove_resource_from_pool(
resource_pool_id: UUID,
resource_id: UUID,
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository)),
) -> None:
"""
Remove resource from a resource pool.
Required privilege: Pool.Modify
"""
resource = await pools_repo.get_resource(resource_id)
if not resource:
raise ControllerNotFoundError(f"Resource '{resource_id}' not found")
resource_pool = await pools_repo.remove_resource_from_pool(resource_pool_id, resource)
if not resource_pool:
raise ControllerNotFoundError(f"Resource pool '{resource_pool_id}' not found")
# TODO: consider if a resource can belong to multiple pools
success = await pools_repo.delete_resource(resource.resource_id)
if not success:
raise ControllerError(f"Resource '{resource_id}' could not be deleted")

View File

@ -0,0 +1,43 @@
#
# Software Name : GNS3 server
# Version: 3
# SPDX-FileCopyrightText: Copyright (c) 2023 Orange Business Services
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This software is distributed under the GPL-3.0 or any later version,
# the text of which is available at https://www.gnu.org/licenses/gpl-3.0.txt
# or see the "LICENSE" file for more details.
#
# Author: Sylvain MATHIEU
#
"""
API route for privileges
"""
from typing import List
from gns3server.db.repositories.rbac import RbacRepository
from .dependencies.database import get_repository
from fastapi import APIRouter, Depends
import logging
from gns3server import schemas
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"",
response_model=List[schemas.Privilege],
)
async def get_privileges(
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> List[schemas.Privilege]:
"""
Get all privileges.
Required privilege: None
"""
return await rbac_repo.get_privileges()

View File

@ -0,0 +1,579 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for projects.
"""
import os
import asyncio
import tempfile
import aiofiles
import time
import urllib.parse
import gns3server.utils.zipfile_zstd as zipfile
import logging
log = logging.getLogger()
from fastapi import APIRouter, Depends, Request, Body, HTTPException, status, WebSocket, WebSocketDisconnect
from fastapi.encoders import jsonable_encoder
from fastapi.responses import StreamingResponse, FileResponse
from websockets.exceptions import ConnectionClosed, WebSocketException
from typing import List, Optional
from uuid import UUID
from gns3server import schemas
from gns3server.controller import Controller
from gns3server.controller.project import Project
from gns3server.controller.controller_error import ControllerError, ControllerBadRequestError
from gns3server.controller.import_project import import_project as import_controller_project
from gns3server.controller.export_project import export_project as export_controller_project
from gns3server.utils.asyncio import aiozipstream
from gns3server.utils.path import is_safe_path
from gns3server.db.repositories.templates import TemplatesRepository
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.db.repositories.pools import ResourcePoolsRepository
from gns3server.services.templates import TemplatesService
from .dependencies.rbac import has_privilege, has_privilege_on_websocket
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project"}}
router = APIRouter(responses=responses)
def dep_project(project_id: UUID) -> Project:
"""
Dependency to retrieve a project.
"""
project = Controller.instance().get_project(str(project_id))
return project
@router.get(
"",
response_model=List[schemas.Project],
response_model_exclude_unset=True
)
async def get_projects(
current_user: schemas.User = Depends(get_current_active_user),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> List[schemas.Project]:
"""
Return all projects.
Required privilege: Project.Audit
"""
controller = Controller.instance()
projects = []
if current_user.is_superadmin:
# super admin sees all projects
return [p.asdict() for p in controller.projects.values()]
elif await rbac_repo.check_user_has_privilege(current_user.user_id, "/projects", "Project.Audit"):
# user with Project.Audit privilege on '/projects' sees all projects except those in resource pools
project_ids_in_pools = [str(r.resource_id) for r in await pools_repo.get_resources() if r.resource_type == "project"]
projects.extend([p.asdict() for p in controller.projects.values() if p.id not in project_ids_in_pools])
# user with Project.Audit privilege on resource pools sees the projects in these pools
user_pool_resources = await rbac_repo.get_user_pool_resources(current_user.user_id, "Project.Audit")
project_ids_in_pools = [str(r.resource_id) for r in user_pool_resources if r.resource_type == "project"]
projects.extend([p.asdict() for p in controller.projects.values() if p.id in project_ids_in_pools])
return projects
@router.post(
"",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
response_model_exclude_unset=True,
responses={409: {"model": schemas.ErrorMessage, "description": "Could not create project"}},
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def create_project(
project_data: schemas.ProjectCreate,
) -> schemas.Project:
"""
Create a new project.
Required privilege: Project.Allocate
"""
controller = Controller.instance()
project = await controller.add_project(**jsonable_encoder(project_data, exclude_unset=True))
return project.asdict()
@router.get("/{project_id}", response_model=schemas.Project, dependencies=[Depends(has_privilege("Project.Audit"))])
def get_project(project: Project = Depends(dep_project)) -> schemas.Project:
"""
Return a project.
Required privilege: Project.Audit
"""
return project.asdict()
@router.put(
"/{project_id}",
response_model=schemas.Project,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Project.Modify"))]
)
async def update_project(
project_data: schemas.ProjectUpdate,
project: Project = Depends(dep_project)
) -> schemas.Project:
"""
Update a project.
Required privilege: Project.Modify
"""
await project.update(**jsonable_encoder(project_data, exclude_unset=True))
return project.asdict()
@router.delete(
"/{project_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def delete_project(
project: Project = Depends(dep_project),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a project.
Required privilege: Project.Allocate
"""
controller = Controller.instance()
await project.delete()
controller.remove_project(project)
await rbac_repo.delete_all_ace_starting_with_path(f"/projects/{project.id}")
@router.get("/{project_id}/stats", dependencies=[Depends(has_privilege("Project.Audit"))])
def get_project_stats(project: Project = Depends(dep_project)) -> dict:
"""
Return a project statistics.
Required privilege: Project.Audit
"""
return project.stats()
@router.post(
"/{project_id}/close",
status_code=status.HTTP_204_NO_CONTENT,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not close project"}},
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def close_project(project: Project = Depends(dep_project)) -> None:
"""
Close a project.
Required privilege: Project.Allocate
"""
await project.close()
@router.post(
"/{project_id}/open",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not open project"}},
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def open_project(project: Project = Depends(dep_project)) -> schemas.Project:
"""
Open a project.
Required privilege: Project.Allocate
"""
await project.open()
return project.asdict()
@router.post(
"/load",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not load project"}},
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def load_project(path: str = Body(..., embed=True)) -> schemas.Project:
"""
Load a project (local server only).
Required privilege: Project.Allocate
"""
controller = Controller.instance()
dot_gns3_file = path
project = await controller.load_project(dot_gns3_file)
return project.asdict()
@router.get("/{project_id}/notifications", dependencies=[Depends(has_privilege("Project.Audit"))])
async def project_http_notifications(project_id: UUID) -> StreamingResponse:
"""
Receive project notifications about the controller from HTTP stream.
Required privilege: Project.Audit
"""
from gns3server.api.server import app
controller = Controller.instance()
project = controller.get_project(str(project_id))
log.info(f"New client has connected to the notification stream for project ID '{project.id}' (HTTP stream method)")
async def event_stream():
try:
with controller.notification.project_queue(project.id) as queue:
while not app.state.exiting:
msg = await queue.get_json(5)
yield f"{msg}\n".encode("utf-8")
finally:
log.info(f"Client has disconnected from notification for project ID '{project.id}' (HTTP stream method)")
if project.auto_close:
# To avoid trouble with client connecting disconnecting we sleep few seconds before checking
# if someone else is not connected
await asyncio.sleep(5)
if not controller.notification.project_has_listeners(project.id):
log.info(f"Project '{project.id}' is automatically closing due to no client listening")
await project.close()
return StreamingResponse(event_stream(), media_type="application/json")
@router.websocket("/{project_id}/notifications/ws")
async def project_ws_notifications(
project_id: UUID,
websocket: WebSocket,
current_user: schemas.User = Depends(has_privilege_on_websocket("Project.Audit"))
) -> None:
"""
Receive project notifications about the controller from WebSocket.
Required privilege: Project.Audit
"""
if current_user is None:
return
controller = Controller.instance()
project = controller.get_project(str(project_id))
log.info(f"New client has connected to the notification stream for project ID '{project.id}' (WebSocket method)")
try:
with controller.notification.project_queue(project.id) as queue:
while True:
notification = await queue.get_json(5)
await websocket.send_text(notification)
except (ConnectionClosed, WebSocketDisconnect):
log.info(f"Client has disconnected from notification stream for project ID '{project.id}' (WebSocket method)")
except WebSocketException as e:
log.warning(f"Error while sending to project event to WebSocket client: {e}")
finally:
if project.auto_close:
# To avoid trouble with client connecting disconnecting we sleep few seconds before checking
# if someone else is not connected
await asyncio.sleep(5)
if not controller.notification.project_has_listeners(project.id):
log.info(f"Project '{project.id}' is automatically closing due to no client listening")
await project.close()
@router.get("/{project_id}/export", dependencies=[Depends(has_privilege("Project.Audit"))])
async def export_project(
project: Project = Depends(dep_project),
include_snapshots: bool = False,
include_images: bool = False,
reset_mac_addresses: bool = False,
keep_compute_ids: bool = False,
compression: schemas.ProjectCompression = "zstd",
compression_level: int = None,
) -> StreamingResponse:
"""
Export a project as a portable archive.
Required privilege: Project.Audit
"""
compression_query = compression.lower()
if compression_query == "zip":
compression = zipfile.ZIP_DEFLATED
if compression_level is not None and (compression_level < 0 or compression_level > 9):
raise ControllerBadRequestError("Compression level must be between 0 and 9 for ZIP compression")
elif compression_query == "none":
compression = zipfile.ZIP_STORED
elif compression_query == "bzip2":
compression = zipfile.ZIP_BZIP2
if compression_level is not None and (compression_level < 1 or compression_level > 9):
raise ControllerBadRequestError("Compression level must be between 1 and 9 for BZIP2 compression")
elif compression_query == "lzma":
compression = zipfile.ZIP_LZMA
elif compression_query == "zstd":
compression = zipfile.ZIP_ZSTANDARD
if compression_level is not None and (compression_level < 1 or compression_level > 22):
raise ControllerBadRequestError("Compression level must be between 1 and 22 for Zstandard compression")
if compression_level is not None and compression_query in ("none", "lzma"):
raise ControllerBadRequestError(f"Compression level is not supported for '{compression_query}' compression method")
try:
begin = time.time()
# use the parent directory as a temporary working dir
working_dir = os.path.abspath(os.path.join(project.path, os.pardir))
async def streamer():
log.info(f"Exporting project '{project.name}' with '{compression_query}' compression "
f"(level {compression_level})")
with tempfile.TemporaryDirectory(dir=working_dir) as tmpdir:
with aiozipstream.ZipFile(compression=compression, compresslevel=compression_level) as zstream:
await export_controller_project(
zstream,
project,
tmpdir,
include_snapshots=include_snapshots,
include_images=include_images,
keep_compute_ids=keep_compute_ids,
reset_mac_addresses=reset_mac_addresses,
)
async for chunk in zstream:
yield chunk
log.info(f"Project '{project.name}' exported in {time.time() - begin:.4f} seconds")
# Will be raised if you have no space left or permission issue on your temporary directory
# RuntimeError: something was wrong during the zip process
except (ValueError, OSError, RuntimeError) as e:
raise ConnectionError(f"Cannot export project: {e}")
headers = {"CONTENT-DISPOSITION": f'attachment; filename="{project.name}.gns3project"'}
return StreamingResponse(streamer(), media_type="application/gns3project", headers=headers)
@router.post(
"/{project_id}/import",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def import_project(
project_id: UUID,
request: Request,
name: Optional[str] = None
) -> schemas.Project:
"""
Import a project from a portable archive.
Required privilege: Project.Allocate
"""
controller = Controller.instance()
# We write the content to a temporary location and then we extract it all.
# It could be more optimal to stream this but it is not implemented in Python.
try:
begin = time.time()
working_dir = controller.projects_directory()
with tempfile.TemporaryDirectory(dir=working_dir) as tmpdir:
temp_project_path = os.path.join(tmpdir, "project.zip")
async with aiofiles.open(temp_project_path, "wb") as f:
async for chunk in request.stream():
await f.write(chunk)
with open(temp_project_path, "rb") as f:
project = await import_controller_project(controller, str(project_id), f, name=name)
log.info(f"Project '{project.name}' imported in {time.time() - begin:.4f} seconds")
except OSError as e:
raise ControllerError(f"Could not import the project: {e}")
return project.asdict()
@router.post(
"/{project_id}/duplicate",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
responses={**responses, 409: {"model": schemas.ErrorMessage, "description": "Could not duplicate project"}},
dependencies=[Depends(has_privilege("Project.Allocate"))]
)
async def duplicate_project(
project_data: schemas.ProjectDuplicate,
project: Project = Depends(dep_project),
pools_repo: ResourcePoolsRepository = Depends(get_repository(ResourcePoolsRepository))
) -> schemas.Project:
"""
Duplicate a project.
Required privilege: Project.Allocate
"""
reset_mac_addresses = project_data.reset_mac_addresses
new_project = await project.duplicate(
name=project_data.name, reset_mac_addresses=reset_mac_addresses
)
# Add the new project in the same resource pools if the duplicated project is in any
pool_memberships = await pools_repo.get_resource_memberships(project.id)
if pool_memberships:
resource_create = schemas.ResourceCreate(resource_id=new_project.id, resource_type="project", name=new_project.name)
resource = await pools_repo.create_resource(resource_create)
for pool in pool_memberships:
await pools_repo.add_resource_to_pool(pool.resource_pool_id, resource)
return new_project.asdict()
@router.get("/{project_id}/locked", dependencies=[Depends(has_privilege("Project.Audit"))])
async def locked_project(project: Project = Depends(dep_project)) -> bool:
"""
Returns whether a project is locked or not.
Required privilege: Project.Audit
"""
return project.locked
@router.post(
"/{project_id}/lock",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Project.Modify"))]
)
async def lock_project(project: Project = Depends(dep_project)) -> None:
"""
Lock all drawings and nodes in a given project.
Required privilege: Project.Audit
"""
project.lock()
@router.post(
"/{project_id}/unlock",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Project.Modify"))]
)
async def unlock_project(project: Project = Depends(dep_project)) -> None:
"""
Unlock all drawings and nodes in a given project.
Required privilege: Project.Modify
"""
project.unlock()
@router.get("/{project_id}/files/{file_path:path}", dependencies=[Depends(has_privilege("Project.Audit"))])
async def get_file(file_path: str, project: Project = Depends(dep_project)) -> FileResponse:
"""
Return a file from a project.
Required privilege: Project.Audit
"""
file_path = urllib.parse.unquote(file_path)
path = os.path.normpath(file_path)
# Raise error if user try to escape
if not is_safe_path(path, project.path):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
path = os.path.join(project.path, path)
if not os.path.exists(path):
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
return FileResponse(path, media_type="application/octet-stream")
@router.post(
"/{project_id}/files/{file_path:path}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Project.Modify"))]
)
async def write_file(file_path: str, request: Request, project: Project = Depends(dep_project)) -> None:
"""
Write a file to a project.
Required privilege: Project.Modify
"""
file_path = urllib.parse.unquote(file_path)
path = os.path.normpath(file_path)
# Raise error if user try to escape
if not is_safe_path(path, project.path):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
path = os.path.join(project.path, path)
try:
async with aiofiles.open(path, "wb+") as f:
async for chunk in request.stream():
await f.write(chunk)
except FileNotFoundError:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
except PermissionError:
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED)
except OSError as e:
raise ControllerError(str(e))
@router.post(
"/{project_id}/templates/{template_id}",
response_model=schemas.Node,
status_code=status.HTTP_201_CREATED,
responses={404: {"model": schemas.ErrorMessage, "description": "Could not find project or template"}},
dependencies=[Depends(has_privilege("Node.Allocate"))]
)
async def create_node_from_template(
project_id: UUID,
template_id: UUID,
template_usage: schemas.TemplateUsage,
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
) -> schemas.Node:
"""
Create a new node from a template.
Required privilege: Node.Allocate
"""
template = await TemplatesService(templates_repo).get_template(template_id)
controller = Controller.instance()
project = controller.get_project(str(project_id))
node = await project.add_node_from_template(
template, x=template_usage.x, y=template_usage.y, compute_id=template_usage.compute_id
)
return node.asdict()

View File

@ -0,0 +1,224 @@
#!/usr/bin/env python
#
# Copyright (C) 2021 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for roles.
"""
from fastapi import APIRouter, Depends, status
from uuid import UUID
from typing import List
from gns3server import schemas
from gns3server.controller.controller_error import (
ControllerError,
ControllerBadRequestError,
ControllerNotFoundError,
ControllerForbiddenError,
)
from gns3server.db.repositories.rbac import RbacRepository
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"",
response_model=List[schemas.Role],
dependencies=[Depends(has_privilege("Role.Audit"))]
)
async def get_roles(
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> List[schemas.Role]:
"""
Get all roles.
Required privilege: Role.Audit
"""
return await rbac_repo.get_roles()
@router.post(
"",
response_model=schemas.Role,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Role.Allocate"))]
)
async def create_role(
role_create: schemas.RoleCreate,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.Role:
"""
Create a new role.
Required privilege: Role.Allocate
"""
if await rbac_repo.get_role_by_name(role_create.name):
raise ControllerBadRequestError(f"Role '{role_create.name}' already exists")
return await rbac_repo.create_role(role_create)
@router.get(
"/{role_id}",
response_model=schemas.Role,
dependencies=[Depends(has_privilege("Role.Audit"))]
)
async def get_role(
role_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> schemas.Role:
"""
Get a role.
Required privilege: Role.Audit
"""
role = await rbac_repo.get_role(role_id)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")
return role
@router.put(
"/{role_id}",
response_model=schemas.Role,
dependencies=[Depends(has_privilege("Role.Modify"))]
)
async def update_role(
role_id: UUID,
role_update: schemas.RoleUpdate,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> schemas.Role:
"""
Update a role.
Required privilege: Role.Modify
"""
role = await rbac_repo.get_role(role_id)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")
if role.is_builtin:
raise ControllerForbiddenError(f"Built-in role '{role_id}' cannot be updated")
return await rbac_repo.update_role(role_id, role_update)
@router.delete(
"/{role_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Role.Allocate"))]
)
async def delete_role(
role_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Delete a role.
Required privilege: Role.Allocate
"""
role = await rbac_repo.get_role(role_id)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")
if role.is_builtin:
raise ControllerForbiddenError(f"Built-in role '{role_id}' cannot be deleted")
success = await rbac_repo.delete_role(role_id)
if not success:
raise ControllerError(f"Role '{role_id}' could not be deleted")
await rbac_repo.delete_all_ace_starting_with_path(f"/roles/{role_id}")
@router.get(
"/{role_id}/privileges",
response_model=List[schemas.Privilege],
dependencies=[Depends(has_privilege("Role.Audit"))]
)
async def get_role_privileges(
role_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> List[schemas.Privilege]:
"""
Get all role privileges.
Required privilege: Role.Audit
"""
return await rbac_repo.get_role_privileges(role_id)
@router.put(
"/{role_id}/privileges/{privilege_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Role.Modify"))]
)
async def add_privilege_to_role(
role_id: UUID,
privilege_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Add a privilege to a role.
Required privilege: Role.Modify
"""
privilege = await rbac_repo.get_privilege(privilege_id)
if not privilege:
raise ControllerNotFoundError(f"Privilege '{privilege_id}' not found")
role = await rbac_repo.add_privilege_to_role(role_id, privilege)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")
@router.delete(
"/{role_id}/privileges/{privilege_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Role.Modify"))]
)
async def remove_privilege_from_role(
role_id: UUID,
privilege_id: UUID,
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)),
) -> None:
"""
Remove privilege from a role.
Required privilege: Role.Modify
"""
privilege = await rbac_repo.get_privilege(privilege_id)
if not privilege:
raise ControllerNotFoundError(f"Privilege '{privilege_id}' not found")
role = await rbac_repo.remove_privilege_from_role(role_id, privilege)
if not role:
raise ControllerNotFoundError(f"Role '{role_id}' not found")

View File

@ -0,0 +1,124 @@
#!/usr/bin/env python
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for snapshots.
"""
import logging
log = logging.getLogger()
from fastapi import APIRouter, Depends, status
from typing import List
from uuid import UUID
from gns3server.controller.project import Project
from gns3server.db.repositories.rbac import RbacRepository
from gns3server import schemas
from gns3server.controller import Controller
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or snapshot"}}
router = APIRouter(responses=responses)
def dep_project(project_id: UUID) -> Project:
"""
Dependency to retrieve a project.
"""
project = Controller.instance().get_project(str(project_id))
return project
@router.post(
"",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Snapshot,
dependencies=[Depends(has_privilege("Snapshot.Allocate"))]
)
async def create_snapshot(
snapshot_data: schemas.SnapshotCreate,
project: Project = Depends(dep_project)
) -> schemas.Snapshot:
"""
Create a new snapshot of a project.
Required privilege: Snapshot.Allocate
"""
snapshot = await project.snapshot(snapshot_data.name)
return snapshot.asdict()
@router.get(
"",
response_model=List[schemas.Snapshot],
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Snapshot.Audit"))]
)
def get_snapshots(project: Project = Depends(dep_project)) -> List[schemas.Snapshot]:
"""
Return all snapshots belonging to a given project.
Required privilege: Snapshot.Audit
"""
snapshots = [s for s in project.snapshots.values()]
return [s.asdict() for s in sorted(snapshots, key=lambda s: (s.created_at, s.name))]
@router.delete(
"/{snapshot_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Snapshot.Allocate"))]
)
async def delete_snapshot(
snapshot_id: UUID,
project: Project = Depends(dep_project),
rbac_repo=Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a snapshot.
Required privilege: Snapshot.Allocate
"""
await project.delete_snapshot(str(snapshot_id))
await rbac_repo.delete_all_ace_starting_with_path(f"/projects/{project.id}/snapshots/{snapshot_id}")
@router.post(
"/{snapshot_id}/restore",
status_code=status.HTTP_201_CREATED,
response_model=schemas.Project,
dependencies=[Depends(has_privilege("Snapshot.Restore"))]
)
async def restore_snapshot(snapshot_id: UUID, project: Project = Depends(dep_project)) -> schemas.Project:
"""
Restore a snapshot.
Required privilege: Snapshot.Restore
"""
snapshot = project.get_snapshot(str(snapshot_id))
project = await snapshot.restore()
return project.asdict()

View File

@ -0,0 +1,133 @@
#!/usr/bin/env python
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for symbols.
"""
import os
from fastapi import APIRouter, Request, Depends, Response, status
from fastapi.responses import FileResponse
from typing import List
from gns3server.controller import Controller
from gns3server import schemas
from gns3server.controller.controller_error import ControllerError, ControllerNotFoundError
from .dependencies.rbac import has_privilege
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.get(
"",
dependencies=[Depends(has_privilege("Symbol.Audit"))]
)
def get_symbols() -> List[dict]:
"""
Return all symbols.
Required privilege: Symbol.Audit
"""
controller = Controller.instance()
return controller.symbols.list()
@router.get(
"/{symbol_id:path}/raw",
responses={404: {"model": schemas.ErrorMessage, "description": "Could not find symbol"}},
# FIXME: this is a temporary workaround due to a bug in the web-ui: https://github.com/GNS3/gns3-web-ui/issues/1466
# dependencies=[Depends(has_privilege("Symbol.Audit"))]
)
async def get_symbol(symbol_id: str) -> FileResponse:
"""
Download a symbol file.
Required privilege: Symbol.Audit
"""
controller = Controller.instance()
try:
symbol = controller.symbols.get_path(symbol_id)
return FileResponse(symbol)
except (KeyError, OSError) as e:
raise ControllerNotFoundError(f"Could not get symbol file: {e}")
@router.get(
"/{symbol_id:path}/dimensions",
responses={404: {"model": schemas.ErrorMessage, "description": "Could not find symbol"}},
dependencies=[Depends(has_privilege("Symbol.Audit"))]
)
async def get_symbol_dimensions(symbol_id: str) -> dict:
"""
Get a symbol dimensions.
Required privilege: Symbol.Audit
"""
controller = Controller.instance()
try:
width, height, _ = controller.symbols.get_size(symbol_id)
symbol_dimensions = {"width": width, "height": height}
return symbol_dimensions
except (KeyError, OSError, ValueError) as e:
raise ControllerNotFoundError(f"Could not get symbol file: {e}")
@router.get("/default_symbols", dependencies=[Depends(has_privilege("Symbol.Audit"))])
def get_default_symbols() -> dict:
"""
Return all default symbols.
Required privilege: Symbol.Audit
"""
controller = Controller.instance()
return controller.symbols.default_symbols()
@router.post(
"/{symbol_id:path}/raw",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Symbol.Allocate"))]
)
async def upload_symbol(symbol_id: str, request: Request) -> None:
"""
Upload a symbol file.
Required privilege: Symbol.Allocate
"""
controller = Controller.instance()
path = os.path.join(controller.symbols.symbols_path(), os.path.basename(symbol_id))
try:
with open(path, "wb") as f:
f.write(await request.body())
except (UnicodeEncodeError, OSError) as e:
raise ControllerError(f"Could not write symbol file '{path}': {e}")
# Reset the symbol list
controller.symbols.list()

View File

@ -0,0 +1,192 @@
#
# Copyright (C) 2021 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for templates.
"""
import hashlib
import json
import logging
log = logging.getLogger(__name__)
from fastapi import APIRouter, Request, HTTPException, Depends, Response, status
from typing import List, Optional
from uuid import UUID
from gns3server import schemas
from gns3server.db.repositories.templates import TemplatesRepository
from gns3server.services.templates import TemplatesService
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.db.repositories.images import ImagesRepository
from .dependencies.authentication import get_current_active_user
from .dependencies.rbac import has_privilege
from .dependencies.database import get_repository
responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find template"}}
router = APIRouter(responses=responses)
@router.post(
"",
response_model=schemas.Template,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Template.Allocate"))]
)
async def create_template(
template_create: schemas.TemplateCreate,
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository))
) -> schemas.Template:
"""
Create a new template.
Required privilege: Template.Allocate
"""
template = await TemplatesService(templates_repo).create_template(template_create)
return template
@router.get(
"/{template_id}",
response_model=schemas.Template,
response_model_exclude_unset=True,
dependencies=[Depends(get_current_active_user)],
#dependencies=[Depends(has_privilege("Template.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
)
async def get_template(
template_id: UUID,
request: Request,
response: Response,
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
) -> schemas.Template:
"""
Return a template.
Required privilege: Template.Audit
"""
request_etag = request.headers.get("If-None-Match", "")
template = await TemplatesService(templates_repo).get_template(template_id)
data = json.dumps(template)
template_etag = '"' + hashlib.md5(data.encode()).hexdigest() + '"'
if template_etag == request_etag:
raise HTTPException(status_code=status.HTTP_304_NOT_MODIFIED)
else:
response.headers["ETag"] = template_etag
return template
@router.put(
"/{template_id}",
response_model=schemas.Template,
response_model_exclude_unset=True,
dependencies=[Depends(has_privilege("Template.Modify"))]
)
async def update_template(
template_id: UUID,
template_update: schemas.TemplateUpdate,
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
) -> schemas.Template:
"""
Update a template.
Required privilege: Template.Modify
"""
return await TemplatesService(templates_repo).update_template(template_id, template_update)
@router.delete(
"/{template_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("Template.Allocate"))]
)
async def delete_template(
template_id: UUID,
prune_images: Optional[bool] = False,
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
images_repo: RbacRepository = Depends(get_repository(ImagesRepository)),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a template.
Required privilege: Template.Allocate
"""
await TemplatesService(templates_repo).delete_template(template_id)
await rbac_repo.delete_all_ace_starting_with_path(f"/templates/{template_id}")
if prune_images:
await images_repo.prune_images()
@router.get(
"",
response_model=List[schemas.Template],
response_model_exclude_unset=True,
dependencies=[Depends(get_current_active_user)],
#dependencies=[Depends(has_privilege("Template.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
)
async def get_templates(
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
current_user: schemas.User = Depends(get_current_active_user),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> List[schemas.Template]:
"""
Return all templates.
Required privilege: Template.Audit
"""
templates = await TemplatesService(templates_repo).get_templates()
if current_user.is_superadmin:
return templates
else:
user_templates = []
for template in templates:
# if template.get("builtin") is True:
# user_templates.append(template)
# continue
# template_id = template.get("template_id")
# authorized = await rbac_repo.check_user_is_authorized(
# current_user.user_id, "GET", f"/templates/{template_id}")
# if authorized:
user_templates.append(template)
return user_templates
@router.post(
"/{template_id}/duplicate",
response_model=schemas.Template,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("Template.Allocate"))]
)
async def duplicate_template(
template_id: UUID, templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository))
) -> schemas.Template:
"""
Duplicate a template.
Required privilege: Template.Allocate
"""
template = await TemplatesService(templates_repo).duplicate_template(template_id)
return template

View File

@ -0,0 +1,254 @@
#!/usr/bin/env python
#
# Copyright (C) 2023 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
API routes for users.
"""
from fastapi import APIRouter, Depends, HTTPException, Response, status
from fastapi.security import OAuth2PasswordRequestForm
from uuid import UUID
from typing import List
from gns3server import schemas
from gns3server.controller.controller_error import (
ControllerError,
ControllerBadRequestError,
ControllerNotFoundError,
ControllerForbiddenError,
)
from gns3server.db.repositories.users import UsersRepository
from gns3server.db.repositories.rbac import RbacRepository
from gns3server.services import auth_service
from .dependencies.authentication import get_current_active_user
from .dependencies.database import get_repository
from .dependencies.rbac import has_privilege
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@router.post("/login", response_model=schemas.Token)
async def login(
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
form_data: OAuth2PasswordRequestForm = Depends(),
) -> schemas.Token:
"""
Default user login method using forms (x-www-form-urlencoded).
Example: curl -X POST http://host:port/v3/access/users/login -H "Content-Type: application/x-www-form-urlencoded" -d "username=admin&password=admin"
"""
user = await users_repo.authenticate_user(username=form_data.username, password=form_data.password)
if not user:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Authentication was unsuccessful.",
headers={"WWW-Authenticate": "Bearer"},
)
token = schemas.Token(access_token=auth_service.create_access_token(user.username), token_type="bearer")
return token
@router.post("/authenticate", response_model=schemas.Token)
async def authenticate(
user_credentials: schemas.Credentials,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> schemas.Token:
"""
Alternative authentication method using json.
Example: curl -X POST http://host:port/v3/access/users/authenticate -d '{"username": "admin", "password": "admin"}' -H "Content-Type: application/json"
"""
user = await users_repo.authenticate_user(username=user_credentials.username, password=user_credentials.password)
if not user:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Authentication was unsuccessful.",
headers={"WWW-Authenticate": "Bearer"},
)
token = schemas.Token(access_token=auth_service.create_access_token(user.username), token_type="bearer")
return token
@router.get("/me", response_model=schemas.User)
async def get_logged_in_user(current_user: schemas.User = Depends(get_current_active_user)) -> schemas.User:
"""
Get the current active user.
"""
return current_user
@router.put("/me", response_model=schemas.User)
async def update_logged_in_user(
user_update: schemas.LoggedInUserUpdate,
current_user: schemas.User = Depends(get_current_active_user),
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.User:
"""
Update the current active user.
"""
if user_update.email and await users_repo.get_user_by_email(user_update.email):
raise ControllerBadRequestError(f"Email '{user_update.email}' is already registered")
return await users_repo.update_user(current_user.user_id, user_update)
@router.get(
"",
response_model=List[schemas.User],
dependencies=[Depends(has_privilege("User.Audit"))]
)
async def get_users(
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.User]:
"""
Get all users.
Required privilege: User.Audit
"""
return await users_repo.get_users()
@router.post(
"",
response_model=schemas.User,
status_code=status.HTTP_201_CREATED,
dependencies=[Depends(has_privilege("User.Allocate"))]
)
async def create_user(
user_create: schemas.UserCreate,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.User:
"""
Create a new user.
Required privilege: User.Allocate
"""
if await users_repo.get_user_by_username(user_create.username):
raise ControllerBadRequestError(f"Username '{user_create.username}' is already registered")
if user_create.email and await users_repo.get_user_by_email(user_create.email):
raise ControllerBadRequestError(f"Email '{user_create.email}' is already registered")
return await users_repo.create_user(user_create)
@router.get(
"/{user_id}",
response_model=schemas.User,
dependencies=[Depends(has_privilege("User.Audit"))]
)
async def get_user(
user_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
) -> schemas.User:
"""
Get a user.
Required privilege: User.Audit
"""
user = await users_repo.get_user(user_id)
if not user:
raise ControllerNotFoundError(f"User '{user_id}' not found")
return user
@router.put(
"/{user_id}",
response_model=schemas.User,
dependencies=[Depends(has_privilege("User.Modify"))]
)
async def update_user(
user_id: UUID,
user_update: schemas.UserUpdate,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> schemas.User:
"""
Update a user.
Required privilege: User.Modify
"""
if user_update.username and await users_repo.get_user_by_username(user_update.username):
raise ControllerBadRequestError(f"Username '{user_update.username}' is already registered")
if user_update.email and await users_repo.get_user_by_email(user_update.email):
raise ControllerBadRequestError(f"Email '{user_update.email}' is already registered")
user = await users_repo.update_user(user_id, user_update)
if not user:
raise ControllerNotFoundError(f"User '{user_id}' not found")
return user
@router.delete(
"/{user_id}",
status_code=status.HTTP_204_NO_CONTENT,
dependencies=[Depends(has_privilege("User.Allocate"))]
)
async def delete_user(
user_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository)),
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
) -> None:
"""
Delete a user.
Required privilege: User.Allocate
"""
user = await users_repo.get_user(user_id)
if not user:
raise ControllerNotFoundError(f"User '{user_id}' not found")
if user.is_superadmin:
raise ControllerForbiddenError("The super admin cannot be deleted")
success = await users_repo.delete_user(user_id)
if not success:
raise ControllerError(f"User '{user_id}' could not be deleted")
await rbac_repo.delete_all_ace_starting_with_path(f"/users/{user_id}")
@router.get(
"/{user_id}/groups",
response_model=List[schemas.UserGroup],
dependencies=[Depends(has_privilege("Group.Audit"))]
)
async def get_user_memberships(
user_id: UUID,
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
) -> List[schemas.UserGroup]:
"""
Get user memberships.
Required privilege: Group.Audit
"""
return await users_repo.get_user_memberships(user_id)

View File

@ -0,0 +1,93 @@
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from fastapi import APIRouter, Request, HTTPException, status
from fastapi.responses import RedirectResponse, HTMLResponse, FileResponse
from fastapi.templating import Jinja2Templates
from gns3server.version import __version__
from gns3server.utils.get_resource import get_resource
router = APIRouter()
templates = Jinja2Templates(directory=os.path.join("gns3server", "templates"))
@router.get("/")
async def root():
return RedirectResponse("/static/web-ui/bundled", status_code=308) # permanent redirect
@router.get("/debug", response_class=HTMLResponse, deprecated=True)
def debug(request: Request):
kwargs = {"request": request, "gns3_version": __version__, "gns3_host": request.client.host}
return templates.TemplateResponse("index.html", kwargs)
@router.get("/static/web-ui/{file_path:path}", description="Web user interface")
async def web_ui(file_path: str):
file_path = os.path.normpath(file_path).strip("/")
file_path = os.path.join("static", "web-ui", file_path)
# Raise error if user try to escape
if file_path[0] == ".":
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
static = get_resource(file_path)
if static is None or not os.path.exists(static):
static = get_resource(os.path.join("static", "web-ui", "index.html"))
if static is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
# guesstype prefers to have text/html type than application/javascript
# which results with warnings in Firefox 66 on Windows
# Ref. gns3-server#1559
_, ext = os.path.splitext(static)
mimetype = ext == ".js" and "application/javascript" or None
return FileResponse(static, media_type=mimetype)
# class Version(BaseModel):
# version: str
# local: Optional[bool] = False
#
#
# @router.get("/v2/version",
# description="Retrieve the server version number",
# response_model=Version,
# )
# def version():
#
# config = Config.instance()
# local_server = config.get_section_config("Server").getboolean("local", False)
# return {"version": __version__, "local": local_server}
#
#
# @router.post("/v2/version",
# description="Check if version is the same as the server",
# response_model=Version,
# )
# def check_version(version: str):
#
# if version != __version__:
# raise HTTPException(status_code=409, detail="Client version {} is not the same as server version {}".format(version, __version__))
# return {"version": __version__}

189
gns3server/api/server.py Normal file
View File

@ -0,0 +1,189 @@
#!/usr/bin/env python
#
# Copyright (C) 2020 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
FastAPI app
"""
import time
from fastapi import FastAPI, Request, HTTPException, status
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse
from fastapi.exceptions import RequestValidationError
from sqlalchemy.exc import SQLAlchemyError
from uvicorn.main import Server as UvicornServer
from gns3server.controller.controller_error import (
ControllerError,
ControllerNotFoundError,
ControllerBadRequestError,
ControllerTimeoutError,
ControllerForbiddenError,
ControllerUnauthorizedError,
ComputeConflictError
)
from gns3server.api.routes import controller, index
from gns3server.api.routes.compute import compute_api
from gns3server.core import tasks
from gns3server.version import __version__
import logging
log = logging.getLogger(__name__)
def get_application() -> FastAPI:
application = FastAPI(
title="GNS3 controller API", description="This page describes the public controller API for GNS3", version="v3"
)
application.add_middleware(
CORSMiddleware,
allow_origin_regex=r"http(s)?://(localhost|127.0.0.1)(:\d+)?",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
application.add_event_handler("startup", tasks.create_startup_handler(application))
application.add_event_handler("shutdown", tasks.create_shutdown_handler(application))
application.include_router(index.router, tags=["Index"])
application.include_router(controller.router, prefix="/v3")
application.mount("/v3/compute", compute_api, name="compute")
return application
app = get_application()
# Monkey Patch uvicorn signal handler to detect the application is shutting down
app.state.exiting = False
unicorn_exit_handler = UvicornServer.handle_exit
def handle_exit(*args, **kwargs):
app.state.exiting = True
unicorn_exit_handler(*args, **kwargs)
UvicornServer.handle_exit = handle_exit
@app.exception_handler(ControllerError)
async def controller_error_handler(request: Request, exc: ControllerError):
log.error(f"Controller error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_409_CONFLICT,
content={"message": str(exc)},
)
@app.exception_handler(ControllerTimeoutError)
async def controller_timeout_error_handler(request: Request, exc: ControllerTimeoutError):
log.error(f"Controller timeout error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_408_REQUEST_TIMEOUT,
content={"message": str(exc)},
)
@app.exception_handler(ControllerUnauthorizedError)
async def controller_unauthorized_error_handler(request: Request, exc: ControllerUnauthorizedError):
log.error(f"Controller unauthorized error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_401_UNAUTHORIZED,
content={"message": str(exc)},
)
@app.exception_handler(ControllerForbiddenError)
async def controller_forbidden_error_handler(request: Request, exc: ControllerForbiddenError):
log.error(f"Controller forbidden error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_403_FORBIDDEN,
content={"message": str(exc)},
)
@app.exception_handler(ControllerNotFoundError)
async def controller_not_found_error_handler(request: Request, exc: ControllerNotFoundError):
log.error(f"Controller not found error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_404_NOT_FOUND,
content={"message": str(exc)},
)
@app.exception_handler(ControllerBadRequestError)
async def controller_bad_request_error_handler(request: Request, exc: ControllerBadRequestError):
log.error(f"Controller bad request error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_400_BAD_REQUEST,
content={"message": str(exc)},
)
@app.exception_handler(ComputeConflictError)
async def compute_conflict_error_handler(request: Request, exc: ComputeConflictError):
log.error(f"Controller received error from compute for request '{exc.url()}': {exc}")
return JSONResponse(
status_code=status.HTTP_409_CONFLICT,
content={"message": str(exc)},
)
# make sure the content key is "message", not "detail" per default
@app.exception_handler(HTTPException)
async def http_exception_handler(request: Request, exc: HTTPException):
return JSONResponse(
status_code=exc.status_code,
content={"message": exc.detail},
headers=exc.headers
)
@app.exception_handler(SQLAlchemyError)
async def sqlalchemry_error_handler(request: Request, exc: SQLAlchemyError):
log.error(f"Controller database error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
content={"message": "Database error detected, please check logs to find details"},
)
@app.exception_handler(RequestValidationError)
async def validation_exception_handler(request: Request, exc: RequestValidationError):
log.error(f"Request validation error in {request.url.path} ({request.method}): {exc}")
return JSONResponse(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
content={"message": str(exc)}
)
# FIXME: do not use this middleware since it creates issue when using StreamingResponse
# see https://starlette-context.readthedocs.io/en/latest/middleware.html#why-are-there-two-middlewares-that-do-the-same-thing
# @app.middleware("http")
# async def add_extra_headers(request: Request, call_next):
# start_time = time.time()
# response = await call_next(request)
# process_time = time.time() - start_time
# response.headers["X-Process-Time"] = str(process_time)
# response.headers["X-GNS3-Server-Version"] = f"{__version__}"
# return response

View File

@ -0,0 +1,47 @@
{
"appliance_id": "bf0a4dd0-9e1f-491e-918a-1d1ac0e23161",
"name": "6WIND Turbo Router",
"category": "router",
"description": "6WIND Turbo Router is a high performance, ready-to-use software virtual router. It can be deployed bare metal or in virtual machines on commercial-off-the-shelf (COTS) servers. It is a carrier-grade solution for Service Prodivers aiming at using white boxes to deploy network functions. Typical use-cases are transit/peering router, IPsec VPN gateway and CGNAT.",
"vendor_name": "6WIND",
"vendor_url": "https://www.6wind.com/",
"documentation_url": "https://doc.6wind.com/turbo-router-3/latest/turbo-router/",
"product_name": "6WIND Turbo Router",
"product_url": "https://www.6wind.com/vrouter-solutions/turbo-router/",
"registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Default username / password is admin / admin.",
"symbol": "6wind.svg",
"port_name_format": "eth{0}",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 8,
"ram": 4096,
"cpus": 4,
"hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
"boot_priority": "c",
"kvm": "require",
"options": "-cpu host"
},
"images": [
{
"filename": "6wind-vrouter-tr-ae-x86_64-v3.1.4.m1.qcow2",
"version": "3.1.4.m1",
"md5sum": "bc84b81fba4f2f01eda6a338469e37a5",
"filesize": 693829632,
"download_url": "https://portal.6wind.com/register.php?utm_campaign=GNS3-2021-EVAL"
}
],
"versions": [
{
"name": "3.1.4.m1",
"images": {
"hda_disk_image": "6wind-vrouter-tr-ae-x86_64-v3.1.4.m1.qcow2"
}
}
]
}

View File

@ -0,0 +1,52 @@
{
"appliance_id": "c30ea423-b6f8-443e-b599-955ea5647ef0",
"name": "IP Cop",
"category": "firewall",
"description": "The IPCop Firewall is a Linux firewall distribution. It is geared towards home and SOHO users. The IPCop web-interface is very user-friendly and makes usage easy.",
"vendor_name": "IP Cop",
"vendor_url": "https://www.kali.org/",
"documentation_url": "http://www.ipcop.org/docs.html",
"product_name": "IP Cop",
"registry_version": 4,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
"usage": "",
"symbol": "shieldedtux.png",
"port_name_format": "eth{0}",
"qemu": {
"adapter_type": "e1000",
"adapters": 3,
"ram": 1024,
"arch": "x86_64",
"console_type": "vnc",
"kvm": "require"
},
"images": [
{
"filename": "ipcop-2.1.8-install-cd.i486.iso",
"version": "2.1.9",
"md5sum": "1394a7bd4e5c6fe8db70007278826101",
"filesize": 65011712,
"download_url": "http://www.ipcop.org/download.html",
"direct_download_url": "https://sourceforge.net/projects/ipcop/files/IPCop/IPCop%202.1.8/ipcop-2.1.8-install-cd.i486.iso"
},
{
"filename": "empty8G.qcow2",
"version": "1.0",
"md5sum": "f1d2c25b6990f99bd05b433ab603bdb4",
"filesize": 197120,
"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/empty8G.qcow2/download"
}
],
"versions": [
{
"name": "2.1.9",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "ipcop-2.1.8-install-cd.i486.iso"
}
}
]
}

View File

@ -0,0 +1,72 @@
{
"appliance_id": "7aa41b5b-3ae9-40a7-be38-5c109c59e086",
"name": "A10 vThunder",
"category": "router",
"description": "vThunder, part of A10 Networks' award-winning A10 Thunder and AX Series Application Delivery Controller (ADC) family, is designed to meet the growing needs of organizations that require a flexible and easy-to-deploy application delivery and server load balancer solution running within a virtualized infrastructure.",
"vendor_name": "A10",
"vendor_url": "https://www.a10networks.com/",
"documentation_url": "https://www.a10networks.com/support",
"product_name": "A10 vThunder",
"product_url": "https://www.a10networks.com/products/vthunder-trial/",
"registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Default credentials:\n- CLI: admin / a10.\n- Enable mode: <none>\n\nDefault management IP: 172.31.31.31/24",
"symbol": "loadbalancer.svg",
"first_port_name": "mgmt",
"port_name_format": "ethernet {port1}",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 4,
"ram": 4096,
"hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
"boot_priority": "cd",
"kvm": "require"
},
"images": [
{
"filename": "vThunder_410_P9.qcow2",
"version": "4.1.0.P9",
"md5sum": "6ef0f69ba7a099a7f43b5815c2abc691",
"filesize": 6311706624,
"download_url": "https://www.a10networks.com/vthunder-embed"
},
{
"filename": "vThunder_410_P3.qcow2",
"version": "4.1.0.P3",
"md5sum": "daacefa4e0eb1cad9b253926624be4b9",
"filesize": 6098780160,
"download_url": "https://www.a10networks.com/vthunder-embed"
},
{
"filename": "vth401.GA.12G_Disk.qcow2",
"version": "4.0.1",
"md5sum": "311806ad414403359216da6119ddb823",
"filesize": 4768464896,
"download_url": "https://www.a10networks.com/vthunder-embed"
}
],
"versions": [
{
"name": "4.1.0.P9",
"images": {
"hda_disk_image": "vThunder_410_P9.qcow2"
}
},
{
"name": "4.1.0.P3",
"images": {
"hda_disk_image": "vThunder_410_P3.qcow2"
}
},
{
"name": "4.0.1",
"images": {
"hda_disk_image": "vth401.GA.12G_Disk.qcow2"
}
}
]
}

View File

@ -0,0 +1,20 @@
{
"appliance_id": "99920801-829d-4689-8231-7183c21ff878",
"name": "AAA",
"category": "guest",
"description": "This appliance provides RADIUS and TACACS+ services with preconfigured users and groups.",
"vendor_name": "Ubuntu",
"vendor_url": "https://www.ubuntu.com/",
"product_name": "AAA",
"registry_version": 4,
"status": "stable",
"maintainer": "Andras Dosztal",
"maintainer_email": "developers@gns3.net",
"usage": "RADIUS users:\n- alice\n- bob\n\nTACACS+ users:\n- gns3 (role: admin)\n- readonly\n\nAll users, as well as the RADIUS/TACACS+ clients have the password 'gns3' set.",
"symbol": "linux_guest.svg",
"docker": {
"adapters": 1,
"image": "adosztal/aaa:latest",
"console_type": "telnet"
}
}

View File

@ -0,0 +1,74 @@
{
"appliance_id": "4d06be08-ce6d-4ee7-b5a7-79729fa75489",
"name": "Alcatel 7750",
"category": "router",
"description": "The Alcatel-Lucent 7750 Service Router (SR) portfolio is a suite of multiservice edge routing platforms that deliver high performance, service richness, and creates exceptional value for networking in the cloud era. It is designed for the concurrent delivery of advanced residential, business and wireless broadband IP services, and provides cloud, data center and branch office connectivity for enterprise networking on a common IP edge routing platform.",
"vendor_name": "Alcatel",
"vendor_url": "https://www.alcatel-lucent.com/",
"documentation_url": "https://www.alcatel-lucent.com/support",
"product_name": "Alcatel 7750",
"product_url": "https://www.alcatel-lucent.com/products/7750-service-router",
"registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Login is admin and password is admin",
"first_port_name": "A/1",
"port_name_format": "1/1/{port1}",
"qemu": {
"adapter_type": "e1000",
"adapters": 6,
"ram": 2048,
"hda_disk_interface": "ide",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "require",
"options": ""
},
"images": [
{
"filename": "TiMOS-SR-13.0.R4-vm.qcow2",
"version": "13.0.R4",
"md5sum": "d7a3609e506acdcb55f6db5328dba8ed",
"filesize": 368508928,
"download_url": "https://www.alcatel-lucent.com/support",
"compression": "zip"
},
{
"filename": "TiMOS-SR-12.0.R6-vm.qcow2",
"version": "12.0.R6",
"md5sum": "7d84d97a5664af2e3546bfa832fc1848",
"filesize": 221511680,
"download_url": "https://www.alcatel-lucent.com/support",
"compression": "zip"
},
{
"filename": "TiMOS-SR-12.0.R18.qcow2",
"version": "12.0.R18",
"md5sum": "d0bba5feaaf09fd02185f25898a6afc7",
"filesize": 223870976,
"download_url": "https://www.alcatel-lucent.com/support",
"compression": "zip"
}
],
"versions": [
{
"name": "13.0.R4",
"images": {
"hda_disk_image": "TiMOS-SR-13.0.R4-vm.qcow2"
}
},
{
"name": "12.0.R6",
"images": {
"hda_disk_image": "TiMOS-SR-12.0.R6-vm.qcow2"
}
},
{
"name": "12.0.R18",
"images": {
"hda_disk_image": "TiMOS-SR-12.0.R18.qcow2"
}
}
]
}

View File

@ -0,0 +1,84 @@
{
"appliance_id": "5c09a704-0e38-48ac-8392-52e0c5890cf3",
"name": "AlmaLinux",
"category": "guest",
"description": "An Open Source, community-governed and forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is 1:1 binary compatible with RHEL and pre-Stream CentOS.",
"vendor_name": "Alma Linux",
"vendor_url": "https://almalinux.org/",
"documentation_url": "https://wiki.almalinux.org/",
"product_name": "Alma Linux",
"product_url": "https://almalinux.org/",
"registry_version": 4,
"status": "stable",
"maintainer": "Da-Geek",
"maintainer_email": "dageek@dageeks-geeks.gg",
"usage": "Username:\talmalinux\nPassword:\talmalinux\nTo become root, use \"sudo -i\".\n",
"port_name_format": "eth{0}",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 1,
"ram": 1536,
"hda_disk_interface": "sata",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "allow",
"options": "-cpu host -nographic"
},
"images": [
{
"filename": "AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2",
"version": "9.2",
"md5sum": "c5bc76e8c95ac9f810a3482c80a54cc7",
"filesize": 563347456,
"download_url": "https://vault.almalinux.org/9.2/cloud/x86_64/images/",
"direct_download_url": "https://vault.almalinux.org/9.2/cloud/x86_64/images/AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2"
},
{
"filename": "AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2",
"version": "8.8",
"md5sum": "3958c5fc25770ef63cf97aa5d93f0a0b",
"filesize": 565444608,
"download_url": "https://vault.almalinux.org/8.8/cloud/x86_64/images/",
"direct_download_url": "https://vault.almalinux.org/8.8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2"
},
{
"filename": "AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2",
"version": "8.7",
"md5sum": "b2b8c7fd3b6869362f3f8ed47549c804",
"filesize": 566231040,
"download_url": "https://vault.almalinux.org/8.7/cloud/x86_64/images/",
"direct_download_url": "https://vault.almalinux.org/8.7/cloud/x86_64/images/AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2"
},
{
"filename": "almalinux-cloud-init-data.iso",
"version": "1.0",
"md5sum": "72fb52af76e9561d125dd99224e2c1d1",
"filesize": 374784,
"download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/AlmaLinux",
"direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/AlmaLinux/almalinux-cloud-init-data.iso"
}
],
"versions": [
{
"name": "9.2",
"images": {
"hda_disk_image": "AlmaLinux-9-GenericCloud-9.2-20230513.x86_64.qcow2",
"cdrom_image": "almalinux-cloud-init-data.iso"
}
},
{
"name": "8.8",
"images": {
"hda_disk_image": "AlmaLinux-8-GenericCloud-8.8-20230524.x86_64.qcow2",
"cdrom_image": "almalinux-cloud-init-data.iso"
}
},
{
"name": "8.7",
"images": {
"hda_disk_image": "AlmaLinux-8-GenericCloud-8.7-20221111.x86_64.qcow2",
"cdrom_image": "almalinux-cloud-init-data.iso"
}
}
]
}

View File

@ -0,0 +1,59 @@
{
"appliance_id": "3da5c614-772c-4963-af86-f24e058c9216",
"name": "Alpine Linux Virt",
"category": "guest",
"description": "Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.\n\nThis is the qemu version of Alpine Linux, stripped down to the maximum, only the default packages are installed without an SSH server.",
"vendor_name": "Alpine Linux Development Team",
"vendor_url": "http://alpinelinux.org",
"documentation_url": "http://wiki.alpinelinux.org",
"product_name": "Alpine Linux Virt",
"registry_version": 4,
"status": "stable",
"availability": "free",
"maintainer": "Adnan RIHAN",
"maintainer_email": "adnan@rihan.fr",
"usage": "Autologin is enabled as \"root\" with no password.\n\nThe network interfaces aren't configured, you can do either of the following:\n- Use alpine's DHCP client: `udhcpc`\n- Configure them manually (ip address add \u2026, ip route add \u2026)\n- Modify interfaces file in /etc/network/interfaces\n- Use alpine's wizard: `setup-interfaces`",
"symbol": "alpine-virt-qemu.svg",
"port_name_format": "eth{0}",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 1,
"ram": 128,
"hda_disk_interface": "virtio",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "allow"
},
"images": [
{
"filename": "alpine-virt-3.18.4.qcow2",
"version": "3.18.4",
"md5sum": "99d393c16c870e12c4215aadd82ca998",
"filesize": 51066880,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/alpine-virt-3.18.4.qcow2/download"
},
{
"filename": "alpine-virt-3.16.img",
"version": "3.16",
"md5sum": "ce90ff64b8f8e5860c49ea4a038e54cc",
"filesize": 96468992,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/alpine-virt-3.16.img/download"
}
],
"versions": [
{
"name": "3.18.4",
"images": {
"hda_disk_image": "alpine-virt-3.18.4.qcow2"
}
},
{
"name": "3.16",
"images": {
"hda_disk_image": "alpine-virt-3.16.img"
}
}
]
}

View File

@ -0,0 +1,21 @@
{
"appliance_id": "fc520ae2-a4e5-48c3-9a13-516bb2e94668",
"name": "Alpine Linux",
"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",
"registry_version": 4,
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"symbol": "linux_guest.svg",
"docker": {
"adapters": 1,
"image": "alpine",
"console_type": "telnet"
}
}

View File

@ -0,0 +1,20 @@
{
"appliance_id": "a7eec173-9680-4c1f-bf79-1bf29d485375",
"name": "cEOS",
"category": "multilayer_switch",
"description": "Arista cEOS\u2122 introduces the containerized packaging of EOS software and its agents for deployment in cloud infrastructure with the same proven EOS software image that runs on all Arista products. These flexible deployment options empower cloud network operators that are customizing their operating environments to provide a uniform workflow for development, testing and deployment of differentiated services.",
"vendor_name": "Arista",
"vendor_url": "http://www.arista.com/",
"product_name": "cEOS",
"registry_version": 4,
"status": "experimental",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Download:\nCreate a (free) Arista account and login.\nThen navigate to Support / Software Download and download the cEOS-lab image.\n\nInstallation:\nCopy the image to your GNS3VM (or other Linux) server, then run the following commands:\n\ncEOS-4.21.0F and newer, replace <version> by the cEOS version:\ndocker import cEOS-lab.tar.xz ceosimage:<version>\necho \"rm /etc/systemd/system/getty.target.wants/getty@tty1.service\" | \\\ndocker run --name=ceos-container -e CEOS=1 -e container=docker -e EOS_PLATFORM=ceoslab -e SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 -e ETBA=1 -e INTFTYPE=eth -i ceosimage:<version> sh\ndocker commit --change='CMD [\"/sbin/init\"]' --change='VOLUME /mnt/flash' ceos-container ceosimage:GNS3\ndocker rm ceos-container\n\ncEOS-4.20.5F:\ndocker import cEOS-lab.tar.xz ceosimage:4.20.5F\necho \"rm /etc/systemd/system/getty.target.wants/getty@tty1.service\" | \\\ndocker run --name=ceos-container -e CEOS=1 -e container=docker -e EOS_PLATFORM=ceossim -e SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 -e ETBA=1 -e INTFTYPE=eth -i ceosimage:4.20.5F sh\ndocker commit --change='CMD [\"/sbin/init\"]' --change='VOLUME /mnt/flash' ceos-container ceosimage:GNS3\ndocker rm ceos-container\n\nUsage:\nStart an auxiliary console on the cEOS and issue the \"Cli\" command.\nOnly cEOS-4.20.5F: Login on the console with username \"admin\".",
"symbol": ":/symbols/multilayer_switch.svg",
"docker": {
"adapters": 8,
"image": "ceosimage:GNS3",
"console_type": "telnet"
}
}

View File

@ -0,0 +1,577 @@
{
"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.",
"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",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "The login is admin, with no password by default",
"symbol": ":/symbols/multilayer_switch.svg",
"first_port_name": "Management1",
"port_name_format": "Ethernet{port1}",
"qemu": {
"adapter_type": "e1000",
"adapters": 13,
"ram": 2048,
"hda_disk_interface": "ide",
"hdb_disk_interface": "ide",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "require",
"options": "-cpu host"
},
"images": [
{
"filename": "vEOS64-lab-4.32.0F.vmdk",
"version": "4.32.0F",
"md5sum": "851771260bb18ad3e90fa6956f0c6161",
"filesize": 591724544,
"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,
"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,
"download_url": "https://www.arista.com/en/support/software-download"
},
{
"filename": "Aboot-veos-serial-8.0.2.iso",
"version": "8.0.2",
"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",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.32.0F.vmdk"
}
},
{
"name": "4.31.3M",
"images": {
"hda_disk_image": "Aboot-veos-serial-8.0.2.iso",
"hdb_disk_image": "vEOS64-lab-4.31.3M.vmdk"
}
},
{
"name": "4.30.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"
}
}
]
}

View File

@ -0,0 +1,233 @@
{
"appliance_id": "8f074218-9d61-4e99-ab89-35ca19ad44ee",
"name": "ArubaOS-CX Simulation Software",
"category": "multilayer_switch",
"description": "The Aruba AOS-CX Switch Simulator is a virtual platform to enable simulation of the Aruba AOS-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": "https://www.arubanetworks.com",
"documentation_url": "https://asp.arubanetworks.com/downloads;search=Aruba%20AOS%20CX%20Switch%20Simulator;products=Aruba%20Switches",
"product_name": "Aruba AOS-CX Switch Simulator",
"product_url": "https://www.arubanetworks.com/products/switches/",
"registry_version": 4,
"status": "stable",
"availability": "service-contract",
"maintainer": "Aruba",
"maintainer_email": "vincent.giles@hpe.com",
"usage": "Default username: admin, no password. New Password has to be set at first login.",
"symbol": ":/symbols/route_switch_processor.svg",
"first_port_name": "mgmt",
"port_name_format": "1/1/{port1}",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 8,
"ram": 4096,
"cpus": 2,
"hda_disk_interface": "ide",
"hdb_disk_interface": "ide",
"hdc_disk_interface": "ide",
"arch": "x86_64",
"console_type": "telnet",
"kvm": "require",
"options": "-nographic",
"process_priority": "normal"
},
"images": [
{
"filename": "arubaoscx-disk-image-genericx86-p4-20240129204649.vmdk",
"version": "10.13.1000",
"md5sum": "a1a24b15e3b8a09b0c0f14bdfacc4a75",
"filesize": 395342848,
"download_url": "https://networkingsupport.hpe.com"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20231110145644.vmdk",
"version": "10.13.0005",
"md5sum": "427fd4580e2ee3eac55a9e7d629d1375",
"filesize": 394995200,
"download_url": "https://networkingsupport.hpe.com"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20230810165021.vmdk",
"version": "10.12.1000",
"md5sum": "ea89f94dda9d28bf583dc35e0299b106",
"filesize": 384622080,
"download_url": "https://networkingsupport.hpe.com"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20230531220439.vmdk",
"version": "10.12.0006",
"md5sum": "c4f80fecd02ef93b431b75dd610e0063",
"filesize": 384638464,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20221130174651.vmdk",
"version": "10.11.0001",
"md5sum": "ed5434173c898f47f19bfda51000611a",
"filesize": 364597760,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20220815162137.vmdk",
"version": "10.10.1000",
"md5sum": "40f9ddf1e12640376af443b5d982f2f6",
"filesize": 356162560,
"download_url": "https://asp.arubanetworks.com/"
},
{
"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",
"md5sum": "7b47c4442d825562e73e3f09b2f1f999",
"filesize": 556828672,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20211206170615.vmdk",
"version": "10.09.0002",
"md5sum": "3c772546482013495e31fc9cb0591b46",
"filesize": 555656704,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20210812172945.vmdk",
"version": "10.08.0001",
"md5sum": "762b139432aef1012d8be5afdfcb286e",
"filesize": 542237696,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20210610000730.vmdk",
"version": "10.07.0010",
"md5sum": "396dc7ad964b7c517e01bc408e3bf84a",
"filesize": 531603968,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20210316185909.vmdk",
"version": "10.06.0110",
"md5sum": "f1ed67d5c7e009e21bfb6a91d9183e8e",
"filesize": 381285376,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20201110192651.vmdk",
"version": "10.06.0001",
"md5sum": "f8b45bc52f6bad79b5ff563e0c1ea73b",
"filesize": 380304896,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20200311173823.vmdk",
"version": "10.04.1000",
"md5sum": "4e000d73c3593dfed6c49259c31401ea",
"filesize": 356249088,
"download_url": "https://asp.arubanetworks.com/"
},
{
"filename": "arubaoscx-disk-image-genericx86-p4-20180712161119.vmdk",
"version": "10.01.0001",
"md5sum": "9146ae0ac650d8206c9600e03753f022",
"filesize": 287734784,
"download_url": "http://support.arubanetworks.com/"
}
],
"versions": [
{
"name": "10.13.1000",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20240129204649.vmdk"
}
},
{
"name": "10.13.0005",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20231110145644.vmdk"
}
},
{
"name": "10.12.1000",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20230810165021.vmdk"
}
},
{
"name": "10.12.0006",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20230531220439.vmdk"
}
},
{
"name": "10.11.0001",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20221130174651.vmdk"
}
},
{
"name": "10.10.1000",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20220815162137.vmdk"
}
},
{
"name": "10.10.0002",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20220616193419.vmdk"
}
},
{
"name": "10.09.1000",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20220223012712.vmdk"
}
},
{
"name": "10.09.0002",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20211206170615.vmdk"
}
},
{
"name": "10.08.0001",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20210812172945.vmdk"
}
},
{
"name": "10.07.0010",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20210610000730.vmdk"
}
},
{
"name": "10.06.0110",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20210316185909.vmdk"
}
},
{
"name": "10.06.0001",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20201110192651.vmdk"
}
},
{
"name": "10.04.1000",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20200311173823.vmdk"
}
},
{
"name": "10.01.0001",
"images": {
"hda_disk_image": "arubaoscx-disk-image-genericx86-p4-20180712161119.vmdk"
}
}
]
}

Some files were not shown because too many files have changed in this diff Show More