gns3-server 3.0.0b3__py3-none-any.whl → 3.0.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gns3-server might be problematic. Click here for more details.
- {gns3_server-3.0.0b3.dist-info → gns3_server-3.0.0rc2.dist-info}/METADATA +32 -31
- {gns3_server-3.0.0b3.dist-info → gns3_server-3.0.0rc2.dist-info}/RECORD +93 -89
- {gns3_server-3.0.0b3.dist-info → gns3_server-3.0.0rc2.dist-info}/WHEEL +1 -1
- gns3server/api/routes/compute/cloud_nodes.py +1 -1
- gns3server/api/routes/compute/docker_nodes.py +3 -0
- gns3server/api/routes/compute/nat_nodes.py +1 -1
- gns3server/api/routes/compute/vmware_nodes.py +1 -1
- gns3server/api/routes/compute/vpcs_nodes.py +10 -4
- gns3server/api/routes/controller/projects.py +13 -1
- gns3server/api/routes/controller/users.py +2 -2
- gns3server/appliances/almalinux.gns3a +6 -6
- gns3server/appliances/aruba-arubaoscx.gns3a +39 -0
- gns3server/appliances/cisco-csr1000v.gns3a +28 -2
- gns3server/appliances/cisco-iou-l2.gns3a +2 -2
- gns3server/appliances/cisco-iou-l3.gns3a +2 -2
- gns3server/appliances/cisco-vWLC.gns3a +29 -1
- gns3server/appliances/debian.gns3a +28 -0
- gns3server/appliances/fortiadc.gns3a +46 -4
- gns3server/appliances/fortianalyzer.gns3a +42 -0
- gns3server/appliances/fortiauthenticator.gns3a +58 -2
- gns3server/appliances/fortigate.gns3a +42 -0
- gns3server/appliances/fortimanager.gns3a +42 -0
- gns3server/appliances/fortiweb.gns3a +56 -0
- gns3server/appliances/hbcd-pe.gns3a +62 -0
- gns3server/appliances/juniper-junos-space.gns3a +3 -2
- gns3server/appliances/juniper-vmx-legacy.gns3a +1 -1
- gns3server/appliances/juniper-vmx-vcp.gns3a +1 -1
- gns3server/appliances/juniper-vmx-vfp.gns3a +2 -1
- gns3server/appliances/juniper-vqfx-pfe.gns3a +1 -1
- gns3server/appliances/juniper-vqfx-re.gns3a +2 -1
- gns3server/appliances/juniper-vrr.gns3a +1 -1
- gns3server/appliances/juniper-vsrx.gns3a +2 -1
- gns3server/appliances/mikrotik-chr.gns3a +30 -99
- gns3server/appliances/nixos.gns3a +52 -0
- gns3server/appliances/opnsense.gns3a +13 -0
- gns3server/appliances/pan-vm-fw.gns3a +26 -0
- gns3server/appliances/reactos.gns3a +10 -10
- gns3server/appliances/security-onion.gns3a +27 -3
- gns3server/appliances/truenas.gns3a +104 -0
- gns3server/appliances/ubuntu-cloud.gns3a +35 -20
- gns3server/appliances/ubuntu-docker.gns3a +1 -1
- gns3server/appliances/ubuntu-gui.gns3a +13 -0
- gns3server/appliances/viptela-edge-genericx86-64.gns3a +28 -2
- gns3server/appliances/viptela-smart-genericx86-64.gns3a +27 -1
- gns3server/appliances/viptela-vmanage-genericx86-64.gns3a +32 -4
- gns3server/appliances/vyos.gns3a +95 -98
- gns3server/compute/base_node.py +1 -0
- gns3server/compute/docker/__init__.py +8 -2
- gns3server/compute/docker/docker_vm.py +56 -2
- gns3server/compute/docker/resources/init.sh +5 -2
- gns3server/compute/dynamips/__init__.py +0 -4
- gns3server/compute/dynamips/nodes/router.py +20 -0
- gns3server/compute/notification_manager.py +2 -2
- gns3server/compute/qemu/qemu_vm.py +26 -15
- gns3server/config_samples/gns3_server.conf +13 -3
- gns3server/configs/iou_l2_base_startup-config.txt +1 -1
- gns3server/configs/iou_l3_base_startup-config.txt +1 -1
- gns3server/controller/__init__.py +27 -13
- gns3server/controller/appliance_manager.py +9 -6
- gns3server/controller/export_project.py +27 -23
- gns3server/controller/import_project.py +24 -3
- gns3server/controller/node.py +8 -2
- gns3server/controller/notification.py +4 -4
- gns3server/controller/project.py +96 -8
- gns3server/controller/snapshot.py +3 -8
- gns3server/controller/symbols.py +1 -1
- gns3server/controller/topology.py +31 -2
- gns3server/crash_report.py +1 -1
- gns3server/db/models/templates.py +1 -0
- gns3server/db/tasks.py +1 -1
- gns3server/db_migrations/versions/9a5292aa4389_add_mac_address_field_in_docker_.py +27 -0
- gns3server/schemas/compute/docker_nodes.py +1 -0
- gns3server/schemas/compute/ethernet_switch_nodes.py +1 -1
- gns3server/schemas/config.py +3 -0
- gns3server/schemas/controller/templates/cloud_templates.py +2 -2
- gns3server/schemas/controller/templates/docker_templates.py +4 -3
- gns3server/schemas/controller/templates/dynamips_templates.py +5 -5
- gns3server/schemas/controller/templates/ethernet_hub_templates.py +1 -1
- gns3server/schemas/controller/templates/ethernet_switch_templates.py +2 -2
- gns3server/schemas/controller/templates/iou_templates.py +2 -2
- gns3server/schemas/controller/templates/qemu_templates.py +12 -12
- gns3server/schemas/controller/templates/virtualbox_templates.py +4 -5
- gns3server/schemas/controller/templates/vmware_templates.py +4 -4
- gns3server/schemas/controller/templates/vpcs_templates.py +2 -2
- gns3server/static/web-ui/index.html +3 -3
- gns3server/static/web-ui/{main.f3840f9b1c0240e6.js → main.ed82697b58d803e7.js} +1 -1
- gns3server/utils/__init__.py +32 -0
- gns3server/utils/asyncio/aiozipstream.py +15 -11
- gns3server/utils/hostname.py +53 -0
- gns3server/version.py +1 -1
- {gns3_server-3.0.0b3.dist-info → gns3_server-3.0.0rc2.dist-info}/LICENSE +0 -0
- {gns3_server-3.0.0b3.dist-info → gns3_server-3.0.0rc2.dist-info}/entry_points.txt +0 -0
- {gns3_server-3.0.0b3.dist-info → gns3_server-3.0.0rc2.dist-info}/top_level.txt +0 -0
gns3server/appliances/vyos.gns3a
CHANGED
|
@@ -1,181 +1,178 @@
|
|
|
1
1
|
{
|
|
2
2
|
"appliance_id": "f82b74c4-0f30-456f-a582-63daca528502",
|
|
3
|
-
"name": "VyOS",
|
|
3
|
+
"name": "VyOS Universal Router",
|
|
4
4
|
"category": "router",
|
|
5
|
-
"description": "VyOS is a
|
|
6
|
-
"vendor_name": "
|
|
7
|
-
"vendor_url": "https://vyos.
|
|
5
|
+
"description": "VyOS is an open-source network operating system that provides a comprehensive suite of features for routing, firewalling, and VPN functionality. VyOS offers a robust and flexible solution for both small-scale and large-scale network environments. It is designed to support enterprise-grade networking with the added benefits of community-driven development and continuous updates.\n\nThe VyOS Universal Router, when used in GNS3, brings the power and versatility of VyOS to network simulation and emulation. GNS3 users can deploy the VyOS Universal Router to create and test complex network topologies in a virtual environment. This appliance provides a rich set of features, including dynamic routing protocols, stateful firewall capabilities, various VPNs, as well as high availability configurations.\n\nThe seamless integration with GNS3 allows network engineers and architects to validate network designs, perform testing and troubleshooting, and enhance their skill sets in a controlled, risk-free environment.",
|
|
6
|
+
"vendor_name": "VyOS Inc.",
|
|
7
|
+
"vendor_url": "https://vyos.io/",
|
|
8
|
+
"vendor_logo_url": "https://raw.githubusercontent.com/GNS3/gns3-registry/master/vendor-logos/VyOS.png",
|
|
8
9
|
"documentation_url": "https://docs.vyos.io/",
|
|
9
|
-
"product_name": "VyOS",
|
|
10
|
-
"product_url": "https://vyos.
|
|
10
|
+
"product_name": "VyOS Universal Router",
|
|
11
|
+
"product_url": "https://vyos.io/vyos-universal-router",
|
|
11
12
|
"registry_version": 4,
|
|
12
13
|
"status": "stable",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"availability": "service-contract",
|
|
15
|
+
"maintainer": "VyOS Inc.",
|
|
16
|
+
"maintainer_email": "support@vyos.io",
|
|
17
|
+
"usage": "\nDefault credentials:\nUser: vyos\nPassword: vyos",
|
|
16
18
|
"symbol": "vyos.svg",
|
|
17
19
|
"port_name_format": "eth{0}",
|
|
18
20
|
"qemu": {
|
|
19
|
-
"adapter_type": "
|
|
20
|
-
"adapters":
|
|
21
|
-
"ram":
|
|
22
|
-
"
|
|
21
|
+
"adapter_type": "virtio-net-pci",
|
|
22
|
+
"adapters": 10,
|
|
23
|
+
"ram": 2048,
|
|
24
|
+
"cpus": 4,
|
|
25
|
+
"hda_disk_interface": "virtio",
|
|
23
26
|
"arch": "x86_64",
|
|
24
27
|
"console_type": "telnet",
|
|
25
|
-
"boot_priority": "
|
|
26
|
-
"kvm": "
|
|
28
|
+
"boot_priority": "c",
|
|
29
|
+
"kvm": "require",
|
|
30
|
+
"on_close": "shutdown_signal"
|
|
27
31
|
},
|
|
28
32
|
"images": [
|
|
29
33
|
{
|
|
30
|
-
"filename": "vyos-1.
|
|
34
|
+
"filename": "vyos-1.4.0-kvm-amd64.qcow2",
|
|
35
|
+
"version": "1.4.0",
|
|
36
|
+
"md5sum": "a130e446bc5bf87391981f183ee3694b",
|
|
37
|
+
"filesize": 468320256,
|
|
38
|
+
"download_url": "https://support.vyos.io/"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"filename": "vyos-1.3.7-qemu-amd64.qcow2",
|
|
42
|
+
"version": "1.3.7",
|
|
43
|
+
"md5sum": "f4663b1e2df115bfa5c7ec17584514d6",
|
|
44
|
+
"filesize": 359792640,
|
|
45
|
+
"download_url": "https://support.vyos.io/"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"filename": "vyos-1.3.2-10G-qemu.qcow2",
|
|
31
49
|
"version": "1.3.2",
|
|
32
|
-
"md5sum": "
|
|
33
|
-
"filesize":
|
|
34
|
-
"download_url": "https://support.vyos.io/
|
|
50
|
+
"md5sum": "68ad3fb530213189ac9ed496d5fe7897",
|
|
51
|
+
"filesize": 326893568,
|
|
52
|
+
"download_url": "https://support.vyos.io/"
|
|
35
53
|
},
|
|
36
54
|
{
|
|
37
|
-
"filename": "vyos-1.3.1-S1-
|
|
55
|
+
"filename": "vyos-1.3.1-S1-10G-qemu.qcow2",
|
|
38
56
|
"version": "1.3.1-S1",
|
|
39
|
-
"md5sum": "
|
|
40
|
-
"filesize":
|
|
41
|
-
"download_url": "https://support.vyos.io/
|
|
57
|
+
"md5sum": "d8ed9f82a983295b94b07f8e37c48ed0",
|
|
58
|
+
"filesize": 343801856,
|
|
59
|
+
"download_url": "https://support.vyos.io/"
|
|
42
60
|
},
|
|
43
61
|
{
|
|
44
|
-
"filename": "vyos-1.3.1-
|
|
62
|
+
"filename": "vyos-1.3.1-10G-qemu.qcow2",
|
|
45
63
|
"version": "1.3.1",
|
|
46
|
-
"md5sum": "
|
|
47
|
-
"filesize":
|
|
48
|
-
"download_url": "https://support.vyos.io/
|
|
64
|
+
"md5sum": "482367c833990fb2b9350e3708d33dc9",
|
|
65
|
+
"filesize": 342556672,
|
|
66
|
+
"download_url": "https://support.vyos.io/"
|
|
49
67
|
},
|
|
50
68
|
{
|
|
51
|
-
"filename": "vyos-1.3.0-
|
|
69
|
+
"filename": "vyos-1.3.0-10G-qemu.qcow2",
|
|
52
70
|
"version": "1.3.0",
|
|
53
|
-
"md5sum": "
|
|
54
|
-
"filesize":
|
|
55
|
-
"download_url": "https://support.vyos.io/
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"filename": "vyos-1.2.9-S1-amd64.iso",
|
|
59
|
-
"version": "1.2.9-S1",
|
|
60
|
-
"md5sum": "3fece6363f9766f862e26d292d0ed5a3",
|
|
61
|
-
"filesize": 430964736,
|
|
62
|
-
"download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-s1-generic-iso-image",
|
|
63
|
-
"direct_download_url": "https://legacy-lts-images.vyos.io/1.2.9-S1/vyos-1.2.9-S1-amd64.iso"
|
|
71
|
+
"md5sum": "086e95e992e9b4d014c5f154cd01a6e6",
|
|
72
|
+
"filesize": 330956800,
|
|
73
|
+
"download_url": "https://support.vyos.io/"
|
|
64
74
|
},
|
|
65
75
|
{
|
|
66
76
|
"filename": "vyos-1.2.9-S1-10G-qemu.qcow2",
|
|
67
|
-
"version": "1.2.9-S1
|
|
77
|
+
"version": "1.2.9-S1",
|
|
68
78
|
"md5sum": "0a70d78b80a3716d42487c02ef44f41f",
|
|
69
79
|
"filesize": 426967040,
|
|
70
|
-
"download_url": "https://support.vyos.io/
|
|
71
|
-
"direct_download_url": "https://legacy-lts-images.vyos.io/1.2.9-S1/vyos-1.2.9-S1-10G-qemu.qcow2"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"filename": "vyos-1.2.9-amd64.iso",
|
|
75
|
-
"version": "1.2.9",
|
|
76
|
-
"md5sum": "586be23b6256173e174c82d8f1f699a1",
|
|
77
|
-
"filesize": 430964736,
|
|
78
|
-
"download_url": "https://support.vyos.io/en/downloads/files/vyos-1-2-9-generic-iso-image",
|
|
79
|
-
"direct_download_url": "https://legacy-lts-images.vyos.io/1.2.9/vyos-1.2.9-amd64.iso"
|
|
80
|
+
"download_url": "https://support.vyos.io/"
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
|
-
"filename": "vyos-1.2.
|
|
83
|
-
"version": "1.2.
|
|
84
|
-
"md5sum": "
|
|
85
|
-
"filesize":
|
|
86
|
-
"download_url": "https://support.vyos.io/
|
|
87
|
-
"direct_download_url": "https://legacy-lts-images.vyos.io/1.2.9/vyos-1.2.9-10G-qemu.qcow2"
|
|
83
|
+
"filename": "vyos-1.2.8-10G-qemu.qcow2",
|
|
84
|
+
"version": "1.2.8",
|
|
85
|
+
"md5sum": "96c76f619d0f8ea11dc8a3a18ed67b98",
|
|
86
|
+
"filesize": 425852928,
|
|
87
|
+
"download_url": "https://support.vyos.io/"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
"filename": "vyos-1.2.
|
|
91
|
-
"version": "1.2.
|
|
92
|
-
"md5sum": "
|
|
93
|
-
"filesize":
|
|
94
|
-
"download_url": "https://support.vyos.io/
|
|
90
|
+
"filename": "vyos-1.2.7-qemu.qcow2",
|
|
91
|
+
"version": "1.2.7",
|
|
92
|
+
"md5sum": "1be4674c970fcdd65067e504baea5d74",
|
|
93
|
+
"filesize": 424607744,
|
|
94
|
+
"download_url": "https://support.vyos.io/"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
|
-
"filename": "vyos-1.
|
|
98
|
-
"version": "1.
|
|
99
|
-
"md5sum": "
|
|
100
|
-
"filesize":
|
|
101
|
-
"
|
|
97
|
+
"filename": "vyos-1.2.6-qemu.qcow2",
|
|
98
|
+
"version": "1.2.6",
|
|
99
|
+
"md5sum": "d8010d79889ca0ba5cb2634665e548e3",
|
|
100
|
+
"filesize": 424607744,
|
|
101
|
+
"download_url": "https://support.vyos.io/"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
|
-
"filename": "
|
|
105
|
-
"version": "1.
|
|
106
|
-
"md5sum": "
|
|
107
|
-
"filesize":
|
|
108
|
-
"download_url": "https://
|
|
109
|
-
"direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty8G.qcow2/download"
|
|
104
|
+
"filename": "vyos-1.2.5-amd64.qcow2",
|
|
105
|
+
"version": "1.2.5",
|
|
106
|
+
"md5sum": "110c22309ec480600446fd2fb4f27a0d",
|
|
107
|
+
"filesize": 411500544 ,
|
|
108
|
+
"download_url": "https://support.vyos.io/"
|
|
110
109
|
}
|
|
111
110
|
],
|
|
112
111
|
"versions": [
|
|
112
|
+
{
|
|
113
|
+
"name": "1.4.0",
|
|
114
|
+
"images": {
|
|
115
|
+
"hda_disk_image": "vyos-1.4.0-kvm-amd64.qcow2"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "1.3.7",
|
|
120
|
+
"images": {
|
|
121
|
+
"hda_disk_image": "vyos-1.3.7-qemu-amd64.qcow2"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
113
124
|
{
|
|
114
125
|
"name": "1.3.2",
|
|
115
126
|
"images": {
|
|
116
|
-
"hda_disk_image": "
|
|
117
|
-
"cdrom_image": "vyos-1.3.2-amd64.iso"
|
|
127
|
+
"hda_disk_image": "vyos-1.3.2-10G-qemu.qcow2"
|
|
118
128
|
}
|
|
119
129
|
},
|
|
120
130
|
{
|
|
121
131
|
"name": "1.3.1-S1",
|
|
122
132
|
"images": {
|
|
123
|
-
"hda_disk_image": "
|
|
124
|
-
"cdrom_image": "vyos-1.3.1-S1-amd64.iso"
|
|
133
|
+
"hda_disk_image": "vyos-1.3.1-S1-10G-qemu.qcow2"
|
|
125
134
|
}
|
|
126
135
|
},
|
|
127
136
|
{
|
|
128
137
|
"name": "1.3.1",
|
|
129
138
|
"images": {
|
|
130
|
-
"hda_disk_image": "
|
|
131
|
-
"cdrom_image": "vyos-1.3.1-amd64.iso"
|
|
139
|
+
"hda_disk_image": "vyos-1.3.1-10G-qemu.qcow2"
|
|
132
140
|
}
|
|
133
141
|
},
|
|
134
142
|
{
|
|
135
143
|
"name": "1.3.0",
|
|
136
144
|
"images": {
|
|
137
|
-
"hda_disk_image": "
|
|
138
|
-
"cdrom_image": "vyos-1.3.0-amd64.iso"
|
|
145
|
+
"hda_disk_image": "vyos-1.3.0-10G-qemu.qcow2"
|
|
139
146
|
}
|
|
140
147
|
},
|
|
141
148
|
{
|
|
142
149
|
"name": "1.2.9-S1",
|
|
143
|
-
"images": {
|
|
144
|
-
"hda_disk_image": "empty8G.qcow2",
|
|
145
|
-
"cdrom_image": "vyos-1.2.9-S1-amd64.iso"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "1.2.9-S1-KVM",
|
|
150
150
|
"images": {
|
|
151
151
|
"hda_disk_image": "vyos-1.2.9-S1-10G-qemu.qcow2"
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
|
-
"name": "1.2.
|
|
155
|
+
"name": "1.2.8",
|
|
156
156
|
"images": {
|
|
157
|
-
"hda_disk_image": "
|
|
158
|
-
"cdrom_image": "vyos-1.2.9-amd64.iso"
|
|
157
|
+
"hda_disk_image": "vyos-1.2.8-10G-qemu.qcow2"
|
|
159
158
|
}
|
|
160
159
|
},
|
|
161
160
|
{
|
|
162
|
-
"name": "1.2.
|
|
161
|
+
"name": "1.2.7",
|
|
163
162
|
"images": {
|
|
164
|
-
"hda_disk_image": "vyos-1.2.
|
|
163
|
+
"hda_disk_image": "vyos-1.2.7-qemu.qcow2"
|
|
165
164
|
}
|
|
166
165
|
},
|
|
167
166
|
{
|
|
168
|
-
"name": "1.2.
|
|
167
|
+
"name": "1.2.6",
|
|
169
168
|
"images": {
|
|
170
|
-
"hda_disk_image": "
|
|
171
|
-
"cdrom_image": "vyos-1.2.8-amd64.iso"
|
|
169
|
+
"hda_disk_image": "vyos-1.2.6-qemu.qcow2"
|
|
172
170
|
}
|
|
173
171
|
},
|
|
174
172
|
{
|
|
175
|
-
"name": "1.
|
|
173
|
+
"name": "1.2.5",
|
|
176
174
|
"images": {
|
|
177
|
-
"hda_disk_image": "
|
|
178
|
-
"cdrom_image": "vyos-1.1.8-amd64.iso"
|
|
175
|
+
"hda_disk_image": "vyos-1.2.5-amd64.qcow2"
|
|
179
176
|
}
|
|
180
177
|
}
|
|
181
178
|
]
|
gns3server/compute/base_node.py
CHANGED
|
@@ -28,6 +28,7 @@ import shutil
|
|
|
28
28
|
import platformdirs
|
|
29
29
|
|
|
30
30
|
from gns3server.utils import parse_version
|
|
31
|
+
from gns3server.config import Config
|
|
31
32
|
from gns3server.utils.asyncio import locking
|
|
32
33
|
from gns3server.compute.base_manager import BaseManager
|
|
33
34
|
from gns3server.compute.docker.docker_vm import DockerVM
|
|
@@ -95,8 +96,13 @@ class Docker(BaseManager):
|
|
|
95
96
|
Get the Docker resources storage directory
|
|
96
97
|
"""
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
resources_path = Config.instance().settings.Server.resources_path
|
|
100
|
+
if not resources_path:
|
|
101
|
+
appname = vendor = "GNS3"
|
|
102
|
+
resources_path = platformdirs.user_data_dir(appname, vendor, roaming=True)
|
|
103
|
+
else:
|
|
104
|
+
resources_path = os.path.expanduser(resources_path)
|
|
105
|
+
docker_resources_dir = os.path.join(resources_path, "docker")
|
|
100
106
|
os.makedirs(docker_resources_dir, exist_ok=True)
|
|
101
107
|
return docker_resources_dir
|
|
102
108
|
|
|
@@ -34,6 +34,7 @@ from gns3server.utils.asyncio import wait_for_file_creation
|
|
|
34
34
|
from gns3server.utils.asyncio import monitor_process
|
|
35
35
|
from gns3server.utils.get_resource import get_resource
|
|
36
36
|
from gns3server.utils.hostname import is_rfc1123_hostname_valid
|
|
37
|
+
from gns3server.utils import macaddress_to_int, int_to_macaddress
|
|
37
38
|
|
|
38
39
|
from gns3server.compute.ubridge.ubridge_error import UbridgeError, UbridgeNamespaceError
|
|
39
40
|
from ..base_node import BaseNode
|
|
@@ -78,6 +79,7 @@ class DockerVM(BaseNode):
|
|
|
78
79
|
aux=None,
|
|
79
80
|
start_command=None,
|
|
80
81
|
adapters=None,
|
|
82
|
+
mac_address="",
|
|
81
83
|
environment=None,
|
|
82
84
|
console_type="telnet",
|
|
83
85
|
aux_type="none",
|
|
@@ -130,6 +132,8 @@ class DockerVM(BaseNode):
|
|
|
130
132
|
else:
|
|
131
133
|
self.adapters = adapters
|
|
132
134
|
|
|
135
|
+
self.mac_address = mac_address
|
|
136
|
+
|
|
133
137
|
log.debug(
|
|
134
138
|
"{module}: {name} [{image}] initialized.".format(
|
|
135
139
|
module=self.manager.module_name, name=self.name, image=self._image
|
|
@@ -145,6 +149,7 @@ class DockerVM(BaseNode):
|
|
|
145
149
|
"project_id": self._project.id,
|
|
146
150
|
"image": self._image,
|
|
147
151
|
"adapters": self.adapters,
|
|
152
|
+
"mac_address": self.mac_address,
|
|
148
153
|
"console": self.console,
|
|
149
154
|
"console_type": self.console_type,
|
|
150
155
|
"console_resolution": self.console_resolution,
|
|
@@ -190,6 +195,36 @@ class DockerVM(BaseNode):
|
|
|
190
195
|
def ethernet_adapters(self):
|
|
191
196
|
return self._ethernet_adapters
|
|
192
197
|
|
|
198
|
+
@property
|
|
199
|
+
def mac_address(self):
|
|
200
|
+
"""
|
|
201
|
+
Returns the MAC address for this Docker container.
|
|
202
|
+
|
|
203
|
+
:returns: adapter type (string)
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
return self._mac_address
|
|
207
|
+
|
|
208
|
+
@mac_address.setter
|
|
209
|
+
def mac_address(self, mac_address):
|
|
210
|
+
"""
|
|
211
|
+
Sets the MAC address for this Docker container.
|
|
212
|
+
|
|
213
|
+
:param mac_address: MAC address
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
if not mac_address:
|
|
217
|
+
# use the node UUID to generate a random MAC address
|
|
218
|
+
self._mac_address = "02:42:%s:%s:%s:00" % (self.id[2:4], self.id[4:6], self.id[6:8])
|
|
219
|
+
else:
|
|
220
|
+
self._mac_address = mac_address
|
|
221
|
+
|
|
222
|
+
log.info('Docker container "{name}" [{id}]: MAC address changed to {mac_addr}'.format(
|
|
223
|
+
name=self._name,
|
|
224
|
+
id=self._id,
|
|
225
|
+
mac_addr=self._mac_address)
|
|
226
|
+
)
|
|
227
|
+
|
|
193
228
|
@property
|
|
194
229
|
def start_command(self):
|
|
195
230
|
return self._start_command
|
|
@@ -429,6 +464,7 @@ class DockerVM(BaseNode):
|
|
|
429
464
|
"Mounts": self._mount_binds(image_infos),
|
|
430
465
|
"Memory": self._memory * (1024 * 1024), # convert memory to bytes
|
|
431
466
|
"NanoCpus": int(self._cpus * 1e9), # convert cpus to nano cpus
|
|
467
|
+
"UsernsMode": "host"
|
|
432
468
|
},
|
|
433
469
|
"Volumes": {},
|
|
434
470
|
"Env": ["container=docker"], # Systemd compliant: https://github.com/GNS3/gns3-server/issues/573
|
|
@@ -799,7 +835,10 @@ class DockerVM(BaseNode):
|
|
|
799
835
|
"""
|
|
800
836
|
|
|
801
837
|
# resize the container TTY.
|
|
802
|
-
|
|
838
|
+
try:
|
|
839
|
+
await self._manager.query("POST", f"containers/{self._cid}/resize?h={rows}&w={columns}")
|
|
840
|
+
except DockerError as e:
|
|
841
|
+
log.warning(f"Could not resize the container TTY: {e}")
|
|
803
842
|
|
|
804
843
|
async def _start_console(self):
|
|
805
844
|
"""
|
|
@@ -1058,7 +1097,20 @@ class DockerVM(BaseNode):
|
|
|
1058
1097
|
adapter_number=adapter_number, hostif=adapter.host_ifc
|
|
1059
1098
|
)
|
|
1060
1099
|
)
|
|
1061
|
-
|
|
1100
|
+
|
|
1101
|
+
mac_address = int_to_macaddress(macaddress_to_int(self._mac_address) + adapter_number)
|
|
1102
|
+
custom_adapter = self._get_custom_adapter_settings(adapter_number)
|
|
1103
|
+
custom_mac_address = custom_adapter.get("mac_address")
|
|
1104
|
+
if custom_mac_address:
|
|
1105
|
+
mac_address = custom_mac_address
|
|
1106
|
+
|
|
1107
|
+
try:
|
|
1108
|
+
await self._ubridge_send('docker set_mac_addr {ifc} {mac}'.format(ifc=adapter.host_ifc, mac=mac_address))
|
|
1109
|
+
except UbridgeError:
|
|
1110
|
+
log.warning(f"Could not set MAC address {mac_address} on interface {adapter.host_ifc}")
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
log.debug(f"Move container {self.name} adapter {adapter.host_ifc} to namespace {self._namespace}")
|
|
1062
1114
|
try:
|
|
1063
1115
|
await self._ubridge_send(
|
|
1064
1116
|
"docker move_to_ns {ifc} {ns} eth{adapter}".format(
|
|
@@ -1067,6 +1119,8 @@ class DockerVM(BaseNode):
|
|
|
1067
1119
|
)
|
|
1068
1120
|
except UbridgeError as e:
|
|
1069
1121
|
raise UbridgeNamespaceError(e)
|
|
1122
|
+
else:
|
|
1123
|
+
log.info(f"Created adapter {adapter_number} with MAC address {mac_address} in namespace {self._namespace}")
|
|
1070
1124
|
|
|
1071
1125
|
if nio:
|
|
1072
1126
|
await self._connect_nio(adapter_number, nio)
|
|
@@ -25,7 +25,10 @@ PATH=/gns3/bin:/tmp/gns3/bin:/sbin:$PATH
|
|
|
25
25
|
# bootstrap busybox commands
|
|
26
26
|
if [ ! -d /tmp/gns3/bin ]; then
|
|
27
27
|
busybox mkdir -p /tmp/gns3/bin
|
|
28
|
-
|
|
28
|
+
for applet in `busybox --list`
|
|
29
|
+
do
|
|
30
|
+
ln -s /gns3/bin/busybox "/tmp/gns3/bin/$applet"
|
|
31
|
+
done
|
|
29
32
|
fi
|
|
30
33
|
|
|
31
34
|
# Restore file permission and mount volumes
|
|
@@ -75,7 +78,7 @@ ip link set dev lo up
|
|
|
75
78
|
while true
|
|
76
79
|
do
|
|
77
80
|
grep $GNS3_MAX_ETHERNET /proc/net/dev > /dev/null && break
|
|
78
|
-
|
|
81
|
+
usleep 500000 # wait 0.5 seconds
|
|
79
82
|
done
|
|
80
83
|
|
|
81
84
|
# activate eth interfaces
|
|
@@ -521,10 +521,6 @@ class Dynamips(BaseManager):
|
|
|
521
521
|
if usage is not None and usage != vm.usage:
|
|
522
522
|
vm.usage = usage
|
|
523
523
|
|
|
524
|
-
aux_type = settings.get("aux_type")
|
|
525
|
-
if aux_type is not None and aux_type != vm.aux_type:
|
|
526
|
-
vm.aux_type = aux_type
|
|
527
|
-
|
|
528
524
|
# update the configs if needed
|
|
529
525
|
await self.set_vm_configs(vm, settings)
|
|
530
526
|
|
|
@@ -1030,6 +1030,26 @@ class Router(BaseNode):
|
|
|
1030
1030
|
self.aux = aux
|
|
1031
1031
|
await self._hypervisor.send(f'vm set_aux_tcp_port "{self._name}" {aux}')
|
|
1032
1032
|
|
|
1033
|
+
async def set_aux_type(self, aux_type):
|
|
1034
|
+
"""
|
|
1035
|
+
Sets the aux type.
|
|
1036
|
+
|
|
1037
|
+
:param aux_type: auxiliary console type
|
|
1038
|
+
"""
|
|
1039
|
+
|
|
1040
|
+
if self.aux_type != aux_type:
|
|
1041
|
+
status = await self.get_status()
|
|
1042
|
+
if status == "running":
|
|
1043
|
+
raise DynamipsError('"{name}" must be stopped to change the auxiliary console type to {aux_type}'.format(
|
|
1044
|
+
name=self._name,
|
|
1045
|
+
aux_type=aux_type)
|
|
1046
|
+
)
|
|
1047
|
+
|
|
1048
|
+
self.aux_type = aux_type
|
|
1049
|
+
|
|
1050
|
+
if self._aux and aux_type == "telnet":
|
|
1051
|
+
await self._hypervisor.send(f'vm set_aux_tcp_port "{self._name}" {self._aux}')
|
|
1052
|
+
|
|
1033
1053
|
async def reset_console(self):
|
|
1034
1054
|
"""
|
|
1035
1055
|
Reset console
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
|
16
16
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
import asyncio
|
|
19
19
|
from contextlib import contextmanager
|
|
20
20
|
from gns3server.utils.notification_queue import NotificationQueue
|
|
21
21
|
|
|
@@ -54,7 +54,7 @@ class NotificationManager:
|
|
|
54
54
|
"""
|
|
55
55
|
|
|
56
56
|
for listener in self._listeners:
|
|
57
|
-
listener.put_nowait(
|
|
57
|
+
asyncio.get_running_loop().call_soon_threadsafe(listener.put_nowait, (action, event, kwargs))
|
|
58
58
|
|
|
59
59
|
@staticmethod
|
|
60
60
|
def reset():
|
|
@@ -45,7 +45,7 @@ from ..nios.nio_tap import NIOTAP
|
|
|
45
45
|
from ..base_node import BaseNode
|
|
46
46
|
from ...utils.asyncio import monitor_process
|
|
47
47
|
from ...utils.images import md5sum
|
|
48
|
-
from ...utils import macaddress_to_int, int_to_macaddress
|
|
48
|
+
from ...utils import macaddress_to_int, int_to_macaddress, is_ipv6_enabled
|
|
49
49
|
from ...utils.hostname import is_rfc1123_hostname_valid
|
|
50
50
|
|
|
51
51
|
from gns3server.schemas.compute.qemu_nodes import Qemu, QemuPlatform
|
|
@@ -54,6 +54,12 @@ import logging
|
|
|
54
54
|
|
|
55
55
|
log = logging.getLogger(__name__)
|
|
56
56
|
|
|
57
|
+
# forbidden additional options
|
|
58
|
+
FORBIDDEN_OPTIONS = {"-blockdev", "-drive", "-hda", "-hdb", "-hdc", "-hdd",
|
|
59
|
+
"-fsdev", "-virtfs", "-nic", "-netdev"}
|
|
60
|
+
FORBIDDEN_OPTIONS |= {"-" + opt for opt in FORBIDDEN_OPTIONS
|
|
61
|
+
if opt.startswith("-") and not opt.startswith("--")}
|
|
62
|
+
|
|
57
63
|
|
|
58
64
|
class QemuVM(BaseNode):
|
|
59
65
|
module_name = "qemu"
|
|
@@ -1855,14 +1861,17 @@ class QemuVM(BaseNode):
|
|
|
1855
1861
|
if port:
|
|
1856
1862
|
console_host = self._manager.port_manager.console_host
|
|
1857
1863
|
if console_host == "0.0.0.0":
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1864
|
+
try:
|
|
1865
|
+
if is_ipv6_enabled():
|
|
1866
|
+
# to fix an issue with Qemu when IPv4 is not enabled
|
|
1867
|
+
# see https://github.com/GNS3/gns3-gui/issues/2352
|
|
1868
|
+
# FIXME: consider making this more global (not just for Qemu + SPICE)
|
|
1869
|
+
console_host = "::"
|
|
1870
|
+
except OSError as e:
|
|
1871
|
+
raise QemuError("Could not check if IPv6 is enabled: {}".format(e))
|
|
1872
|
+
return ["-spice",
|
|
1873
|
+
f"addr={console_host},port={port},disable-ticketing",
|
|
1874
|
+
"-vga", "qxl"]
|
|
1866
1875
|
else:
|
|
1867
1876
|
return []
|
|
1868
1877
|
|
|
@@ -2148,11 +2157,6 @@ class QemuVM(BaseNode):
|
|
|
2148
2157
|
continue
|
|
2149
2158
|
|
|
2150
2159
|
interface = getattr(self, f"hd{drive}_disk_interface")
|
|
2151
|
-
# fail-safe: use "ide" if there is a disk image and no interface type has been explicitly configured
|
|
2152
|
-
if interface == "none":
|
|
2153
|
-
interface = "ide"
|
|
2154
|
-
setattr(self, f"hd{drive}_disk_interface", interface)
|
|
2155
|
-
|
|
2156
2160
|
disk_name = f"hd{drive}"
|
|
2157
2161
|
if not os.path.isfile(disk_image) or not os.path.exists(disk_image):
|
|
2158
2162
|
if os.path.islink(disk_image):
|
|
@@ -2640,9 +2644,16 @@ class QemuVM(BaseNode):
|
|
|
2640
2644
|
command.extend(self._tpm_options())
|
|
2641
2645
|
if additional_options:
|
|
2642
2646
|
try:
|
|
2643
|
-
|
|
2647
|
+
additional_opt_list = shlex.split(additional_options)
|
|
2644
2648
|
except ValueError as e:
|
|
2645
2649
|
raise QemuError(f"Invalid additional options: {additional_options} error {e}")
|
|
2650
|
+
allow_unsafe_options = self.manager.config.settings.Qemu.allow_unsafe_options
|
|
2651
|
+
if allow_unsafe_options is False:
|
|
2652
|
+
for opt in additional_opt_list:
|
|
2653
|
+
if opt in FORBIDDEN_OPTIONS:
|
|
2654
|
+
raise QemuError("Forbidden additional option: {}".format(opt))
|
|
2655
|
+
command.extend(additional_opt_list)
|
|
2656
|
+
|
|
2646
2657
|
# avoiding mouse offset (see https://github.com/GNS3/gns3-server/issues/2335)
|
|
2647
2658
|
if self._console_type == "vnc":
|
|
2648
2659
|
command.extend(['-machine', 'usb=on', '-device', 'usb-tablet'])
|
|
@@ -34,7 +34,7 @@ enable_ssl = False
|
|
|
34
34
|
certfile = /home/gns3/.config/GNS3/ssl/server.cert
|
|
35
35
|
certkey = /home/gns3/.config/GNS3/ssl/server.key
|
|
36
36
|
|
|
37
|
-
; Path where
|
|
37
|
+
; Path where binary images are stored
|
|
38
38
|
images_path = /home/gns3/GNS3/images
|
|
39
39
|
|
|
40
40
|
; Additional paths to look for images
|
|
@@ -43,15 +43,20 @@ additional_images_paths = /opt/images;/mnt/disk1/images
|
|
|
43
43
|
; Path where user projects are stored
|
|
44
44
|
projects_path = /home/gns3/GNS3/projects
|
|
45
45
|
|
|
46
|
-
; Path where user appliances are stored
|
|
46
|
+
; Path where custom user appliances are stored
|
|
47
47
|
appliances_path = /home/gns3/GNS3/appliances
|
|
48
48
|
|
|
49
|
-
; Path where custom
|
|
49
|
+
; Path where custom user symbols are stored
|
|
50
50
|
symbols_path = /home/gns3/GNS3/symbols
|
|
51
51
|
|
|
52
52
|
; Path where custom configs are stored
|
|
53
53
|
configs_path = /home/gns3/GNS3/configs
|
|
54
54
|
|
|
55
|
+
; Path where files like built-in appliances and Docker resources are stored
|
|
56
|
+
; The default path is the local user data directory
|
|
57
|
+
; (Linux: "~/.local/share/GNS3", macOS: "~/Library/Application Support/GNS3", Windows: "%APPDATA%\GNS3")
|
|
58
|
+
; resources_path = /home/gns3/GNS3/resources
|
|
59
|
+
|
|
55
60
|
; Default symbol theme
|
|
56
61
|
; Currently available themes are "Classic", Affinity-square-blue", "Affinity-square-red"
|
|
57
62
|
; "Affinity-square-gray", "Affinity-circle-blue", "Affinity-circle-red" and "Affinity-circle-gray"
|
|
@@ -102,6 +107,9 @@ default_nat_interface = vmnet10
|
|
|
102
107
|
; Enable the built-in templates
|
|
103
108
|
enable_builtin_templates = True
|
|
104
109
|
|
|
110
|
+
; Install built-in appliances
|
|
111
|
+
install_builtin_appliances = True
|
|
112
|
+
|
|
105
113
|
; check if hardware virtualization is used by other emulators (KVM, VMware or VirtualBox)
|
|
106
114
|
hardware_virtualization_check = True
|
|
107
115
|
|
|
@@ -148,3 +156,5 @@ monitor_host = 127.0.0.1
|
|
|
148
156
|
enable_hardware_acceleration = True
|
|
149
157
|
; Require hardware acceleration in order to start VMs
|
|
150
158
|
require_hardware_acceleration = False
|
|
159
|
+
; Allow unsafe additional command line options
|
|
160
|
+
allow_unsafe_options = False
|