gns3-server 3.0.0rc1__py3-none-any.whl → 3.0.1__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.0rc1.dist-info → gns3_server-3.0.1.dist-info}/METADATA +20 -19
- {gns3_server-3.0.0rc1.dist-info → gns3_server-3.0.1.dist-info}/RECORD +89 -79
- {gns3_server-3.0.0rc1.dist-info → gns3_server-3.0.1.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 +29 -3
- gns3server/api/routes/controller/users.py +2 -2
- gns3server/api/routes/index.py +3 -3
- gns3server/api/server.py +38 -3
- gns3server/appliances/almalinux.gns3a +6 -6
- gns3server/appliances/arista-veos.gns3a +20 -514
- gns3server/appliances/cisco-7200.gns3a +26 -0
- gns3server/appliances/cisco-asav.gns3a +14 -1
- gns3server/appliances/cisco-csr1000v.gns3a +28 -2
- gns3server/appliances/cisco-iou-l2.gns3a +16 -4
- gns3server/appliances/cisco-iou-l3.gns3a +16 -4
- gns3server/appliances/cisco-vWLC.gns3a +29 -1
- gns3server/appliances/fortigate.gns3a +3 -3
- gns3server/appliances/hbcd-pe.gns3a +62 -0
- gns3server/appliances/innovaphone-app.gns3a +50 -0
- gns3server/appliances/innovaphone-ipva.gns3a +78 -0
- gns3server/appliances/mikrotik-chr.gns3a +30 -99
- gns3server/appliances/nixos.gns3a +52 -0
- gns3server/appliances/opnsense.gns3a +13 -0
- gns3server/appliances/pfsense.gns3a +14 -0
- gns3server/appliances/reactos.gns3a +10 -10
- gns3server/appliances/truenas.gns3a +104 -0
- gns3server/appliances/ubuntu-cloud.gns3a +35 -20
- 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/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/iou/iou_vm.py +22 -12
- gns3server/compute/notification_manager.py +2 -2
- gns3server/compute/qemu/qemu_vm.py +0 -5
- gns3server/controller/__init__.py +35 -25
- gns3server/controller/appliance_manager.py +2 -4
- gns3server/controller/compute.py +1 -1
- gns3server/controller/export_project.py +18 -14
- gns3server/controller/import_project.py +21 -0
- gns3server/controller/node.py +10 -8
- gns3server/controller/notification.py +4 -4
- gns3server/controller/project.py +88 -5
- gns3server/controller/symbols.py +1 -1
- gns3server/controller/topology.py +1 -1
- gns3server/crash_report.py +1 -1
- gns3server/db/models/templates.py +1 -0
- gns3server/db/repositories/pools.py +1 -1
- gns3server/db/tasks.py +1 -1
- gns3server/db_migrations/versions/9a5292aa4389_add_mac_address_field_in_docker_.py +27 -0
- gns3server/disks/empty100G.qcow2 +0 -0
- gns3server/disks/empty200G.qcow2 +0 -0
- gns3server/disks/empty30G.qcow2 +0 -0
- gns3server/disks/empty8G.qcow2 +0 -0
- gns3server/schemas/compute/docker_nodes.py +1 -0
- gns3server/schemas/compute/ethernet_switch_nodes.py +1 -1
- gns3server/schemas/config.py +1 -1
- 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/favicon.ico +0 -0
- gns3server/static/redoc.standalone.js +1782 -0
- gns3server/static/swagger-ui-bundle.js +2 -0
- gns3server/static/swagger-ui.css +3 -0
- gns3server/static/web-ui/index.html +1 -1
- gns3server/static/web-ui/{main.4185a8e61824af0d.js → main.e55eeff5c0ba1cf4.js} +1 -1
- gns3server/utils/__init__.py +12 -0
- gns3server/utils/asyncio/aiozipstream.py +15 -11
- gns3server/utils/images.py +45 -35
- gns3server/version.py +2 -2
- {gns3_server-3.0.0rc1.dist-info → gns3_server-3.0.1.dist-info}/LICENSE +0 -0
- {gns3_server-3.0.0rc1.dist-info → gns3_server-3.0.1.dist-info}/entry_points.txt +0 -0
- {gns3_server-3.0.0rc1.dist-info → gns3_server-3.0.1.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
|
@@ -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
|
gns3server/compute/iou/iou_vm.py
CHANGED
|
@@ -436,14 +436,16 @@ class IOUVM(BaseNode):
|
|
|
436
436
|
)
|
|
437
437
|
)
|
|
438
438
|
|
|
439
|
-
|
|
439
|
+
def _is_iou_license_check_enabled(self):
|
|
440
440
|
"""
|
|
441
|
-
|
|
441
|
+
Returns if IOU license check is enabled.
|
|
442
|
+
|
|
443
|
+
:return: boolean
|
|
442
444
|
"""
|
|
443
445
|
|
|
444
446
|
# license check is sent by the controller
|
|
445
447
|
if self.license_check is False:
|
|
446
|
-
return
|
|
448
|
+
return False
|
|
447
449
|
|
|
448
450
|
try:
|
|
449
451
|
# we allow license check to be disabled server wide
|
|
@@ -453,7 +455,14 @@ class IOUVM(BaseNode):
|
|
|
453
455
|
|
|
454
456
|
if server_wide_license_check is False:
|
|
455
457
|
log.warning("License check is explicitly disabled on this server")
|
|
456
|
-
return
|
|
458
|
+
return False
|
|
459
|
+
|
|
460
|
+
return True
|
|
461
|
+
|
|
462
|
+
async def _check_iou_license(self):
|
|
463
|
+
"""
|
|
464
|
+
Checks for a valid IOU key in the iourc file (paranoid mode).
|
|
465
|
+
"""
|
|
457
466
|
|
|
458
467
|
config = configparser.ConfigParser()
|
|
459
468
|
try:
|
|
@@ -559,15 +568,16 @@ class IOUVM(BaseNode):
|
|
|
559
568
|
except OSError as e:
|
|
560
569
|
raise IOUError(f"Could not rename nvram files: {e}")
|
|
561
570
|
|
|
562
|
-
iourc_path =
|
|
563
|
-
if
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
571
|
+
iourc_path = None
|
|
572
|
+
if self._is_iou_license_check_enabled():
|
|
573
|
+
iourc_path = self.iourc_path
|
|
574
|
+
if not iourc_path:
|
|
575
|
+
raise IOUError("Could not find an iourc file (IOU license), please configure an IOU license")
|
|
576
|
+
if not os.path.isfile(iourc_path):
|
|
577
|
+
raise IOUError(f"The iourc path '{iourc_path}' is not a regular file")
|
|
578
|
+
await self._check_iou_license()
|
|
567
579
|
|
|
568
|
-
await self._check_iou_licence()
|
|
569
580
|
await self._start_ubridge()
|
|
570
|
-
|
|
571
581
|
self._create_netmap_config()
|
|
572
582
|
if self.use_default_iou_values:
|
|
573
583
|
# make sure we have the default nvram amount to correctly push the configs
|
|
@@ -579,7 +589,7 @@ class IOUVM(BaseNode):
|
|
|
579
589
|
|
|
580
590
|
self._nvram_watcher = FileWatcher(self._nvram_file(), self._nvram_changed, delay=2)
|
|
581
591
|
|
|
582
|
-
# created
|
|
592
|
+
# created an environment variable pointing to the iourc file.
|
|
583
593
|
env = os.environ.copy()
|
|
584
594
|
if "IOURC" not in os.environ and iourc_path:
|
|
585
595
|
env["IOURC"] = iourc_path
|
|
@@ -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():
|
|
@@ -2157,11 +2157,6 @@ class QemuVM(BaseNode):
|
|
|
2157
2157
|
continue
|
|
2158
2158
|
|
|
2159
2159
|
interface = getattr(self, f"hd{drive}_disk_interface")
|
|
2160
|
-
# fail-safe: use "ide" if there is a disk image and no interface type has been explicitly configured
|
|
2161
|
-
if interface == "none":
|
|
2162
|
-
interface = "ide"
|
|
2163
|
-
setattr(self, f"hd{drive}_disk_interface", interface)
|
|
2164
|
-
|
|
2165
2160
|
disk_name = f"hd{drive}"
|
|
2166
2161
|
if not os.path.isfile(disk_image) or not os.path.exists(disk_image):
|
|
2167
2162
|
if os.path.islink(disk_image):
|