gns3-server 3.0.0__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.

Files changed (1251) hide show
  1. gns3_server-3.0.0.dist-info/LICENSE +674 -0
  2. gns3_server-3.0.0.dist-info/METADATA +868 -0
  3. gns3_server-3.0.0.dist-info/RECORD +1251 -0
  4. gns3_server-3.0.0.dist-info/WHEEL +5 -0
  5. gns3_server-3.0.0.dist-info/entry_points.txt +3 -0
  6. gns3_server-3.0.0.dist-info/top_level.txt +1 -0
  7. gns3server/__init__.py +17 -0
  8. gns3server/__main__.py +20 -0
  9. gns3server/alembic.ini +103 -0
  10. gns3server/api/__init__.py +0 -0
  11. gns3server/api/routes/__init__.py +0 -0
  12. gns3server/api/routes/compute/__init__.py +267 -0
  13. gns3server/api/routes/compute/atm_switch_nodes.py +233 -0
  14. gns3server/api/routes/compute/capabilities.py +51 -0
  15. gns3server/api/routes/compute/cloud_nodes.py +249 -0
  16. gns3server/api/routes/compute/compute.py +143 -0
  17. gns3server/api/routes/compute/dependencies/__init__.py +0 -0
  18. gns3server/api/routes/compute/dependencies/authentication.py +83 -0
  19. gns3server/api/routes/compute/docker_nodes.py +393 -0
  20. gns3server/api/routes/compute/dynamips_nodes.py +367 -0
  21. gns3server/api/routes/compute/ethernet_hub_nodes.py +236 -0
  22. gns3server/api/routes/compute/ethernet_switch_nodes.py +246 -0
  23. gns3server/api/routes/compute/frame_relay_switch_nodes.py +240 -0
  24. gns3server/api/routes/compute/images.py +156 -0
  25. gns3server/api/routes/compute/iou_nodes.py +344 -0
  26. gns3server/api/routes/compute/nat_nodes.py +244 -0
  27. gns3server/api/routes/compute/notifications.py +88 -0
  28. gns3server/api/routes/compute/projects.py +243 -0
  29. gns3server/api/routes/compute/qemu_nodes.py +412 -0
  30. gns3server/api/routes/compute/virtualbox_nodes.py +377 -0
  31. gns3server/api/routes/compute/vmware_nodes.py +355 -0
  32. gns3server/api/routes/compute/vpcs_nodes.py +343 -0
  33. gns3server/api/routes/controller/__init__.py +147 -0
  34. gns3server/api/routes/controller/acl.py +268 -0
  35. gns3server/api/routes/controller/appliances.py +150 -0
  36. gns3server/api/routes/controller/computes.py +231 -0
  37. gns3server/api/routes/controller/controller.py +319 -0
  38. gns3server/api/routes/controller/dependencies/__init__.py +0 -0
  39. gns3server/api/routes/controller/dependencies/authentication.py +117 -0
  40. gns3server/api/routes/controller/dependencies/database.py +38 -0
  41. gns3server/api/routes/controller/dependencies/rbac.py +78 -0
  42. gns3server/api/routes/controller/drawings.py +131 -0
  43. gns3server/api/routes/controller/gns3vm.py +71 -0
  44. gns3server/api/routes/controller/groups.py +231 -0
  45. gns3server/api/routes/controller/images.py +255 -0
  46. gns3server/api/routes/controller/links.py +287 -0
  47. gns3server/api/routes/controller/nodes.py +619 -0
  48. gns3server/api/routes/controller/pools.py +239 -0
  49. gns3server/api/routes/controller/privileges.py +43 -0
  50. gns3server/api/routes/controller/projects.py +595 -0
  51. gns3server/api/routes/controller/roles.py +224 -0
  52. gns3server/api/routes/controller/snapshots.py +124 -0
  53. gns3server/api/routes/controller/symbols.py +133 -0
  54. gns3server/api/routes/controller/templates.py +192 -0
  55. gns3server/api/routes/controller/users.py +254 -0
  56. gns3server/api/routes/index.py +93 -0
  57. gns3server/api/server.py +224 -0
  58. gns3server/appliances/6wind-turbo-router.gns3a +47 -0
  59. gns3server/appliances/IPCop.gns3a +52 -0
  60. gns3server/appliances/a10-vthunder.gns3a +72 -0
  61. gns3server/appliances/aaa.gns3a +20 -0
  62. gns3server/appliances/alcatel-7750.gns3a +74 -0
  63. gns3server/appliances/almalinux.gns3a +84 -0
  64. gns3server/appliances/alpine-linux-virt.gns3a +59 -0
  65. gns3server/appliances/alpine-linux.gns3a +21 -0
  66. gns3server/appliances/arista-ceos.gns3a +20 -0
  67. gns3server/appliances/arista-veos.gns3a +577 -0
  68. gns3server/appliances/aruba-arubaoscx.gns3a +233 -0
  69. gns3server/appliances/aruba-vgw.gns3a +60 -0
  70. gns3server/appliances/aruba-vmc.gns3a +56 -0
  71. gns3server/appliances/asterfusion-vAsterNOS.gns3a +49 -0
  72. gns3server/appliances/asterisk.gns3a +114 -0
  73. gns3server/appliances/bigswitch-bigcloud-fabric.gns3a +42 -0
  74. gns3server/appliances/bird.gns3a +42 -0
  75. gns3server/appliances/bird2.gns3a +57 -0
  76. gns3server/appliances/brocade-vadx.gns3a +43 -0
  77. gns3server/appliances/brocade-vrouter.gns3a +138 -0
  78. gns3server/appliances/brocade-vtm.gns3a +136 -0
  79. gns3server/appliances/bsdrp.gns3a +117 -0
  80. gns3server/appliances/centos-cloud.gns3a +115 -0
  81. gns3server/appliances/centos7.gns3a +72 -0
  82. gns3server/appliances/checkpoint-gaia.gns3a +81 -0
  83. gns3server/appliances/chromium.gns3a +19 -0
  84. gns3server/appliances/cisco-1700.gns3a +39 -0
  85. gns3server/appliances/cisco-2600.gns3a +38 -0
  86. gns3server/appliances/cisco-2691.gns3a +38 -0
  87. gns3server/appliances/cisco-3620.gns3a +38 -0
  88. gns3server/appliances/cisco-3640.gns3a +38 -0
  89. gns3server/appliances/cisco-3660.gns3a +38 -0
  90. gns3server/appliances/cisco-3725.gns3a +38 -0
  91. gns3server/appliances/cisco-3745.gns3a +45 -0
  92. gns3server/appliances/cisco-7200.gns3a +92 -0
  93. gns3server/appliances/cisco-asa.gns3a +86 -0
  94. gns3server/appliances/cisco-asav.gns3a +227 -0
  95. gns3server/appliances/cisco-c8000v.gns3a +108 -0
  96. gns3server/appliances/cisco-cat9k.gns3a +58 -0
  97. gns3server/appliances/cisco-csr1000v.gns3a +316 -0
  98. gns3server/appliances/cisco-dcnm.gns3a +96 -0
  99. gns3server/appliances/cisco-fcnf.gns3a +71 -0
  100. gns3server/appliances/cisco-fmcv.gns3a +139 -0
  101. gns3server/appliances/cisco-fsve.gns3a +57 -0
  102. gns3server/appliances/cisco-ftdv.gns3a +99 -0
  103. gns3server/appliances/cisco-iosv.gns3a +178 -0
  104. gns3server/appliances/cisco-iosvl2.gns3a +95 -0
  105. gns3server/appliances/cisco-iosxrv.gns3a +57 -0
  106. gns3server/appliances/cisco-iosxrv9k.gns3a +188 -0
  107. gns3server/appliances/cisco-iou-l2.gns3a +84 -0
  108. gns3server/appliances/cisco-iou-l3.gns3a +84 -0
  109. gns3server/appliances/cisco-ise.gns3a +154 -0
  110. gns3server/appliances/cisco-ngipsv.gns3a +73 -0
  111. gns3server/appliances/cisco-nxosv.gns3a +56 -0
  112. gns3server/appliances/cisco-nxosv9k.gns3a +433 -0
  113. gns3server/appliances/cisco-pyats.gns3a +19 -0
  114. gns3server/appliances/cisco-smc.gns3a +71 -0
  115. gns3server/appliances/cisco-vWLC.gns3a +140 -0
  116. gns3server/appliances/cisco-wsav.gns3a +44 -0
  117. gns3server/appliances/citrix-netscaler-vpx.gns3a +72 -0
  118. gns3server/appliances/citrix-sd-wan.gns3a +46 -0
  119. gns3server/appliances/citrix-sdwan-center.gns3a +46 -0
  120. gns3server/appliances/clavister-netsheild.gns3a +59 -0
  121. gns3server/appliances/clavister-netwall.gns3a +71 -0
  122. gns3server/appliances/clearos.gns3a +107 -0
  123. gns3server/appliances/cloudrouter.gns3a +72 -0
  124. gns3server/appliances/coreos.gns3a +329 -0
  125. gns3server/appliances/cumulus-vx.gns3a +440 -0
  126. gns3server/appliances/danos.gns3a +57 -0
  127. gns3server/appliances/debian.gns3a +85 -0
  128. gns3server/appliances/deft-linux.gns3a +96 -0
  129. gns3server/appliances/dell-ftos.gns3a +71 -0
  130. gns3server/appliances/dns.gns3a +20 -0
  131. gns3server/appliances/empty-vm.gns3a +199 -0
  132. gns3server/appliances/endhost.gns3a +17 -0
  133. gns3server/appliances/exos.gns3a +51 -0
  134. gns3server/appliances/extreme-networks-voss.gns3a +152 -0
  135. gns3server/appliances/f5-bigip.gns3a +322 -0
  136. gns3server/appliances/f5-bigiq.gns3a +165 -0
  137. gns3server/appliances/fedora-cloud.gns3a +70 -0
  138. gns3server/appliances/firefox.gns3a +59 -0
  139. gns3server/appliances/fortiadc-manager.gns3a +54 -0
  140. gns3server/appliances/fortiadc.gns3a +502 -0
  141. gns3server/appliances/fortianalyzer.gns3a +519 -0
  142. gns3server/appliances/fortiauthenticator.gns3a +251 -0
  143. gns3server/appliances/forticache.gns3a +210 -0
  144. gns3server/appliances/fortigate.gns3a +742 -0
  145. gns3server/appliances/fortimail.gns3a +392 -0
  146. gns3server/appliances/fortimanager.gns3a +519 -0
  147. gns3server/appliances/fortiproxy.gns3a +83 -0
  148. gns3server/appliances/fortirecorder.gns3a +69 -0
  149. gns3server/appliances/fortisandbox.gns3a +210 -0
  150. gns3server/appliances/fortisiem-super_worker.gns3a +210 -0
  151. gns3server/appliances/fortiweb.gns3a +308 -0
  152. gns3server/appliances/freeRouter.gns3a +44 -0
  153. gns3server/appliances/freebsd.gns3a +75 -0
  154. gns3server/appliances/freenas.gns3a +183 -0
  155. gns3server/appliances/frr.gns3a +84 -0
  156. gns3server/appliances/haproxy.gns3a +18 -0
  157. gns3server/appliances/hbcd-pe.gns3a +62 -0
  158. gns3server/appliances/hp-vsr1001.gns3a +149 -0
  159. gns3server/appliances/huawei-ar1kv.gns3a +58 -0
  160. gns3server/appliances/huawei-ce12800.gns3a +43 -0
  161. gns3server/appliances/huawei-ne40e.gns3a +94 -0
  162. gns3server/appliances/huawei-usg6kv.gns3a +50 -0
  163. gns3server/appliances/innovaphone-app.gns3a +50 -0
  164. gns3server/appliances/innovaphone-ipva.gns3a +78 -0
  165. gns3server/appliances/ipfire.gns3a +181 -0
  166. gns3server/appliances/ipterm.gns3a +19 -0
  167. gns3server/appliances/ipxe.gns3a +47 -0
  168. gns3server/appliances/juniper-junos-space.gns3a +46 -0
  169. gns3server/appliances/juniper-vmx-legacy.gns3a +55 -0
  170. gns3server/appliances/juniper-vmx-vcp.gns3a +520 -0
  171. gns3server/appliances/juniper-vmx-vfp.gns3a +281 -0
  172. gns3server/appliances/juniper-vqfx-pfe.gns3a +71 -0
  173. gns3server/appliances/juniper-vqfx-re.gns3a +85 -0
  174. gns3server/appliances/juniper-vrr.gns3a +66 -0
  175. gns3server/appliances/juniper-vsrx.gns3a +332 -0
  176. gns3server/appliances/jupyter.gns3a +20 -0
  177. gns3server/appliances/jupyter27.gns3a +20 -0
  178. gns3server/appliances/kali-linux-cli.gns3a +18 -0
  179. gns3server/appliances/kali-linux.gns3a +248 -0
  180. gns3server/appliances/kemp-vlm.gns3a +111 -0
  181. gns3server/appliances/kerio-connect.gns3a +131 -0
  182. gns3server/appliances/kerio-control.gns3a +143 -0
  183. gns3server/appliances/kerio-operator.gns3a +130 -0
  184. gns3server/appliances/lancom-vrouter.gns3a +45 -0
  185. gns3server/appliances/loadbalancer_org-va.gns3a +56 -0
  186. gns3server/appliances/macos-install.gns3a +72 -0
  187. gns3server/appliances/mcjoin.gns3a +19 -0
  188. gns3server/appliances/microcore-linux.gns3a +72 -0
  189. gns3server/appliances/mikrotik-ccr1036-8g-2s+.gns3a +165 -0
  190. gns3server/appliances/mikrotik-ccr1072-1g-8s+.gns3a +161 -0
  191. gns3server/appliances/mikrotik-chr.gns3a +108 -0
  192. gns3server/appliances/mikrotik-crs328-24p-4s+.gns3a +173 -0
  193. gns3server/appliances/mikrotik-crs328-4c-20s-4s+.gns3a +189 -0
  194. gns3server/appliances/mikrotik-rb1100ahx4-dude-edition.gns3a +155 -0
  195. gns3server/appliances/mikrotik-rb2011uias.gns3a +161 -0
  196. gns3server/appliances/mikrotik-rb3011uias.gns3a +161 -0
  197. gns3server/appliances/mikrotik-rb4011igs+.gns3a +161 -0
  198. gns3server/appliances/mikrotik-rb450g.gns3a +155 -0
  199. gns3server/appliances/mikrotik-rb450gx4.gns3a +155 -0
  200. gns3server/appliances/mikrotik-winbox.gns3a +19 -0
  201. gns3server/appliances/mininet.gns3a +47 -0
  202. gns3server/appliances/net_toolbox.gns3a +20 -0
  203. gns3server/appliances/netapp-ontapsim.gns3a +185 -0
  204. gns3server/appliances/netem.gns3a +44 -0
  205. gns3server/appliances/network_automation.gns3a +19 -0
  206. gns3server/appliances/nixos.gns3a +52 -0
  207. gns3server/appliances/nokia-vsim.gns3a +47 -0
  208. gns3server/appliances/ntopng.gns3a +24 -0
  209. gns3server/appliances/onos.gns3a +19 -0
  210. gns3server/appliances/op5-monitor.gns3a +72 -0
  211. gns3server/appliances/open-media-vault.gns3a +120 -0
  212. gns3server/appliances/openbsd.gns3a +44 -0
  213. gns3server/appliances/opennac.gns3a +45 -0
  214. gns3server/appliances/opensuse.gns3a +47 -0
  215. gns3server/appliances/openvswitch-management.gns3a +21 -0
  216. gns3server/appliances/openvswitch.gns3a +21 -0
  217. gns3server/appliances/openwrt-realview.gns3a +56 -0
  218. gns3server/appliances/openwrt.gns3a +359 -0
  219. gns3server/appliances/opnsense.gns3a +122 -0
  220. gns3server/appliances/oracle-linux-cloud.gns3a +115 -0
  221. gns3server/appliances/ostinato-wireshark.gns3a +20 -0
  222. gns3server/appliances/ostinato.gns3a +75 -0
  223. gns3server/appliances/ovs-snmp.gns3a +18 -0
  224. gns3server/appliances/packetfence-zen.gns3a +151 -0
  225. gns3server/appliances/pan-vm-fw.gns3a +241 -0
  226. gns3server/appliances/parrot-os.gns3a +68 -0
  227. gns3server/appliances/pfsense.gns3a +122 -0
  228. gns3server/appliances/proxmox-mg.gns3a +69 -0
  229. gns3server/appliances/puppy-linux.gns3a +82 -0
  230. gns3server/appliances/python-go-perl-php.gns3a +17 -0
  231. gns3server/appliances/raspian.gns3a +79 -0
  232. gns3server/appliances/reactos.gns3a +67 -0
  233. gns3server/appliances/rhel.gns3a +207 -0
  234. gns3server/appliances/riverbed-steelhead-ng-vcx.gns3a +68 -0
  235. gns3server/appliances/rockylinux.gns3a +100 -0
  236. gns3server/appliances/security-onion.gns3a +108 -0
  237. gns3server/appliances/smoothwall.gns3a +54 -0
  238. gns3server/appliances/sophos-iview.gns3a +66 -0
  239. gns3server/appliances/sophos-utm.gns3a +263 -0
  240. gns3server/appliances/sophos-xg.gns3a +198 -0
  241. gns3server/appliances/stonework.gns3a +21 -0
  242. gns3server/appliances/tacacs-gui.gns3a +57 -0
  243. gns3server/appliances/tinycore-linux.gns3a +73 -0
  244. gns3server/appliances/trendmicro-imsva.gns3a +54 -0
  245. gns3server/appliances/trendmicro-iwsva.gns3a +53 -0
  246. gns3server/appliances/truenas.gns3a +104 -0
  247. gns3server/appliances/turnkey-wordpress.gns3a +20 -0
  248. gns3server/appliances/ubuntu-cloud.gns3a +116 -0
  249. gns3server/appliances/ubuntu-docker.gns3a +20 -0
  250. gns3server/appliances/ubuntu-gui.gns3a +98 -0
  251. gns3server/appliances/untangle.gns3a +208 -0
  252. gns3server/appliances/viptela-edge-genericx86-64.gns3a +84 -0
  253. gns3server/appliances/viptela-smart-genericx86-64.gns3a +82 -0
  254. gns3server/appliances/viptela-vmanage-genericx86-64.gns3a +95 -0
  255. gns3server/appliances/vpp.gns3a +45 -0
  256. gns3server/appliances/vrin.gns3a +118 -0
  257. gns3server/appliances/vyos.gns3a +179 -0
  258. gns3server/appliances/watchguard-fireboxv.gns3a +45 -0
  259. gns3server/appliances/watchguard-xtmv.gns3a +45 -0
  260. gns3server/appliances/webterm.gns3a +20 -0
  261. gns3server/appliances/windows-11-dev-env.gns3a +74 -0
  262. gns3server/appliances/windows-xp+ie.gns3a +52 -0
  263. gns3server/appliances/windows.gns3a +125 -0
  264. gns3server/appliances/windows_server.gns3a +83 -0
  265. gns3server/appliances/zentyal-server.gns3a +159 -0
  266. gns3server/appliances/zeroshell.gns3a +103 -0
  267. gns3server/compute/__init__.py +38 -0
  268. gns3server/compute/adapters/__init__.py +0 -0
  269. gns3server/compute/adapters/adapter.py +104 -0
  270. gns3server/compute/adapters/ethernet_adapter.py +33 -0
  271. gns3server/compute/adapters/serial_adapter.py +32 -0
  272. gns3server/compute/base_manager.py +547 -0
  273. gns3server/compute/base_node.py +979 -0
  274. gns3server/compute/builtin/__init__.py +46 -0
  275. gns3server/compute/builtin/builtin_node_factory.py +42 -0
  276. gns3server/compute/builtin/nodes/__init__.py +0 -0
  277. gns3server/compute/builtin/nodes/cloud.py +548 -0
  278. gns3server/compute/builtin/nodes/ethernet_hub.py +104 -0
  279. gns3server/compute/builtin/nodes/ethernet_switch.py +104 -0
  280. gns3server/compute/builtin/nodes/nat.py +97 -0
  281. gns3server/compute/compute_error.py +48 -0
  282. gns3server/compute/docker/__init__.py +320 -0
  283. gns3server/compute/docker/docker_error.py +33 -0
  284. gns3server/compute/docker/docker_vm.py +1378 -0
  285. gns3server/compute/docker/resources/bin/udhcpc +15 -0
  286. gns3server/compute/docker/resources/etc/udhcpc/default.script +138 -0
  287. gns3server/compute/docker/resources/init.sh +102 -0
  288. gns3server/compute/docker/resources/run-cmd.sh +6 -0
  289. gns3server/compute/dynamips/__init__.py +661 -0
  290. gns3server/compute/dynamips/adapters/__init__.py +0 -0
  291. gns3server/compute/dynamips/adapters/adapter.py +165 -0
  292. gns3server/compute/dynamips/adapters/c1700_mb_1fe.py +36 -0
  293. gns3server/compute/dynamips/adapters/c1700_mb_wic1.py +37 -0
  294. gns3server/compute/dynamips/adapters/c2600_mb_1e.py +36 -0
  295. gns3server/compute/dynamips/adapters/c2600_mb_1fe.py +37 -0
  296. gns3server/compute/dynamips/adapters/c2600_mb_2e.py +36 -0
  297. gns3server/compute/dynamips/adapters/c2600_mb_2fe.py +36 -0
  298. gns3server/compute/dynamips/adapters/c7200_io_2fe.py +36 -0
  299. gns3server/compute/dynamips/adapters/c7200_io_fe.py +36 -0
  300. gns3server/compute/dynamips/adapters/c7200_io_ge_e.py +36 -0
  301. gns3server/compute/dynamips/adapters/gt96100_fe.py +31 -0
  302. gns3server/compute/dynamips/adapters/leopard_2fe.py +37 -0
  303. gns3server/compute/dynamips/adapters/nm_16esw.py +32 -0
  304. gns3server/compute/dynamips/adapters/nm_1e.py +32 -0
  305. gns3server/compute/dynamips/adapters/nm_1fe_tx.py +32 -0
  306. gns3server/compute/dynamips/adapters/nm_4e.py +32 -0
  307. gns3server/compute/dynamips/adapters/nm_4t.py +32 -0
  308. gns3server/compute/dynamips/adapters/pa_2fe_tx.py +32 -0
  309. gns3server/compute/dynamips/adapters/pa_4e.py +32 -0
  310. gns3server/compute/dynamips/adapters/pa_4t.py +32 -0
  311. gns3server/compute/dynamips/adapters/pa_8e.py +32 -0
  312. gns3server/compute/dynamips/adapters/pa_8t.py +32 -0
  313. gns3server/compute/dynamips/adapters/pa_a1.py +32 -0
  314. gns3server/compute/dynamips/adapters/pa_fe_tx.py +32 -0
  315. gns3server/compute/dynamips/adapters/pa_ge.py +32 -0
  316. gns3server/compute/dynamips/adapters/pa_pos_oc3.py +32 -0
  317. gns3server/compute/dynamips/adapters/wic_1enet.py +40 -0
  318. gns3server/compute/dynamips/adapters/wic_1t.py +40 -0
  319. gns3server/compute/dynamips/adapters/wic_2t.py +40 -0
  320. gns3server/compute/dynamips/dynamips_error.py +26 -0
  321. gns3server/compute/dynamips/dynamips_factory.py +71 -0
  322. gns3server/compute/dynamips/dynamips_hypervisor.py +333 -0
  323. gns3server/compute/dynamips/hypervisor.py +210 -0
  324. gns3server/compute/dynamips/nios/__init__.py +0 -0
  325. gns3server/compute/dynamips/nios/nio.py +352 -0
  326. gns3server/compute/dynamips/nios/nio_generic_ethernet.py +73 -0
  327. gns3server/compute/dynamips/nios/nio_linux_ethernet.py +72 -0
  328. gns3server/compute/dynamips/nios/nio_null.py +51 -0
  329. gns3server/compute/dynamips/nios/nio_tap.py +66 -0
  330. gns3server/compute/dynamips/nios/nio_udp.py +136 -0
  331. gns3server/compute/dynamips/nios/nio_unix.py +88 -0
  332. gns3server/compute/dynamips/nios/nio_vde.py +88 -0
  333. gns3server/compute/dynamips/nodes/__init__.py +0 -0
  334. gns3server/compute/dynamips/nodes/atm_switch.py +514 -0
  335. gns3server/compute/dynamips/nodes/bridge.py +107 -0
  336. gns3server/compute/dynamips/nodes/c1700.py +160 -0
  337. gns3server/compute/dynamips/nodes/c2600.py +171 -0
  338. gns3server/compute/dynamips/nodes/c2691.py +112 -0
  339. gns3server/compute/dynamips/nodes/c3600.py +155 -0
  340. gns3server/compute/dynamips/nodes/c3725.py +112 -0
  341. gns3server/compute/dynamips/nodes/c3745.py +112 -0
  342. gns3server/compute/dynamips/nodes/c7200.py +268 -0
  343. gns3server/compute/dynamips/nodes/device.py +134 -0
  344. gns3server/compute/dynamips/nodes/ethernet_hub.py +241 -0
  345. gns3server/compute/dynamips/nodes/ethernet_switch.py +496 -0
  346. gns3server/compute/dynamips/nodes/frame_relay_switch.py +379 -0
  347. gns3server/compute/dynamips/nodes/router.py +1797 -0
  348. gns3server/compute/error.py +40 -0
  349. gns3server/compute/iou/__init__.py +64 -0
  350. gns3server/compute/iou/iou_error.py +25 -0
  351. gns3server/compute/iou/iou_vm.py +1482 -0
  352. gns3server/compute/iou/utils/__init__.py +0 -0
  353. gns3server/compute/iou/utils/iou_export.py +233 -0
  354. gns3server/compute/iou/utils/iou_import.py +232 -0
  355. gns3server/compute/nios/__init__.py +0 -0
  356. gns3server/compute/nios/nio.py +120 -0
  357. gns3server/compute/nios/nio_ethernet.py +56 -0
  358. gns3server/compute/nios/nio_tap.py +56 -0
  359. gns3server/compute/nios/nio_udp.py +82 -0
  360. gns3server/compute/notification_manager.py +73 -0
  361. gns3server/compute/port_manager.py +402 -0
  362. gns3server/compute/project.py +434 -0
  363. gns3server/compute/project_manager.py +122 -0
  364. gns3server/compute/qemu/__init__.py +304 -0
  365. gns3server/compute/qemu/qemu_error.py +26 -0
  366. gns3server/compute/qemu/qemu_vm.py +2697 -0
  367. gns3server/compute/qemu/resources/config.img.zip +0 -0
  368. gns3server/compute/qemu/utils/__init__.py +0 -0
  369. gns3server/compute/qemu/utils/guest_cid.py +38 -0
  370. gns3server/compute/qemu/utils/qcow2.py +138 -0
  371. gns3server/compute/qemu/utils/ziputils.py +55 -0
  372. gns3server/compute/ubridge/__init__.py +0 -0
  373. gns3server/compute/ubridge/hypervisor.py +256 -0
  374. gns3server/compute/ubridge/ubridge_error.py +32 -0
  375. gns3server/compute/ubridge/ubridge_hypervisor.py +285 -0
  376. gns3server/compute/virtualbox/__init__.py +212 -0
  377. gns3server/compute/virtualbox/virtualbox_error.py +26 -0
  378. gns3server/compute/virtualbox/virtualbox_vm.py +1255 -0
  379. gns3server/compute/vmware/__init__.py +725 -0
  380. gns3server/compute/vmware/vmware_error.py +26 -0
  381. gns3server/compute/vmware/vmware_vm.py +1007 -0
  382. gns3server/compute/vpcs/__init__.py +91 -0
  383. gns3server/compute/vpcs/vpcs_error.py +26 -0
  384. gns3server/compute/vpcs/vpcs_vm.py +595 -0
  385. gns3server/config.py +284 -0
  386. gns3server/config_samples/gns3_server.conf +160 -0
  387. gns3server/configs/ios_base_startup-config.txt +26 -0
  388. gns3server/configs/ios_etherswitch_startup-config.txt +181 -0
  389. gns3server/configs/iou_l2_base_startup-config.txt +133 -0
  390. gns3server/configs/iou_l3_base_startup-config.txt +109 -0
  391. gns3server/configs/vpcs_base_config.txt +9 -0
  392. gns3server/controller/__init__.py +691 -0
  393. gns3server/controller/appliance.py +86 -0
  394. gns3server/controller/appliance_manager.py +486 -0
  395. gns3server/controller/appliance_to_template.py +132 -0
  396. gns3server/controller/compute.py +677 -0
  397. gns3server/controller/controller_error.py +77 -0
  398. gns3server/controller/drawing.py +229 -0
  399. gns3server/controller/export_project.py +336 -0
  400. gns3server/controller/gns3vm/__init__.py +412 -0
  401. gns3server/controller/gns3vm/base_gns3_vm.py +303 -0
  402. gns3server/controller/gns3vm/gns3_vm_error.py +28 -0
  403. gns3server/controller/gns3vm/hyperv_gns3_vm.py +346 -0
  404. gns3server/controller/gns3vm/remote_gns3_vm.py +73 -0
  405. gns3server/controller/gns3vm/virtualbox_gns3_vm.py +480 -0
  406. gns3server/controller/gns3vm/vmware_gns3_vm.py +216 -0
  407. gns3server/controller/import_project.py +332 -0
  408. gns3server/controller/link.py +461 -0
  409. gns3server/controller/node.py +840 -0
  410. gns3server/controller/notification.py +149 -0
  411. gns3server/controller/ports/__init__.py +0 -0
  412. gns3server/controller/ports/atm_port.py +51 -0
  413. gns3server/controller/ports/ethernet_port.py +49 -0
  414. gns3server/controller/ports/fastethernet_port.py +43 -0
  415. gns3server/controller/ports/frame_relay_port.py +43 -0
  416. gns3server/controller/ports/gigabitethernet_port.py +43 -0
  417. gns3server/controller/ports/port.py +109 -0
  418. gns3server/controller/ports/port_factory.py +213 -0
  419. gns3server/controller/ports/pos_port.py +52 -0
  420. gns3server/controller/ports/serial_port.py +63 -0
  421. gns3server/controller/project.py +1399 -0
  422. gns3server/controller/snapshot.py +140 -0
  423. gns3server/controller/symbol_themes.py +153 -0
  424. gns3server/controller/symbols.py +168 -0
  425. gns3server/controller/topology.py +788 -0
  426. gns3server/controller/udp_link.py +245 -0
  427. gns3server/core/__init__.py +0 -0
  428. gns3server/core/tasks.py +99 -0
  429. gns3server/crash_report.py +167 -0
  430. gns3server/db/__init__.py +0 -0
  431. gns3server/db/models/__init__.py +38 -0
  432. gns3server/db/models/acl.py +46 -0
  433. gns3server/db/models/base.py +117 -0
  434. gns3server/db/models/computes.py +33 -0
  435. gns3server/db/models/images.py +43 -0
  436. gns3server/db/models/pools.py +52 -0
  437. gns3server/db/models/privileges.py +359 -0
  438. gns3server/db/models/roles.py +57 -0
  439. gns3server/db/models/templates.py +272 -0
  440. gns3server/db/models/users.py +94 -0
  441. gns3server/db/repositories/__init__.py +0 -0
  442. gns3server/db/repositories/base.py +24 -0
  443. gns3server/db/repositories/computes.py +93 -0
  444. gns3server/db/repositories/images.py +141 -0
  445. gns3server/db/repositories/pools.py +218 -0
  446. gns3server/db/repositories/rbac.py +430 -0
  447. gns3server/db/repositories/templates.py +172 -0
  448. gns3server/db/repositories/users.py +289 -0
  449. gns3server/db/tasks.py +230 -0
  450. gns3server/db_migrations/README +5 -0
  451. gns3server/db_migrations/env.py +101 -0
  452. gns3server/db_migrations/script.py.mako +24 -0
  453. gns3server/db_migrations/versions/7ceeddd9c9a8_init.py +28 -0
  454. gns3server/db_migrations/versions/9a5292aa4389_add_mac_address_field_in_docker_.py +27 -0
  455. gns3server/disks/OVMF.fd +0 -0
  456. gns3server/disks/OVMF_CODE.fd +0 -0
  457. gns3server/disks/OVMF_VARS.fd +0 -0
  458. gns3server/disks/empty100G.qcow2 +0 -0
  459. gns3server/disks/empty10G.qcow2 +0 -0
  460. gns3server/disks/empty150G.qcow2 +0 -0
  461. gns3server/disks/empty1T.qcow2 +0 -0
  462. gns3server/disks/empty200G.qcow2 +0 -0
  463. gns3server/disks/empty20G.qcow2 +0 -0
  464. gns3server/disks/empty250G.qcow2 +0 -0
  465. gns3server/disks/empty30G.qcow2 +0 -0
  466. gns3server/disks/empty40G.qcow2 +0 -0
  467. gns3server/disks/empty500G.qcow2 +0 -0
  468. gns3server/disks/empty50G.qcow2 +0 -0
  469. gns3server/disks/empty8G.qcow2 +0 -0
  470. gns3server/gns3_server.egg-info/PKG-INFO +307 -0
  471. gns3server/gns3_server.egg-info/SOURCES.txt +0 -0
  472. gns3server/gns3_server.egg-info/dependency_links.txt +1 -0
  473. gns3server/gns3_server.egg-info/entry_points.txt +4 -0
  474. gns3server/gns3_server.egg-info/not-zip-safe +1 -0
  475. gns3server/gns3_server.egg-info/requires.txt +31 -0
  476. gns3server/gns3_server.egg-info/top_level.txt +2 -0
  477. gns3server/logger.py +164 -0
  478. gns3server/main.py +81 -0
  479. gns3server/schemas/__init__.py +85 -0
  480. gns3server/schemas/common.py +71 -0
  481. gns3server/schemas/compute/__init__.py +0 -0
  482. gns3server/schemas/compute/atm_switch_nodes.py +55 -0
  483. gns3server/schemas/compute/cloud_nodes.py +137 -0
  484. gns3server/schemas/compute/docker_nodes.py +75 -0
  485. gns3server/schemas/compute/dynamips_nodes.py +197 -0
  486. gns3server/schemas/compute/ethernet_hub_nodes.py +63 -0
  487. gns3server/schemas/compute/ethernet_switch_nodes.py +100 -0
  488. gns3server/schemas/compute/frame_relay_switch_nodes.py +55 -0
  489. gns3server/schemas/compute/iou_nodes.py +76 -0
  490. gns3server/schemas/compute/nat_nodes.py +122 -0
  491. gns3server/schemas/compute/nios.py +66 -0
  492. gns3server/schemas/compute/qemu_nodes.py +245 -0
  493. gns3server/schemas/compute/virtualbox_nodes.py +97 -0
  494. gns3server/schemas/compute/vmware_nodes.py +102 -0
  495. gns3server/schemas/compute/vpcs_nodes.py +68 -0
  496. gns3server/schemas/config.py +197 -0
  497. gns3server/schemas/controller/__init__.py +0 -0
  498. gns3server/schemas/controller/appliances.py +466 -0
  499. gns3server/schemas/controller/base.py +25 -0
  500. gns3server/schemas/controller/capabilities.py +34 -0
  501. gns3server/schemas/controller/computes.py +168 -0
  502. gns3server/schemas/controller/drawings.py +34 -0
  503. gns3server/schemas/controller/gns3vm.py +56 -0
  504. gns3server/schemas/controller/images.py +44 -0
  505. gns3server/schemas/controller/iou_license.py +23 -0
  506. gns3server/schemas/controller/labels.py +30 -0
  507. gns3server/schemas/controller/links.py +94 -0
  508. gns3server/schemas/controller/nodes.py +177 -0
  509. gns3server/schemas/controller/pools.py +81 -0
  510. gns3server/schemas/controller/projects.py +116 -0
  511. gns3server/schemas/controller/rbac.py +113 -0
  512. gns3server/schemas/controller/snapshots.py +42 -0
  513. gns3server/schemas/controller/templates/__init__.py +83 -0
  514. gns3server/schemas/controller/templates/cloud_templates.py +44 -0
  515. gns3server/schemas/controller/templates/docker_templates.py +59 -0
  516. gns3server/schemas/controller/templates/dynamips_templates.py +199 -0
  517. gns3server/schemas/controller/templates/ethernet_hub_templates.py +46 -0
  518. gns3server/schemas/controller/templates/ethernet_switch_templates.py +57 -0
  519. gns3server/schemas/controller/templates/iou_templates.py +47 -0
  520. gns3server/schemas/controller/templates/qemu_templates.py +94 -0
  521. gns3server/schemas/controller/templates/virtualbox_templates.py +64 -0
  522. gns3server/schemas/controller/templates/vmware_templates.py +61 -0
  523. gns3server/schemas/controller/templates/vpcs_templates.py +39 -0
  524. gns3server/schemas/controller/tokens.py +29 -0
  525. gns3server/schemas/controller/topology.py +82 -0
  526. gns3server/schemas/controller/users.py +105 -0
  527. gns3server/schemas/link.py +0 -0
  528. gns3server/schemas/qemu_disk_image.py +103 -0
  529. gns3server/schemas/version.py +25 -0
  530. gns3server/server.py +348 -0
  531. gns3server/services/__init__.py +19 -0
  532. gns3server/services/authentication.py +83 -0
  533. gns3server/services/computes.py +82 -0
  534. gns3server/services/templates.py +329 -0
  535. gns3server/static/.gitkeep +0 -0
  536. gns3server/static/favicon.ico +0 -0
  537. gns3server/static/redoc.standalone.js +1782 -0
  538. gns3server/static/swagger-ui-bundle.js +2 -0
  539. gns3server/static/swagger-ui.css +3 -0
  540. gns3server/static/web-ui/3rdpartylicenses.txt +2604 -0
  541. gns3server/static/web-ui/465.92c7ab880f2504d3.js +1 -0
  542. gns3server/static/web-ui/MaterialIcons-Regular.196fa4a92dd6fa73.ttf +0 -0
  543. gns3server/static/web-ui/MaterialIcons-Regular.1e50f5c2ffa6aba4.eot +0 -0
  544. gns3server/static/web-ui/MaterialIcons-Regular.7ea2023eeca07427.woff2 +0 -0
  545. gns3server/static/web-ui/MaterialIcons-Regular.db852539204b1a34.woff +0 -0
  546. gns3server/static/web-ui/NotoSans-Bold.635e9291df1a5a00.woff2 +0 -0
  547. gns3server/static/web-ui/NotoSans-Bold.885427cced6d8c94.woff +0 -0
  548. gns3server/static/web-ui/NotoSans-Bold.93203a43bc93ad9c.svg +8453 -0
  549. gns3server/static/web-ui/NotoSans-Bold.a7ab189a45f553b4.eot +0 -0
  550. gns3server/static/web-ui/NotoSans-Bold.e989c11744b36f58.ttf +0 -0
  551. gns3server/static/web-ui/NotoSans-BoldItalic.2baf33b639fc86a4.woff +0 -0
  552. gns3server/static/web-ui/NotoSans-BoldItalic.2eea9ba02e25c1d3.ttf +0 -0
  553. gns3server/static/web-ui/NotoSans-BoldItalic.46a5eec91da0d900.svg +8453 -0
  554. gns3server/static/web-ui/NotoSans-BoldItalic.7fdef73b477daa73.eot +0 -0
  555. gns3server/static/web-ui/NotoSans-BoldItalic.c62f70f121f271aa.woff2 +0 -0
  556. gns3server/static/web-ui/NotoSans-Italic.219ee88e5bc4e168.ttf +0 -0
  557. gns3server/static/web-ui/NotoSans-Italic.3d6f7cf772169c8d.svg +8453 -0
  558. gns3server/static/web-ui/NotoSans-Italic.77cd3818b5a2cb97.woff +0 -0
  559. gns3server/static/web-ui/NotoSans-Italic.85194585ae9d8c36.eot +0 -0
  560. gns3server/static/web-ui/NotoSans-Italic.eee02500e81db981.woff2 +0 -0
  561. gns3server/static/web-ui/NotoSans-Regular.156b7584192d70ed.eot +0 -0
  562. gns3server/static/web-ui/NotoSans-Regular.374d132a6803e279.woff2 +0 -0
  563. gns3server/static/web-ui/NotoSans-Regular.595e3f5876719740.woff +0 -0
  564. gns3server/static/web-ui/NotoSans-Regular.bb384defbe36eaec.svg +8453 -0
  565. gns3server/static/web-ui/NotoSans-Regular.e6139cb1663a1c57.ttf +0 -0
  566. gns3server/static/web-ui/ReleaseNotes.txt +179 -0
  567. gns3server/static/web-ui/assets/favicon.ico +0 -0
  568. gns3server/static/web-ui/assets/gns3_icon.svg +88 -0
  569. gns3server/static/web-ui/assets/gns3_icon_black.svg +88 -0
  570. gns3server/static/web-ui/assets/icons/mac/icon.icns +0 -0
  571. gns3server/static/web-ui/assets/icons/png/1024x1024.png +0 -0
  572. gns3server/static/web-ui/assets/icons/png/128x128.png +0 -0
  573. gns3server/static/web-ui/assets/icons/png/16x16.png +0 -0
  574. gns3server/static/web-ui/assets/icons/png/24x24.png +0 -0
  575. gns3server/static/web-ui/assets/icons/png/256x256.png +0 -0
  576. gns3server/static/web-ui/assets/icons/png/32x32.png +0 -0
  577. gns3server/static/web-ui/assets/icons/png/48x48.png +0 -0
  578. gns3server/static/web-ui/assets/icons/png/512x512.png +0 -0
  579. gns3server/static/web-ui/assets/icons/png/64x64.png +0 -0
  580. gns3server/static/web-ui/assets/icons/win/icon.ico +0 -0
  581. gns3server/static/web-ui/assets/logo-header.png +0 -0
  582. gns3server/static/web-ui/assets/resources/images/filter-capture.svg +428 -0
  583. gns3server/static/web-ui/assets/resources/images/filter.svg +708 -0
  584. gns3server/static/web-ui/assets/resources/images/inspect.svg +312 -0
  585. gns3server/static/web-ui/assets/resources/images/pause.svg +752 -0
  586. gns3server/static/web-ui/favicon.ico +0 -0
  587. gns3server/static/web-ui/index.html +51 -0
  588. gns3server/static/web-ui/main.f802edd2b8c6db1d.js +1 -0
  589. gns3server/static/web-ui/polyfills.319c79dd175e50d0.js +1 -0
  590. gns3server/static/web-ui/roboto-latin-100.539f0a96b40596f7.woff2 +0 -0
  591. gns3server/static/web-ui/roboto-latin-100.5ba994dac3e79ea8.woff +0 -0
  592. gns3server/static/web-ui/roboto-latin-100italic.41ba64219cb743c9.woff2 +0 -0
  593. gns3server/static/web-ui/roboto-latin-100italic.d61e7e8b07c0638c.woff +0 -0
  594. gns3server/static/web-ui/roboto-latin-300.4d8f8086236bad80.woff2 +0 -0
  595. gns3server/static/web-ui/roboto-latin-300.6c1bc461047e61f5.woff +0 -0
  596. gns3server/static/web-ui/roboto-latin-300italic.3a529751a590d3c1.woff +0 -0
  597. gns3server/static/web-ui/roboto-latin-300italic.45164643b3bd5824.woff2 +0 -0
  598. gns3server/static/web-ui/roboto-latin-400.1e2d4d3a272629cd.woff2 +0 -0
  599. gns3server/static/web-ui/roboto-latin-400.7e4a045b9373d9c1.woff +0 -0
  600. gns3server/static/web-ui/roboto-latin-400italic.68431199e5b90ea8.woff +0 -0
  601. gns3server/static/web-ui/roboto-latin-400italic.bb3c6955c4334c8a.woff2 +0 -0
  602. gns3server/static/web-ui/roboto-latin-500.1dfbc3dbf815e3f3.woff2 +0 -0
  603. gns3server/static/web-ui/roboto-latin-500.e21fe97fd2329ff7.woff +0 -0
  604. gns3server/static/web-ui/roboto-latin-500italic.7543a42b12b1452f.woff2 +0 -0
  605. gns3server/static/web-ui/roboto-latin-500italic.aaff6867154023d3.woff +0 -0
  606. gns3server/static/web-ui/roboto-latin-700.02633003129d1e63.woff +0 -0
  607. gns3server/static/web-ui/roboto-latin-700.12893bfc0762b0f3.woff2 +0 -0
  608. gns3server/static/web-ui/roboto-latin-700italic.bc7179e004e40113.woff2 +0 -0
  609. gns3server/static/web-ui/roboto-latin-700italic.e53062e27c63fafb.woff +0 -0
  610. gns3server/static/web-ui/roboto-latin-900.282ba77fda1349f3.woff2 +0 -0
  611. gns3server/static/web-ui/roboto-latin-900.4962e810cbb4d3e5.woff +0 -0
  612. gns3server/static/web-ui/roboto-latin-900italic.2394134a78bbaef8.woff +0 -0
  613. gns3server/static/web-ui/roboto-latin-900italic.9c1f80840351fa12.woff2 +0 -0
  614. gns3server/static/web-ui/runtime.24fa95b7061d7056.js +1 -0
  615. gns3server/static/web-ui/styles.6e966072487df0b7.css +5 -0
  616. gns3server/symbols/.gitkeep +0 -0
  617. gns3server/symbols/affinity/circle/blue/atm.svg +5 -0
  618. gns3server/symbols/affinity/circle/blue/bug.svg +8 -0
  619. gns3server/symbols/affinity/circle/blue/camera.svg +5 -0
  620. gns3server/symbols/affinity/circle/blue/camera_dome.svg +8 -0
  621. gns3server/symbols/affinity/circle/blue/client.svg +5 -0
  622. gns3server/symbols/affinity/circle/blue/client_vm.svg +6 -0
  623. gns3server/symbols/affinity/circle/blue/cloud.svg +5 -0
  624. gns3server/symbols/affinity/circle/blue/coffee.svg +6 -0
  625. gns3server/symbols/affinity/circle/blue/cog.svg +5 -0
  626. gns3server/symbols/affinity/circle/blue/communications.svg +5 -0
  627. gns3server/symbols/affinity/circle/blue/conversation.svg +12 -0
  628. gns3server/symbols/affinity/circle/blue/dna.svg +7 -0
  629. gns3server/symbols/affinity/circle/blue/dna2.svg +7 -0
  630. gns3server/symbols/affinity/circle/blue/docker.svg +11 -0
  631. gns3server/symbols/affinity/circle/blue/dslam.svg +5 -0
  632. gns3server/symbols/affinity/circle/blue/factory.svg +6 -0
  633. gns3server/symbols/affinity/circle/blue/fingerprint.svg +5 -0
  634. gns3server/symbols/affinity/circle/blue/firewall.svg +5 -0
  635. gns3server/symbols/affinity/circle/blue/firewall3.svg +5 -0
  636. gns3server/symbols/affinity/circle/blue/globe.svg +5 -0
  637. gns3server/symbols/affinity/circle/blue/grid.svg +5 -0
  638. gns3server/symbols/affinity/circle/blue/grid2.svg +5 -0
  639. gns3server/symbols/affinity/circle/blue/health.svg +5 -0
  640. gns3server/symbols/affinity/circle/blue/house.svg +9 -0
  641. gns3server/symbols/affinity/circle/blue/hub.svg +5 -0
  642. gns3server/symbols/affinity/circle/blue/inspect.svg +7 -0
  643. gns3server/symbols/affinity/circle/blue/inspect2.svg +6 -0
  644. gns3server/symbols/affinity/circle/blue/interconnect.svg +5 -0
  645. gns3server/symbols/affinity/circle/blue/ip_phone.svg +21 -0
  646. gns3server/symbols/affinity/circle/blue/isdn.svg +5 -0
  647. gns3server/symbols/affinity/circle/blue/laptop.svg +6 -0
  648. gns3server/symbols/affinity/circle/blue/ldap.svg +5 -0
  649. gns3server/symbols/affinity/circle/blue/light_bulb.svg +11 -0
  650. gns3server/symbols/affinity/circle/blue/link.svg +5 -0
  651. gns3server/symbols/affinity/circle/blue/loadbalancer.svg +5 -0
  652. gns3server/symbols/affinity/circle/blue/nas.svg +5 -0
  653. gns3server/symbols/affinity/circle/blue/nat.svg +60 -0
  654. gns3server/symbols/affinity/circle/blue/nat2.svg +55 -0
  655. gns3server/symbols/affinity/circle/blue/office.svg +5 -0
  656. gns3server/symbols/affinity/circle/blue/optical.svg +8 -0
  657. gns3server/symbols/affinity/circle/blue/phone_cloud.svg +6 -0
  658. gns3server/symbols/affinity/circle/blue/phone_old.svg +5 -0
  659. gns3server/symbols/affinity/circle/blue/phone_wireless.svg +8 -0
  660. gns3server/symbols/affinity/circle/blue/pinpoint.svg +5 -0
  661. gns3server/symbols/affinity/circle/blue/printer.svg +7 -0
  662. gns3server/symbols/affinity/circle/blue/rj45.svg +5 -0
  663. gns3server/symbols/affinity/circle/blue/router.svg +5 -0
  664. gns3server/symbols/affinity/circle/blue/router2.svg +5 -0
  665. gns3server/symbols/affinity/circle/blue/router_cloud.svg +6 -0
  666. gns3server/symbols/affinity/circle/blue/satellite.svg +6 -0
  667. gns3server/symbols/affinity/circle/blue/satellite_dish.svg +7 -0
  668. gns3server/symbols/affinity/circle/blue/scull.svg +8 -0
  669. gns3server/symbols/affinity/circle/blue/server.svg +5 -0
  670. gns3server/symbols/affinity/circle/blue/server_cluster.svg +7 -0
  671. gns3server/symbols/affinity/circle/blue/shield.svg +7 -0
  672. gns3server/symbols/affinity/circle/blue/statistics.svg +7 -0
  673. gns3server/symbols/affinity/circle/blue/storage.svg +5 -0
  674. gns3server/symbols/affinity/circle/blue/switch.svg +8 -0
  675. gns3server/symbols/affinity/circle/blue/switch_multilayer.svg +5 -0
  676. gns3server/symbols/affinity/circle/blue/tablet.svg +11 -0
  677. gns3server/symbols/affinity/circle/blue/template.svg +4 -0
  678. gns3server/symbols/affinity/circle/blue/tree.svg +5 -0
  679. gns3server/symbols/affinity/circle/blue/user.svg +7 -0
  680. gns3server/symbols/affinity/circle/blue/virtualbox.svg +7 -0
  681. gns3server/symbols/affinity/circle/blue/vm.svg +7 -0
  682. gns3server/symbols/affinity/circle/blue/vmware.svg +7 -0
  683. gns3server/symbols/affinity/circle/blue/vrf.svg +8 -0
  684. gns3server/symbols/affinity/circle/blue/wifi.svg +5 -0
  685. gns3server/symbols/affinity/circle/blue/wlc.svg +5 -0
  686. gns3server/symbols/affinity/circle/blue/xml.svg +5 -0
  687. gns3server/symbols/affinity/circle/gray/atm.svg +5 -0
  688. gns3server/symbols/affinity/circle/gray/bug.svg +8 -0
  689. gns3server/symbols/affinity/circle/gray/camera.svg +5 -0
  690. gns3server/symbols/affinity/circle/gray/camera_dome.svg +8 -0
  691. gns3server/symbols/affinity/circle/gray/client.svg +5 -0
  692. gns3server/symbols/affinity/circle/gray/client_vm.svg +6 -0
  693. gns3server/symbols/affinity/circle/gray/cloud.svg +5 -0
  694. gns3server/symbols/affinity/circle/gray/coffee.svg +6 -0
  695. gns3server/symbols/affinity/circle/gray/cog.svg +5 -0
  696. gns3server/symbols/affinity/circle/gray/communications.svg +5 -0
  697. gns3server/symbols/affinity/circle/gray/conversation.svg +12 -0
  698. gns3server/symbols/affinity/circle/gray/dna.svg +7 -0
  699. gns3server/symbols/affinity/circle/gray/dna2.svg +7 -0
  700. gns3server/symbols/affinity/circle/gray/docker.svg +11 -0
  701. gns3server/symbols/affinity/circle/gray/dslam.svg +5 -0
  702. gns3server/symbols/affinity/circle/gray/factory.svg +7 -0
  703. gns3server/symbols/affinity/circle/gray/fingerprint.svg +5 -0
  704. gns3server/symbols/affinity/circle/gray/firewall.svg +5 -0
  705. gns3server/symbols/affinity/circle/gray/firewall3.svg +5 -0
  706. gns3server/symbols/affinity/circle/gray/globe.svg +5 -0
  707. gns3server/symbols/affinity/circle/gray/grid.svg +5 -0
  708. gns3server/symbols/affinity/circle/gray/grid2.svg +5 -0
  709. gns3server/symbols/affinity/circle/gray/health.svg +5 -0
  710. gns3server/symbols/affinity/circle/gray/house.svg +9 -0
  711. gns3server/symbols/affinity/circle/gray/hub.svg +5 -0
  712. gns3server/symbols/affinity/circle/gray/inspect.svg +7 -0
  713. gns3server/symbols/affinity/circle/gray/inspect2.svg +6 -0
  714. gns3server/symbols/affinity/circle/gray/interconnect.svg +5 -0
  715. gns3server/symbols/affinity/circle/gray/ip_phone.svg +21 -0
  716. gns3server/symbols/affinity/circle/gray/isdn.svg +5 -0
  717. gns3server/symbols/affinity/circle/gray/laptop.svg +6 -0
  718. gns3server/symbols/affinity/circle/gray/ldap.svg +5 -0
  719. gns3server/symbols/affinity/circle/gray/light_bulb.svg +11 -0
  720. gns3server/symbols/affinity/circle/gray/link.svg +5 -0
  721. gns3server/symbols/affinity/circle/gray/loadbalancer.svg +5 -0
  722. gns3server/symbols/affinity/circle/gray/nas.svg +5 -0
  723. gns3server/symbols/affinity/circle/gray/nat.svg +60 -0
  724. gns3server/symbols/affinity/circle/gray/nat2.svg +55 -0
  725. gns3server/symbols/affinity/circle/gray/office.svg +5 -0
  726. gns3server/symbols/affinity/circle/gray/optical.svg +8 -0
  727. gns3server/symbols/affinity/circle/gray/phone_cloud.svg +6 -0
  728. gns3server/symbols/affinity/circle/gray/phone_old.svg +5 -0
  729. gns3server/symbols/affinity/circle/gray/phone_wireless.svg +8 -0
  730. gns3server/symbols/affinity/circle/gray/pinpoint.svg +5 -0
  731. gns3server/symbols/affinity/circle/gray/printer.svg +25 -0
  732. gns3server/symbols/affinity/circle/gray/rj45.svg +5 -0
  733. gns3server/symbols/affinity/circle/gray/router.svg +5 -0
  734. gns3server/symbols/affinity/circle/gray/router2.svg +5 -0
  735. gns3server/symbols/affinity/circle/gray/router_cloud.svg +6 -0
  736. gns3server/symbols/affinity/circle/gray/satellite.svg +6 -0
  737. gns3server/symbols/affinity/circle/gray/satellite_dish.svg +7 -0
  738. gns3server/symbols/affinity/circle/gray/scull.svg +8 -0
  739. gns3server/symbols/affinity/circle/gray/server.svg +5 -0
  740. gns3server/symbols/affinity/circle/gray/server_cluster.svg +7 -0
  741. gns3server/symbols/affinity/circle/gray/shield.svg +7 -0
  742. gns3server/symbols/affinity/circle/gray/statistics.svg +7 -0
  743. gns3server/symbols/affinity/circle/gray/storage.svg +5 -0
  744. gns3server/symbols/affinity/circle/gray/switch.svg +8 -0
  745. gns3server/symbols/affinity/circle/gray/switch_multilayer.svg +5 -0
  746. gns3server/symbols/affinity/circle/gray/tablet.svg +11 -0
  747. gns3server/symbols/affinity/circle/gray/template.svg +4 -0
  748. gns3server/symbols/affinity/circle/gray/tree.svg +5 -0
  749. gns3server/symbols/affinity/circle/gray/user.svg +7 -0
  750. gns3server/symbols/affinity/circle/gray/virtualbox.svg +7 -0
  751. gns3server/symbols/affinity/circle/gray/vm.svg +7 -0
  752. gns3server/symbols/affinity/circle/gray/vmware.svg +7 -0
  753. gns3server/symbols/affinity/circle/gray/vrf.svg +8 -0
  754. gns3server/symbols/affinity/circle/gray/wifi.svg +5 -0
  755. gns3server/symbols/affinity/circle/gray/wlc.svg +5 -0
  756. gns3server/symbols/affinity/circle/gray/xml.svg +5 -0
  757. gns3server/symbols/affinity/circle/green/atm.svg +5 -0
  758. gns3server/symbols/affinity/circle/green/bug.svg +8 -0
  759. gns3server/symbols/affinity/circle/green/camera.svg +5 -0
  760. gns3server/symbols/affinity/circle/green/camera_dome.svg +8 -0
  761. gns3server/symbols/affinity/circle/green/client.svg +5 -0
  762. gns3server/symbols/affinity/circle/green/client_vm.svg +6 -0
  763. gns3server/symbols/affinity/circle/green/cloud.svg +5 -0
  764. gns3server/symbols/affinity/circle/green/coffee.svg +6 -0
  765. gns3server/symbols/affinity/circle/green/cog.svg +5 -0
  766. gns3server/symbols/affinity/circle/green/communications.svg +5 -0
  767. gns3server/symbols/affinity/circle/green/conversation.svg +12 -0
  768. gns3server/symbols/affinity/circle/green/dna.svg +7 -0
  769. gns3server/symbols/affinity/circle/green/dna2.svg +7 -0
  770. gns3server/symbols/affinity/circle/green/docker.svg +11 -0
  771. gns3server/symbols/affinity/circle/green/dslam.svg +5 -0
  772. gns3server/symbols/affinity/circle/green/factory.svg +6 -0
  773. gns3server/symbols/affinity/circle/green/fingerprint.svg +5 -0
  774. gns3server/symbols/affinity/circle/green/firewall.svg +5 -0
  775. gns3server/symbols/affinity/circle/green/firewall3.svg +5 -0
  776. gns3server/symbols/affinity/circle/green/globe.svg +5 -0
  777. gns3server/symbols/affinity/circle/green/grid.svg +5 -0
  778. gns3server/symbols/affinity/circle/green/grid2.svg +5 -0
  779. gns3server/symbols/affinity/circle/green/health.svg +5 -0
  780. gns3server/symbols/affinity/circle/green/house.svg +9 -0
  781. gns3server/symbols/affinity/circle/green/hub.svg +5 -0
  782. gns3server/symbols/affinity/circle/green/inspect.svg +7 -0
  783. gns3server/symbols/affinity/circle/green/inspect2.svg +6 -0
  784. gns3server/symbols/affinity/circle/green/interconnect.svg +5 -0
  785. gns3server/symbols/affinity/circle/green/ip_phone.svg +21 -0
  786. gns3server/symbols/affinity/circle/green/isdn.svg +5 -0
  787. gns3server/symbols/affinity/circle/green/laptop.svg +6 -0
  788. gns3server/symbols/affinity/circle/green/ldap.svg +5 -0
  789. gns3server/symbols/affinity/circle/green/light_bulb.svg +11 -0
  790. gns3server/symbols/affinity/circle/green/link.svg +5 -0
  791. gns3server/symbols/affinity/circle/green/loadbalancer.svg +5 -0
  792. gns3server/symbols/affinity/circle/green/nas.svg +5 -0
  793. gns3server/symbols/affinity/circle/green/nat.svg +60 -0
  794. gns3server/symbols/affinity/circle/green/nat2.svg +55 -0
  795. gns3server/symbols/affinity/circle/green/office.svg +5 -0
  796. gns3server/symbols/affinity/circle/green/optical.svg +8 -0
  797. gns3server/symbols/affinity/circle/green/phone_cloud.svg +6 -0
  798. gns3server/symbols/affinity/circle/green/phone_old.svg +5 -0
  799. gns3server/symbols/affinity/circle/green/phone_wireless.svg +8 -0
  800. gns3server/symbols/affinity/circle/green/pinpoint.svg +5 -0
  801. gns3server/symbols/affinity/circle/green/printer.svg +7 -0
  802. gns3server/symbols/affinity/circle/green/rj45.svg +5 -0
  803. gns3server/symbols/affinity/circle/green/router.svg +5 -0
  804. gns3server/symbols/affinity/circle/green/router2.svg +5 -0
  805. gns3server/symbols/affinity/circle/green/router_cloud.svg +6 -0
  806. gns3server/symbols/affinity/circle/green/satellite.svg +6 -0
  807. gns3server/symbols/affinity/circle/green/satellite_dish.svg +7 -0
  808. gns3server/symbols/affinity/circle/green/scull.svg +8 -0
  809. gns3server/symbols/affinity/circle/green/server.svg +5 -0
  810. gns3server/symbols/affinity/circle/green/server_cluster.svg +7 -0
  811. gns3server/symbols/affinity/circle/green/shield.svg +7 -0
  812. gns3server/symbols/affinity/circle/green/statistics.svg +7 -0
  813. gns3server/symbols/affinity/circle/green/storage.svg +5 -0
  814. gns3server/symbols/affinity/circle/green/switch.svg +8 -0
  815. gns3server/symbols/affinity/circle/green/switch_multilayer.svg +5 -0
  816. gns3server/symbols/affinity/circle/green/tablet.svg +11 -0
  817. gns3server/symbols/affinity/circle/green/template.svg +4 -0
  818. gns3server/symbols/affinity/circle/green/tree.svg +5 -0
  819. gns3server/symbols/affinity/circle/green/user.svg +7 -0
  820. gns3server/symbols/affinity/circle/green/virtualbox.svg +7 -0
  821. gns3server/symbols/affinity/circle/green/vm.svg +7 -0
  822. gns3server/symbols/affinity/circle/green/vmware.svg +7 -0
  823. gns3server/symbols/affinity/circle/green/vrf.svg +8 -0
  824. gns3server/symbols/affinity/circle/green/wifi.svg +5 -0
  825. gns3server/symbols/affinity/circle/green/wlc.svg +5 -0
  826. gns3server/symbols/affinity/circle/green/xml.svg +5 -0
  827. gns3server/symbols/affinity/circle/red/atm.svg +5 -0
  828. gns3server/symbols/affinity/circle/red/bug.svg +8 -0
  829. gns3server/symbols/affinity/circle/red/camera.svg +5 -0
  830. gns3server/symbols/affinity/circle/red/camera_dome.svg +8 -0
  831. gns3server/symbols/affinity/circle/red/client.svg +5 -0
  832. gns3server/symbols/affinity/circle/red/client_vm.svg +6 -0
  833. gns3server/symbols/affinity/circle/red/cloud.svg +5 -0
  834. gns3server/symbols/affinity/circle/red/coffee.svg +6 -0
  835. gns3server/symbols/affinity/circle/red/cog.svg +5 -0
  836. gns3server/symbols/affinity/circle/red/communications.svg +5 -0
  837. gns3server/symbols/affinity/circle/red/conversation.svg +12 -0
  838. gns3server/symbols/affinity/circle/red/dna.svg +7 -0
  839. gns3server/symbols/affinity/circle/red/dna2.svg +7 -0
  840. gns3server/symbols/affinity/circle/red/docker.svg +11 -0
  841. gns3server/symbols/affinity/circle/red/dslam.svg +5 -0
  842. gns3server/symbols/affinity/circle/red/factory.svg +6 -0
  843. gns3server/symbols/affinity/circle/red/fingerprint.svg +5 -0
  844. gns3server/symbols/affinity/circle/red/firewall.svg +5 -0
  845. gns3server/symbols/affinity/circle/red/firewall3.svg +5 -0
  846. gns3server/symbols/affinity/circle/red/globe.svg +5 -0
  847. gns3server/symbols/affinity/circle/red/grid.svg +5 -0
  848. gns3server/symbols/affinity/circle/red/grid2.svg +5 -0
  849. gns3server/symbols/affinity/circle/red/health.svg +5 -0
  850. gns3server/symbols/affinity/circle/red/house.svg +9 -0
  851. gns3server/symbols/affinity/circle/red/hub.svg +5 -0
  852. gns3server/symbols/affinity/circle/red/inspect.svg +7 -0
  853. gns3server/symbols/affinity/circle/red/inspect2.svg +6 -0
  854. gns3server/symbols/affinity/circle/red/interconnect.svg +5 -0
  855. gns3server/symbols/affinity/circle/red/ip_phone.svg +21 -0
  856. gns3server/symbols/affinity/circle/red/isdn.svg +5 -0
  857. gns3server/symbols/affinity/circle/red/laptop.svg +6 -0
  858. gns3server/symbols/affinity/circle/red/ldap.svg +5 -0
  859. gns3server/symbols/affinity/circle/red/light_bulb.svg +11 -0
  860. gns3server/symbols/affinity/circle/red/link.svg +5 -0
  861. gns3server/symbols/affinity/circle/red/loadbalancer.svg +5 -0
  862. gns3server/symbols/affinity/circle/red/nas.svg +5 -0
  863. gns3server/symbols/affinity/circle/red/nat.svg +60 -0
  864. gns3server/symbols/affinity/circle/red/nat2.svg +55 -0
  865. gns3server/symbols/affinity/circle/red/office.svg +5 -0
  866. gns3server/symbols/affinity/circle/red/optical.svg +8 -0
  867. gns3server/symbols/affinity/circle/red/phone_cloud.svg +6 -0
  868. gns3server/symbols/affinity/circle/red/phone_old.svg +5 -0
  869. gns3server/symbols/affinity/circle/red/phone_wireless.svg +8 -0
  870. gns3server/symbols/affinity/circle/red/pinpoint.svg +5 -0
  871. gns3server/symbols/affinity/circle/red/printer.svg +7 -0
  872. gns3server/symbols/affinity/circle/red/rj45.svg +5 -0
  873. gns3server/symbols/affinity/circle/red/router.svg +5 -0
  874. gns3server/symbols/affinity/circle/red/router2.svg +5 -0
  875. gns3server/symbols/affinity/circle/red/router_cloud.svg +6 -0
  876. gns3server/symbols/affinity/circle/red/satellite.svg +6 -0
  877. gns3server/symbols/affinity/circle/red/satellite_dish.svg +7 -0
  878. gns3server/symbols/affinity/circle/red/scull.svg +8 -0
  879. gns3server/symbols/affinity/circle/red/server.svg +5 -0
  880. gns3server/symbols/affinity/circle/red/server_cluster.svg +7 -0
  881. gns3server/symbols/affinity/circle/red/shield.svg +7 -0
  882. gns3server/symbols/affinity/circle/red/statistics.svg +7 -0
  883. gns3server/symbols/affinity/circle/red/storage.svg +5 -0
  884. gns3server/symbols/affinity/circle/red/switch.svg +8 -0
  885. gns3server/symbols/affinity/circle/red/switch_multilayer.svg +5 -0
  886. gns3server/symbols/affinity/circle/red/tablet.svg +11 -0
  887. gns3server/symbols/affinity/circle/red/template.svg +4 -0
  888. gns3server/symbols/affinity/circle/red/tree.svg +5 -0
  889. gns3server/symbols/affinity/circle/red/user.svg +7 -0
  890. gns3server/symbols/affinity/circle/red/virtualbox.svg +7 -0
  891. gns3server/symbols/affinity/circle/red/vm.svg +7 -0
  892. gns3server/symbols/affinity/circle/red/vmware.svg +7 -0
  893. gns3server/symbols/affinity/circle/red/vrf.svg +8 -0
  894. gns3server/symbols/affinity/circle/red/wifi.svg +5 -0
  895. gns3server/symbols/affinity/circle/red/wlc.svg +5 -0
  896. gns3server/symbols/affinity/circle/red/xml.svg +5 -0
  897. gns3server/symbols/affinity/square/blue/atm.svg +5 -0
  898. gns3server/symbols/affinity/square/blue/bug.svg +5 -0
  899. gns3server/symbols/affinity/square/blue/camera.svg +12 -0
  900. gns3server/symbols/affinity/square/blue/camera_dome.svg +8 -0
  901. gns3server/symbols/affinity/square/blue/client.svg +8 -0
  902. gns3server/symbols/affinity/square/blue/client_vm.svg +8 -0
  903. gns3server/symbols/affinity/square/blue/cloud.svg +12 -0
  904. gns3server/symbols/affinity/square/blue/coffee.svg +5 -0
  905. gns3server/symbols/affinity/square/blue/cog.svg +8 -0
  906. gns3server/symbols/affinity/square/blue/communications.svg +8 -0
  907. gns3server/symbols/affinity/square/blue/conversation.svg +12 -0
  908. gns3server/symbols/affinity/square/blue/dna.svg +7 -0
  909. gns3server/symbols/affinity/square/blue/dna2.svg +7 -0
  910. gns3server/symbols/affinity/square/blue/docker.svg +11 -0
  911. gns3server/symbols/affinity/square/blue/dslam.svg +8 -0
  912. gns3server/symbols/affinity/square/blue/factory.svg +5 -0
  913. gns3server/symbols/affinity/square/blue/fingerprint.svg +9 -0
  914. gns3server/symbols/affinity/square/blue/firewall.svg +7 -0
  915. gns3server/symbols/affinity/square/blue/firewall3.svg +6 -0
  916. gns3server/symbols/affinity/square/blue/globe.svg +5 -0
  917. gns3server/symbols/affinity/square/blue/grid.svg +7 -0
  918. gns3server/symbols/affinity/square/blue/grid2.svg +7 -0
  919. gns3server/symbols/affinity/square/blue/health.svg +5 -0
  920. gns3server/symbols/affinity/square/blue/house.svg +6 -0
  921. gns3server/symbols/affinity/square/blue/hub.svg +7 -0
  922. gns3server/symbols/affinity/square/blue/inspect.svg +5 -0
  923. gns3server/symbols/affinity/square/blue/inspect2.svg +9 -0
  924. gns3server/symbols/affinity/square/blue/interconnect.svg +8 -0
  925. gns3server/symbols/affinity/square/blue/ip_phone.svg +23 -0
  926. gns3server/symbols/affinity/square/blue/isdn.svg +7 -0
  927. gns3server/symbols/affinity/square/blue/laptop.svg +8 -0
  928. gns3server/symbols/affinity/square/blue/ldap.svg +5 -0
  929. gns3server/symbols/affinity/square/blue/light_bulb.svg +11 -0
  930. gns3server/symbols/affinity/square/blue/link.svg +5 -0
  931. gns3server/symbols/affinity/square/blue/loadbalancer.svg +5 -0
  932. gns3server/symbols/affinity/square/blue/nas.svg +7 -0
  933. gns3server/symbols/affinity/square/blue/nat.svg +58 -0
  934. gns3server/symbols/affinity/square/blue/nat2.svg +74 -0
  935. gns3server/symbols/affinity/square/blue/office.svg +5 -0
  936. gns3server/symbols/affinity/square/blue/optical.svg +8 -0
  937. gns3server/symbols/affinity/square/blue/phone_cloud.svg +8 -0
  938. gns3server/symbols/affinity/square/blue/phone_old.svg +7 -0
  939. gns3server/symbols/affinity/square/blue/phone_wireless.svg +10 -0
  940. gns3server/symbols/affinity/square/blue/pinpoint.svg +9 -0
  941. gns3server/symbols/affinity/square/blue/printer.svg +27 -0
  942. gns3server/symbols/affinity/square/blue/rj45.svg +14 -0
  943. gns3server/symbols/affinity/square/blue/router.svg +7 -0
  944. gns3server/symbols/affinity/square/blue/router2.svg +5 -0
  945. gns3server/symbols/affinity/square/blue/router_cloud.svg +7 -0
  946. gns3server/symbols/affinity/square/blue/satellite.svg +8 -0
  947. gns3server/symbols/affinity/square/blue/satellite_dish.svg +7 -0
  948. gns3server/symbols/affinity/square/blue/scull.svg +10 -0
  949. gns3server/symbols/affinity/square/blue/server.svg +5 -0
  950. gns3server/symbols/affinity/square/blue/server_cluster.svg +9 -0
  951. gns3server/symbols/affinity/square/blue/shield.svg +5 -0
  952. gns3server/symbols/affinity/square/blue/statistics.svg +7 -0
  953. gns3server/symbols/affinity/square/blue/storage.svg +7 -0
  954. gns3server/symbols/affinity/square/blue/switch.svg +10 -0
  955. gns3server/symbols/affinity/square/blue/switch_multilayer.svg +8 -0
  956. gns3server/symbols/affinity/square/blue/tablet.svg +9 -0
  957. gns3server/symbols/affinity/square/blue/template.svg +4 -0
  958. gns3server/symbols/affinity/square/blue/tree.svg +5 -0
  959. gns3server/symbols/affinity/square/blue/user.svg +7 -0
  960. gns3server/symbols/affinity/square/blue/virtualbox.svg +7 -0
  961. gns3server/symbols/affinity/square/blue/vm.svg +7 -0
  962. gns3server/symbols/affinity/square/blue/vmware.svg +7 -0
  963. gns3server/symbols/affinity/square/blue/vrf.svg +5 -0
  964. gns3server/symbols/affinity/square/blue/wifi.svg +13 -0
  965. gns3server/symbols/affinity/square/blue/wlc.svg +7 -0
  966. gns3server/symbols/affinity/square/blue/xml.svg +10 -0
  967. gns3server/symbols/affinity/square/gray/atm.svg +5 -0
  968. gns3server/symbols/affinity/square/gray/bug.svg +5 -0
  969. gns3server/symbols/affinity/square/gray/camera.svg +12 -0
  970. gns3server/symbols/affinity/square/gray/camera_dome.svg +8 -0
  971. gns3server/symbols/affinity/square/gray/client.svg +8 -0
  972. gns3server/symbols/affinity/square/gray/client_vm.svg +8 -0
  973. gns3server/symbols/affinity/square/gray/cloud.svg +12 -0
  974. gns3server/symbols/affinity/square/gray/coffee.svg +5 -0
  975. gns3server/symbols/affinity/square/gray/cog.svg +8 -0
  976. gns3server/symbols/affinity/square/gray/communications.svg +8 -0
  977. gns3server/symbols/affinity/square/gray/conversation.svg +12 -0
  978. gns3server/symbols/affinity/square/gray/dna.svg +7 -0
  979. gns3server/symbols/affinity/square/gray/dna2.svg +7 -0
  980. gns3server/symbols/affinity/square/gray/docker.svg +11 -0
  981. gns3server/symbols/affinity/square/gray/dslam.svg +8 -0
  982. gns3server/symbols/affinity/square/gray/factory.svg +5 -0
  983. gns3server/symbols/affinity/square/gray/fingerprint.svg +9 -0
  984. gns3server/symbols/affinity/square/gray/firewall.svg +7 -0
  985. gns3server/symbols/affinity/square/gray/firewall3.svg +6 -0
  986. gns3server/symbols/affinity/square/gray/globe.svg +5 -0
  987. gns3server/symbols/affinity/square/gray/grid.svg +7 -0
  988. gns3server/symbols/affinity/square/gray/grid2.svg +7 -0
  989. gns3server/symbols/affinity/square/gray/health.svg +5 -0
  990. gns3server/symbols/affinity/square/gray/house.svg +6 -0
  991. gns3server/symbols/affinity/square/gray/hub.svg +7 -0
  992. gns3server/symbols/affinity/square/gray/inspect.svg +5 -0
  993. gns3server/symbols/affinity/square/gray/inspect2.svg +9 -0
  994. gns3server/symbols/affinity/square/gray/interconnect.svg +8 -0
  995. gns3server/symbols/affinity/square/gray/ip_phone.svg +23 -0
  996. gns3server/symbols/affinity/square/gray/isdn.svg +7 -0
  997. gns3server/symbols/affinity/square/gray/laptop.svg +8 -0
  998. gns3server/symbols/affinity/square/gray/ldap.svg +5 -0
  999. gns3server/symbols/affinity/square/gray/light_bulb.svg +11 -0
  1000. gns3server/symbols/affinity/square/gray/link.svg +5 -0
  1001. gns3server/symbols/affinity/square/gray/loadbalancer.svg +5 -0
  1002. gns3server/symbols/affinity/square/gray/nas.svg +7 -0
  1003. gns3server/symbols/affinity/square/gray/nat.svg +58 -0
  1004. gns3server/symbols/affinity/square/gray/nat2.svg +74 -0
  1005. gns3server/symbols/affinity/square/gray/office.svg +5 -0
  1006. gns3server/symbols/affinity/square/gray/optical.svg +8 -0
  1007. gns3server/symbols/affinity/square/gray/phone_cloud.svg +8 -0
  1008. gns3server/symbols/affinity/square/gray/phone_old.svg +7 -0
  1009. gns3server/symbols/affinity/square/gray/phone_wireless.svg +10 -0
  1010. gns3server/symbols/affinity/square/gray/pinpoint.svg +9 -0
  1011. gns3server/symbols/affinity/square/gray/printer.svg +27 -0
  1012. gns3server/symbols/affinity/square/gray/rj45.svg +14 -0
  1013. gns3server/symbols/affinity/square/gray/router.svg +7 -0
  1014. gns3server/symbols/affinity/square/gray/router2.svg +5 -0
  1015. gns3server/symbols/affinity/square/gray/router_cloud.svg +7 -0
  1016. gns3server/symbols/affinity/square/gray/satellite.svg +8 -0
  1017. gns3server/symbols/affinity/square/gray/satellite_dish.svg +7 -0
  1018. gns3server/symbols/affinity/square/gray/scull.svg +10 -0
  1019. gns3server/symbols/affinity/square/gray/server.svg +5 -0
  1020. gns3server/symbols/affinity/square/gray/server_cluster.svg +9 -0
  1021. gns3server/symbols/affinity/square/gray/shield.svg +5 -0
  1022. gns3server/symbols/affinity/square/gray/statistics.svg +7 -0
  1023. gns3server/symbols/affinity/square/gray/storage.svg +5 -0
  1024. gns3server/symbols/affinity/square/gray/switch.svg +10 -0
  1025. gns3server/symbols/affinity/square/gray/switch_multilayer.svg +9 -0
  1026. gns3server/symbols/affinity/square/gray/tablet.svg +9 -0
  1027. gns3server/symbols/affinity/square/gray/template.svg +4 -0
  1028. gns3server/symbols/affinity/square/gray/tree.svg +5 -0
  1029. gns3server/symbols/affinity/square/gray/user.svg +7 -0
  1030. gns3server/symbols/affinity/square/gray/virtualbox.svg +7 -0
  1031. gns3server/symbols/affinity/square/gray/vm.svg +7 -0
  1032. gns3server/symbols/affinity/square/gray/vmware.svg +7 -0
  1033. gns3server/symbols/affinity/square/gray/vrf.svg +5 -0
  1034. gns3server/symbols/affinity/square/gray/wifi.svg +13 -0
  1035. gns3server/symbols/affinity/square/gray/wlc.svg +7 -0
  1036. gns3server/symbols/affinity/square/gray/xml.svg +10 -0
  1037. gns3server/symbols/affinity/square/green/atm.svg +5 -0
  1038. gns3server/symbols/affinity/square/green/bug.svg +5 -0
  1039. gns3server/symbols/affinity/square/green/camera.svg +5 -0
  1040. gns3server/symbols/affinity/square/green/camera_dome.svg +8 -0
  1041. gns3server/symbols/affinity/square/green/client.svg +5 -0
  1042. gns3server/symbols/affinity/square/green/client_vm.svg +6 -0
  1043. gns3server/symbols/affinity/square/green/cloud.svg +12 -0
  1044. gns3server/symbols/affinity/square/green/coffee.svg +5 -0
  1045. gns3server/symbols/affinity/square/green/cog.svg +5 -0
  1046. gns3server/symbols/affinity/square/green/communications.svg +5 -0
  1047. gns3server/symbols/affinity/square/green/conversation.svg +12 -0
  1048. gns3server/symbols/affinity/square/green/dna.svg +7 -0
  1049. gns3server/symbols/affinity/square/green/dna2.svg +7 -0
  1050. gns3server/symbols/affinity/square/green/docker.svg +11 -0
  1051. gns3server/symbols/affinity/square/green/dslam.svg +5 -0
  1052. gns3server/symbols/affinity/square/green/factory.svg +5 -0
  1053. gns3server/symbols/affinity/square/green/fingerprint.svg +5 -0
  1054. gns3server/symbols/affinity/square/green/firewall.svg +5 -0
  1055. gns3server/symbols/affinity/square/green/firewall3.svg +5 -0
  1056. gns3server/symbols/affinity/square/green/globe.svg +5 -0
  1057. gns3server/symbols/affinity/square/green/grid.svg +5 -0
  1058. gns3server/symbols/affinity/square/green/grid2.svg +5 -0
  1059. gns3server/symbols/affinity/square/green/health.svg +5 -0
  1060. gns3server/symbols/affinity/square/green/house.svg +6 -0
  1061. gns3server/symbols/affinity/square/green/hub.svg +5 -0
  1062. gns3server/symbols/affinity/square/green/inspect.svg +5 -0
  1063. gns3server/symbols/affinity/square/green/inspect2.svg +5 -0
  1064. gns3server/symbols/affinity/square/green/interconnect.svg +5 -0
  1065. gns3server/symbols/affinity/square/green/ip_phone.svg +7 -0
  1066. gns3server/symbols/affinity/square/green/isdn.svg +5 -0
  1067. gns3server/symbols/affinity/square/green/laptop.svg +8 -0
  1068. gns3server/symbols/affinity/square/green/ldap.svg +5 -0
  1069. gns3server/symbols/affinity/square/green/light_bulb.svg +5 -0
  1070. gns3server/symbols/affinity/square/green/link.svg +5 -0
  1071. gns3server/symbols/affinity/square/green/loadbalancer.svg +5 -0
  1072. gns3server/symbols/affinity/square/green/nas.svg +5 -0
  1073. gns3server/symbols/affinity/square/green/nat.svg +58 -0
  1074. gns3server/symbols/affinity/square/green/nat2.svg +74 -0
  1075. gns3server/symbols/affinity/square/green/office.svg +5 -0
  1076. gns3server/symbols/affinity/square/green/optical.svg +8 -0
  1077. gns3server/symbols/affinity/square/green/phone_cloud.svg +6 -0
  1078. gns3server/symbols/affinity/square/green/phone_old.svg +5 -0
  1079. gns3server/symbols/affinity/square/green/phone_wireless.svg +5 -0
  1080. gns3server/symbols/affinity/square/green/pinpoint.svg +5 -0
  1081. gns3server/symbols/affinity/square/green/printer.svg +27 -0
  1082. gns3server/symbols/affinity/square/green/rj45.svg +5 -0
  1083. gns3server/symbols/affinity/square/green/router.svg +5 -0
  1084. gns3server/symbols/affinity/square/green/router2.svg +5 -0
  1085. gns3server/symbols/affinity/square/green/router_cloud.svg +6 -0
  1086. gns3server/symbols/affinity/square/green/satellite.svg +5 -0
  1087. gns3server/symbols/affinity/square/green/satellite_dish.svg +5 -0
  1088. gns3server/symbols/affinity/square/green/scull.svg +8 -0
  1089. gns3server/symbols/affinity/square/green/server.svg +5 -0
  1090. gns3server/symbols/affinity/square/green/server_cluster.svg +7 -0
  1091. gns3server/symbols/affinity/square/green/shield.svg +5 -0
  1092. gns3server/symbols/affinity/square/green/statistics.svg +5 -0
  1093. gns3server/symbols/affinity/square/green/storage.svg +5 -0
  1094. gns3server/symbols/affinity/square/green/switch.svg +10 -0
  1095. gns3server/symbols/affinity/square/green/switch_multilayer.svg +5 -0
  1096. gns3server/symbols/affinity/square/green/tablet.svg +9 -0
  1097. gns3server/symbols/affinity/square/green/template.svg +4 -0
  1098. gns3server/symbols/affinity/square/green/tree.svg +5 -0
  1099. gns3server/symbols/affinity/square/green/user.svg +7 -0
  1100. gns3server/symbols/affinity/square/green/virtualbox.svg +7 -0
  1101. gns3server/symbols/affinity/square/green/vm.svg +7 -0
  1102. gns3server/symbols/affinity/square/green/vmware.svg +7 -0
  1103. gns3server/symbols/affinity/square/green/vrf.svg +5 -0
  1104. gns3server/symbols/affinity/square/green/wifi.svg +5 -0
  1105. gns3server/symbols/affinity/square/green/wlc.svg +5 -0
  1106. gns3server/symbols/affinity/square/green/xml.svg +5 -0
  1107. gns3server/symbols/affinity/square/red/atm.svg +5 -0
  1108. gns3server/symbols/affinity/square/red/bug.svg +5 -0
  1109. gns3server/symbols/affinity/square/red/camera.svg +12 -0
  1110. gns3server/symbols/affinity/square/red/camera_dome.svg +8 -0
  1111. gns3server/symbols/affinity/square/red/client.svg +8 -0
  1112. gns3server/symbols/affinity/square/red/client_vm.svg +8 -0
  1113. gns3server/symbols/affinity/square/red/cloud.svg +12 -0
  1114. gns3server/symbols/affinity/square/red/coffee.svg +5 -0
  1115. gns3server/symbols/affinity/square/red/cog.svg +8 -0
  1116. gns3server/symbols/affinity/square/red/communications.svg +8 -0
  1117. gns3server/symbols/affinity/square/red/conversation.svg +12 -0
  1118. gns3server/symbols/affinity/square/red/dna.svg +7 -0
  1119. gns3server/symbols/affinity/square/red/dna2.svg +7 -0
  1120. gns3server/symbols/affinity/square/red/docker.svg +11 -0
  1121. gns3server/symbols/affinity/square/red/dslam.svg +8 -0
  1122. gns3server/symbols/affinity/square/red/factory.svg +5 -0
  1123. gns3server/symbols/affinity/square/red/fingerprint.svg +9 -0
  1124. gns3server/symbols/affinity/square/red/firewall.svg +7 -0
  1125. gns3server/symbols/affinity/square/red/firewall3.svg +5 -0
  1126. gns3server/symbols/affinity/square/red/globe.svg +5 -0
  1127. gns3server/symbols/affinity/square/red/grid.svg +7 -0
  1128. gns3server/symbols/affinity/square/red/grid2.svg +7 -0
  1129. gns3server/symbols/affinity/square/red/health.svg +5 -0
  1130. gns3server/symbols/affinity/square/red/house.svg +6 -0
  1131. gns3server/symbols/affinity/square/red/hub.svg +7 -0
  1132. gns3server/symbols/affinity/square/red/inspect.svg +5 -0
  1133. gns3server/symbols/affinity/square/red/inspect2.svg +9 -0
  1134. gns3server/symbols/affinity/square/red/interconnect.svg +8 -0
  1135. gns3server/symbols/affinity/square/red/ip_phone.svg +7 -0
  1136. gns3server/symbols/affinity/square/red/isdn.svg +7 -0
  1137. gns3server/symbols/affinity/square/red/laptop.svg +8 -0
  1138. gns3server/symbols/affinity/square/red/ldap.svg +5 -0
  1139. gns3server/symbols/affinity/square/red/light_bulb.svg +5 -0
  1140. gns3server/symbols/affinity/square/red/link.svg +5 -0
  1141. gns3server/symbols/affinity/square/red/loadbalancer.svg +5 -0
  1142. gns3server/symbols/affinity/square/red/nas.svg +7 -0
  1143. gns3server/symbols/affinity/square/red/nat.svg +58 -0
  1144. gns3server/symbols/affinity/square/red/nat2.svg +74 -0
  1145. gns3server/symbols/affinity/square/red/office.svg +5 -0
  1146. gns3server/symbols/affinity/square/red/optical.svg +8 -0
  1147. gns3server/symbols/affinity/square/red/phone_cloud.svg +6 -0
  1148. gns3server/symbols/affinity/square/red/phone_old.svg +5 -0
  1149. gns3server/symbols/affinity/square/red/phone_wireless.svg +5 -0
  1150. gns3server/symbols/affinity/square/red/pinpoint.svg +9 -0
  1151. gns3server/symbols/affinity/square/red/printer.svg +27 -0
  1152. gns3server/symbols/affinity/square/red/rj45.svg +14 -0
  1153. gns3server/symbols/affinity/square/red/router.svg +7 -0
  1154. gns3server/symbols/affinity/square/red/router2.svg +5 -0
  1155. gns3server/symbols/affinity/square/red/router_cloud.svg +6 -0
  1156. gns3server/symbols/affinity/square/red/satellite.svg +8 -0
  1157. gns3server/symbols/affinity/square/red/satellite_dish.svg +5 -0
  1158. gns3server/symbols/affinity/square/red/scull.svg +10 -0
  1159. gns3server/symbols/affinity/square/red/server.svg +5 -0
  1160. gns3server/symbols/affinity/square/red/server_cluster.svg +9 -0
  1161. gns3server/symbols/affinity/square/red/shield.svg +5 -0
  1162. gns3server/symbols/affinity/square/red/statistics.svg +5 -0
  1163. gns3server/symbols/affinity/square/red/storage.svg +7 -0
  1164. gns3server/symbols/affinity/square/red/switch.svg +10 -0
  1165. gns3server/symbols/affinity/square/red/switch_multilayer.svg +9 -0
  1166. gns3server/symbols/affinity/square/red/tablet.svg +9 -0
  1167. gns3server/symbols/affinity/square/red/template.svg +4 -0
  1168. gns3server/symbols/affinity/square/red/tree.svg +5 -0
  1169. gns3server/symbols/affinity/square/red/user.svg +7 -0
  1170. gns3server/symbols/affinity/square/red/virtualbox.svg +7 -0
  1171. gns3server/symbols/affinity/square/red/vm.svg +7 -0
  1172. gns3server/symbols/affinity/square/red/vmware.svg +7 -0
  1173. gns3server/symbols/affinity/square/red/vrf.svg +5 -0
  1174. gns3server/symbols/affinity/square/red/wifi.svg +13 -0
  1175. gns3server/symbols/affinity/square/red/wlc.svg +7 -0
  1176. gns3server/symbols/affinity/square/red/xml.svg +10 -0
  1177. gns3server/symbols/classic/PBX.svg +304 -0
  1178. gns3server/symbols/classic/PIX_firewall.svg +187 -0
  1179. gns3server/symbols/classic/access_point.svg +516 -0
  1180. gns3server/symbols/classic/access_server.svg +270 -0
  1181. gns3server/symbols/classic/asa.svg +424 -0
  1182. gns3server/symbols/classic/atm_bridge.svg +219 -0
  1183. gns3server/symbols/classic/atm_switch.svg +243 -0
  1184. gns3server/symbols/classic/call_manager.svg +228 -0
  1185. gns3server/symbols/classic/cloud.svg +163 -0
  1186. gns3server/symbols/classic/computer.svg +560 -0
  1187. gns3server/symbols/classic/docker_guest.svg +657 -0
  1188. gns3server/symbols/classic/dslam.svg +155 -0
  1189. gns3server/symbols/classic/edge_label_switch_router.svg +216 -0
  1190. gns3server/symbols/classic/ethernet_switch.svg +228 -0
  1191. gns3server/symbols/classic/firewall.svg +187 -0
  1192. gns3server/symbols/classic/frame_relay_switch.svg +263 -0
  1193. gns3server/symbols/classic/gateway.svg +309 -0
  1194. gns3server/symbols/classic/hub.svg +204 -0
  1195. gns3server/symbols/classic/ids.svg +310 -0
  1196. gns3server/symbols/classic/iosv_l2_virl.svg +286 -0
  1197. gns3server/symbols/classic/iosv_virl.svg +394 -0
  1198. gns3server/symbols/classic/ip_phone.svg +171 -0
  1199. gns3server/symbols/classic/label_switch_router.svg +223 -0
  1200. gns3server/symbols/classic/lightweight_ap.svg +536 -0
  1201. gns3server/symbols/classic/multilayer_switch.svg +317 -0
  1202. gns3server/symbols/classic/nat.svg +207 -0
  1203. gns3server/symbols/classic/optical_router.svg +207 -0
  1204. gns3server/symbols/classic/printer.svg +178 -0
  1205. gns3server/symbols/classic/qemu_guest.svg +1387 -0
  1206. gns3server/symbols/classic/route_switch_processor.svg +395 -0
  1207. gns3server/symbols/classic/router.awp.svg +362 -0
  1208. gns3server/symbols/classic/router.svg +203 -0
  1209. gns3server/symbols/classic/router_firewall.svg +395 -0
  1210. gns3server/symbols/classic/router_netflow.svg +215 -0
  1211. gns3server/symbols/classic/server.svg +226 -0
  1212. gns3server/symbols/classic/sip_server.svg +305 -0
  1213. gns3server/symbols/classic/traceng.svg +610 -0
  1214. gns3server/symbols/classic/vbox_guest.svg +7691 -0
  1215. gns3server/symbols/classic/vmware_guest.svg +572 -0
  1216. gns3server/symbols/classic/voice_access_server.svg +289 -0
  1217. gns3server/symbols/classic/voice_router.svg +223 -0
  1218. gns3server/symbols/classic/vpcs_guest.svg +574 -0
  1219. gns3server/symbols/classic/wlan_controller.svg +528 -0
  1220. gns3server/templates/compute.html +62 -0
  1221. gns3server/templates/controller.html +55 -0
  1222. gns3server/templates/index.html +12 -0
  1223. gns3server/templates/layout.html +20 -0
  1224. gns3server/templates/project.html +91 -0
  1225. gns3server/templates/upload.html +6 -0
  1226. gns3server/utils/__init__.py +123 -0
  1227. gns3server/utils/application_id.py +49 -0
  1228. gns3server/utils/asyncio/__init__.py +148 -0
  1229. gns3server/utils/asyncio/aiozipstream.py +528 -0
  1230. gns3server/utils/asyncio/embed_shell.py +369 -0
  1231. gns3server/utils/asyncio/input_stream.py +408 -0
  1232. gns3server/utils/asyncio/pool.py +69 -0
  1233. gns3server/utils/asyncio/raw_command_server.py +140 -0
  1234. gns3server/utils/asyncio/serial.py +87 -0
  1235. gns3server/utils/asyncio/telnet_server.py +450 -0
  1236. gns3server/utils/cpu_percent.py +46 -0
  1237. gns3server/utils/file_watcher.py +103 -0
  1238. gns3server/utils/get_resource.py +48 -0
  1239. gns3server/utils/hostname.py +112 -0
  1240. gns3server/utils/http_client.py +71 -0
  1241. gns3server/utils/images.py +378 -0
  1242. gns3server/utils/interfaces.py +254 -0
  1243. gns3server/utils/notification_queue.py +79 -0
  1244. gns3server/utils/path.py +76 -0
  1245. gns3server/utils/picture.py +146 -0
  1246. gns3server/utils/qt.py +44 -0
  1247. gns3server/utils/vmnet.py +277 -0
  1248. gns3server/utils/zipfile_zstd/__init__.py +10 -0
  1249. gns3server/utils/zipfile_zstd/_patcher.py +20 -0
  1250. gns3server/utils/zipfile_zstd/_zipfile.py +64 -0
  1251. gns3server/version.py +36 -0
@@ -0,0 +1,979 @@
1
+ #
2
+ # Copyright (C) 2015 GNS3 Technologies Inc.
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+ import sys
18
+ import os
19
+ import stat
20
+ import shutil
21
+ import asyncio
22
+ import tempfile
23
+ import psutil
24
+ import platform
25
+ import re
26
+
27
+ from fastapi import WebSocketDisconnect
28
+ from gns3server.utils.interfaces import interfaces
29
+ from gns3server.compute.compute_error import ComputeError
30
+ from ..compute.port_manager import PortManager
31
+ from ..utils.asyncio import wait_run_in_executor, locking
32
+ from ..utils.asyncio.telnet_server import AsyncioTelnetServer
33
+ from gns3server.compute.ubridge.hypervisor import Hypervisor
34
+ from gns3server.compute.ubridge.ubridge_error import UbridgeError
35
+ from .nios.nio_udp import NIOUDP
36
+ from .error import NodeError
37
+
38
+ import logging
39
+
40
+ log = logging.getLogger(__name__)
41
+
42
+
43
+ class BaseNode:
44
+
45
+ """
46
+ Base node implementation.
47
+
48
+ :param name: name of this node
49
+ :param node_id: Node instance identifier
50
+ :param project: Project instance
51
+ :param manager: parent node manager
52
+ :param console: console TCP port
53
+ :param console_type: console type
54
+ :param aux: auxiliary console TCP port
55
+ :param aux_type: auxiliary console type
56
+ :param linked_clone: The node base image is duplicate/overlay (Each node data are independent)
57
+ :param wrap_console: The console is wrapped using AsyncioTelnetServer
58
+ :param wrap_aux: The auxiliary console is wrapped using AsyncioTelnetServer
59
+ """
60
+
61
+ def __init__(
62
+ self,
63
+ name,
64
+ node_id,
65
+ project,
66
+ manager,
67
+ console=None,
68
+ console_type="telnet",
69
+ aux=None,
70
+ aux_type="none",
71
+ linked_clone=True,
72
+ wrap_console=False,
73
+ wrap_aux=False,
74
+ ):
75
+
76
+ self._name = name
77
+ self._usage = ""
78
+ self._id = node_id
79
+ self._linked_clone = linked_clone
80
+ self._project = project
81
+ self._manager = manager
82
+ self._console = console
83
+ self._aux = aux
84
+ self._console_type = console_type
85
+ self._aux_type = aux_type
86
+ self._temporary_directory = None
87
+ self._hw_virtualization = False
88
+ self._ubridge_hypervisor = None
89
+ self._closed = False
90
+ self._node_status = "stopped"
91
+ self._command_line = ""
92
+ self._wrap_console = wrap_console
93
+ self._wrap_aux = wrap_aux
94
+ self._wrapper_telnet_servers = []
95
+ self._wrap_console_reader = None
96
+ self._wrap_console_writer = None
97
+ self._internal_console_port = None
98
+ self._internal_aux_port = None
99
+ self._custom_adapters = []
100
+ self._ubridge_require_privileged_access = False
101
+
102
+ if self._console is not None:
103
+ # use a previously allocated console port
104
+ if console_type == "vnc":
105
+ vnc_console_start_port_range, vnc_console_end_port_range = self._get_vnc_console_port_range()
106
+ self._console = self._manager.port_manager.reserve_tcp_port(
107
+ self._console,
108
+ self._project,
109
+ port_range_start=vnc_console_start_port_range,
110
+ port_range_end=vnc_console_end_port_range,
111
+ )
112
+ elif console_type == "none":
113
+ self._console = None
114
+ else:
115
+ self._console = self._manager.port_manager.reserve_tcp_port(self._console, self._project)
116
+
117
+ if self._aux is not None:
118
+ # use a previously allocated auxiliary console port
119
+ if aux_type == "vnc":
120
+ # VNC is a special case and the range must be 5900-6000
121
+ self._aux = self._manager.port_manager.reserve_tcp_port(
122
+ self._aux, self._project, port_range_start=5900, port_range_end=6000
123
+ )
124
+ elif aux_type == "none":
125
+ self._aux = None
126
+ else:
127
+ self._aux = self._manager.port_manager.reserve_tcp_port(self._aux, self._project)
128
+
129
+ if self._console is None:
130
+ # allocate a new console
131
+ if console_type == "vnc":
132
+ vnc_console_start_port_range, vnc_console_end_port_range = self._get_vnc_console_port_range()
133
+ self._console = self._manager.port_manager.get_free_tcp_port(
134
+ self._project,
135
+ port_range_start=vnc_console_start_port_range,
136
+ port_range_end=vnc_console_end_port_range,
137
+ )
138
+ elif console_type != "none":
139
+ self._console = self._manager.port_manager.get_free_tcp_port(self._project)
140
+
141
+ if self._aux is None:
142
+ # allocate a new auxiliary console
143
+ if aux_type == "vnc":
144
+ # VNC is a special case and the range must be 5900-6000
145
+ self._aux = self._manager.port_manager.get_free_tcp_port(
146
+ self._project, port_range_start=5900, port_range_end=6000
147
+ )
148
+ elif aux_type != "none":
149
+ self._aux = self._manager.port_manager.get_free_tcp_port(self._project)
150
+
151
+ if self._wrap_console:
152
+ self._internal_console_port = self._manager.port_manager.get_free_tcp_port(self._project)
153
+
154
+ if self._wrap_aux:
155
+ self._internal_aux_port = self._manager.port_manager.get_free_tcp_port(self._project)
156
+
157
+ log.debug(
158
+ "{module}: {name} [{id}] initialized. Console port {console}".format(
159
+ module=self.manager.module_name, name=self.name, id=self.id, console=self._console
160
+ )
161
+ )
162
+
163
+ def __del__(self):
164
+
165
+ if hasattr(self, "_temporary_directory") and self._temporary_directory is not None:
166
+ if os.path.exists(self._temporary_directory):
167
+ shutil.rmtree(self._temporary_directory, ignore_errors=True)
168
+
169
+ @property
170
+ def linked_clone(self):
171
+ return self._linked_clone
172
+
173
+ @linked_clone.setter
174
+ def linked_clone(self, val):
175
+ self._linked_clone = val
176
+
177
+ @property
178
+ def custom_adapters(self):
179
+ return self._custom_adapters
180
+
181
+ @custom_adapters.setter
182
+ def custom_adapters(self, val):
183
+ self._custom_adapters = val
184
+
185
+ @property
186
+ def status(self):
187
+ """
188
+ Returns current node status
189
+ """
190
+
191
+ return self._node_status
192
+
193
+ @status.setter
194
+ def status(self, status):
195
+
196
+ self._node_status = status
197
+ self.updated()
198
+
199
+ def updated(self):
200
+ """
201
+ Sends an updated event
202
+ """
203
+ self.project.emit("node.updated", self)
204
+
205
+ @property
206
+ def command_line(self):
207
+ """
208
+ Returns command used to start the node
209
+ """
210
+
211
+ return self._command_line
212
+
213
+ @command_line.setter
214
+ def command_line(self, command_line):
215
+
216
+ self._command_line = command_line
217
+
218
+ @property
219
+ def project(self):
220
+ """
221
+ Returns the node current project.
222
+
223
+ :returns: Project instance.
224
+ """
225
+
226
+ return self._project
227
+
228
+ @property
229
+ def name(self):
230
+ """
231
+ Returns the name for this node.
232
+
233
+ :returns: name
234
+ """
235
+
236
+ return self._name
237
+
238
+ @name.setter
239
+ def name(self, new_name):
240
+ """
241
+ Sets the name of this node.
242
+
243
+ :param new_name: name
244
+ """
245
+
246
+ log.info(
247
+ "{module}: {name} [{id}] renamed to {new_name}".format(
248
+ module=self.manager.module_name, name=self.name, id=self.id, new_name=new_name
249
+ )
250
+ )
251
+ self._name = new_name
252
+
253
+ @property
254
+ def usage(self):
255
+ """
256
+ Returns the usage for this node.
257
+
258
+ :returns: usage
259
+ """
260
+
261
+ return self._usage
262
+
263
+ @usage.setter
264
+ def usage(self, new_usage):
265
+ """
266
+ Sets the usage of this node.
267
+
268
+ :param new_usage: usage
269
+ """
270
+
271
+ self._usage = new_usage
272
+
273
+ @property
274
+ def id(self):
275
+ """
276
+ Returns the ID for this node.
277
+
278
+ :returns: Node identifier (string)
279
+ """
280
+
281
+ return self._id
282
+
283
+ @property
284
+ def manager(self):
285
+ """
286
+ Returns the manager for this node.
287
+
288
+ :returns: instance of manager
289
+ """
290
+
291
+ return self._manager
292
+
293
+ @property
294
+ def working_dir(self):
295
+ """
296
+ Return the node working directory
297
+ """
298
+
299
+ return self._project.node_working_directory(self)
300
+
301
+ @property
302
+ def working_path(self):
303
+ """
304
+ Return the node working path. Doesn't create structure of directories when not present.
305
+ """
306
+
307
+ return self._project.node_working_path(self)
308
+
309
+ @property
310
+ def temporary_directory(self):
311
+ if self._temporary_directory is None:
312
+ try:
313
+ self._temporary_directory = tempfile.mkdtemp()
314
+ except OSError as e:
315
+ raise NodeError(f"Can't create temporary directory: {e}")
316
+ return self._temporary_directory
317
+
318
+ def create(self):
319
+ """
320
+ Creates the node.
321
+ """
322
+
323
+ log.info("{module}: {name} [{id}] created".format(module=self.manager.module_name, name=self.name, id=self.id))
324
+
325
+ async def delete(self):
326
+ """
327
+ Delete the node (including all its files).
328
+ """
329
+
330
+ def set_rw(operation, name, exc):
331
+ os.chmod(name, stat.S_IWRITE)
332
+
333
+ directory = self.project.node_working_directory(self)
334
+ if os.path.exists(directory):
335
+ try:
336
+ await wait_run_in_executor(shutil.rmtree, directory, onerror=set_rw)
337
+ except OSError as e:
338
+ raise ComputeError(f"Could not delete the node working directory: {e}")
339
+
340
+ def start(self):
341
+ """
342
+ Starts the node process.
343
+ """
344
+
345
+ raise NotImplementedError
346
+
347
+ async def stop(self):
348
+ """
349
+ Stop the node process.
350
+ """
351
+
352
+ await self.stop_wrap_console()
353
+ self.status = "stopped"
354
+
355
+ def suspend(self):
356
+ """
357
+ Suspends the node process.
358
+ """
359
+
360
+ raise NotImplementedError
361
+
362
+ async def close(self):
363
+ """
364
+ Close the node process.
365
+ """
366
+
367
+ if self._closed:
368
+ return False
369
+
370
+ log.info(
371
+ "{module}: '{name}' [{id}]: is closing".format(module=self.manager.module_name, name=self.name, id=self.id)
372
+ )
373
+
374
+ if self._console:
375
+ self._manager.port_manager.release_tcp_port(self._console, self._project)
376
+ self._console = None
377
+ if self._wrap_console:
378
+ self._manager.port_manager.release_tcp_port(self._internal_console_port, self._project)
379
+ self._internal_console_port = None
380
+ if self._aux:
381
+ self._manager.port_manager.release_tcp_port(self._aux, self._project)
382
+ self._aux = None
383
+ if self._wrap_aux:
384
+ self._manager.port_manager.release_tcp_port(self._internal_aux_port, self._project)
385
+ self._internal_aux_port = None
386
+
387
+ self._closed = True
388
+ return True
389
+
390
+ def _get_vnc_console_port_range(self):
391
+ """
392
+ Returns the VNC console port range.
393
+ """
394
+
395
+ vnc_console_start_port_range = self._manager.config.settings.Server.vnc_console_start_port_range
396
+ vnc_console_end_port_range = self._manager.config.settings.Server.vnc_console_end_port_range
397
+
398
+ if not 5900 <= vnc_console_start_port_range <= 65535:
399
+ raise NodeError("The VNC console start port range must be between 5900 and 65535")
400
+ if not 5900 <= vnc_console_end_port_range <= 65535:
401
+ raise NodeError("The VNC console start port range must be between 5900 and 65535")
402
+ if vnc_console_start_port_range >= vnc_console_end_port_range:
403
+ raise NodeError(
404
+ f"The VNC console start port range value ({vnc_console_start_port_range}) "
405
+ f"cannot be above or equal to the end value ({vnc_console_end_port_range})"
406
+ )
407
+
408
+ return vnc_console_start_port_range, vnc_console_end_port_range
409
+
410
+ async def _wrap_telnet_proxy(self, internal_port, external_port):
411
+ """
412
+ Start a telnet proxy for the console allowing multiple telnet clients
413
+ to be connected at the same time
414
+ """
415
+
416
+ remaining_trial = 60
417
+ while True:
418
+ try:
419
+ (self._wrap_console_reader, self._wrap_console_writer) = await asyncio.open_connection(
420
+ host="127.0.0.1",
421
+ port=self._internal_console_port
422
+ )
423
+ break
424
+ except (OSError, ConnectionRefusedError) as e:
425
+ if remaining_trial <= 0:
426
+ raise e
427
+ await asyncio.sleep(0.1)
428
+ remaining_trial -= 1
429
+ await AsyncioTelnetServer.write_client_intro(self._wrap_console_writer, echo=True)
430
+ server = AsyncioTelnetServer(
431
+ reader=self._wrap_console_reader,
432
+ writer=self._wrap_console_writer,
433
+ binary=True,
434
+ echo=True
435
+ )
436
+ # warning: this will raise OSError exception if there is a problem...
437
+ telnet_server = await asyncio.start_server(server.run, self._manager.port_manager.console_host, external_port)
438
+ self._wrapper_telnet_servers.append(telnet_server)
439
+
440
+ async def start_wrap_console(self):
441
+ """
442
+ Start a Telnet proxy servers for the console and auxiliary console allowing multiple telnet clients
443
+ to be connected at the same time
444
+ """
445
+
446
+ if self._wrap_console and self._console_type == "telnet":
447
+ await self._wrap_telnet_proxy(self._internal_console_port, self.console)
448
+ log.info(
449
+ f"New Telnet proxy server for console started "
450
+ f"(internal port = {self._internal_console_port}, external port = {self.console})"
451
+ )
452
+
453
+ if self._wrap_aux and self._aux_type == "telnet":
454
+ await self._wrap_telnet_proxy(self._internal_aux_port, self.aux)
455
+ log.info(
456
+ f"New Telnet proxy server for auxiliary console started "
457
+ f"(internal port = {self._internal_aux_port}, external port = {self.aux})"
458
+ )
459
+
460
+ async def stop_wrap_console(self):
461
+ """
462
+ Stops the telnet proxy servers.
463
+ """
464
+
465
+ if self._wrap_console_writer:
466
+ self._wrap_console_writer.close()
467
+ await self._wrap_console_writer.wait_closed()
468
+ for telnet_proxy_server in self._wrapper_telnet_servers:
469
+ telnet_proxy_server.close()
470
+ await telnet_proxy_server.wait_closed()
471
+ self._wrapper_telnet_servers = []
472
+
473
+ async def reset_wrap_console(self):
474
+ """
475
+ Reset the wrap console (restarts the Telnet proxy)
476
+ """
477
+
478
+ await self.stop_wrap_console()
479
+ await self.start_wrap_console()
480
+
481
+ async def start_websocket_console(self, websocket):
482
+ """
483
+ Connect to console using Websocket.
484
+
485
+ :param ws: Websocket object
486
+ """
487
+
488
+ log.info(
489
+ f"New client {websocket.client.host}:{websocket.client.port} has connected to compute"
490
+ f" console WebSocket"
491
+ )
492
+
493
+ if self.status != "started":
494
+ raise NodeError(f"Node {self.name} is not started")
495
+
496
+ if self._console_type != "telnet":
497
+ raise NodeError(f"Node {self.name} console type is not telnet")
498
+
499
+ try:
500
+ host = self._manager.port_manager.console_host
501
+ port = self.console
502
+ (telnet_reader, telnet_writer) = await asyncio.open_connection(host, port)
503
+ log.info(f"Connected to local Telnet server {host}:{port}")
504
+ except ConnectionError as e:
505
+ raise NodeError(f"Cannot connect to node {self.name} telnet server: {e}")
506
+
507
+ async def ws_forward(telnet_writer):
508
+
509
+ try:
510
+ while True:
511
+ data = await websocket.receive_text()
512
+ if data:
513
+ telnet_writer.write(data.encode())
514
+ await telnet_writer.drain()
515
+ except WebSocketDisconnect:
516
+ log.info(
517
+ f"Client {websocket.client.host}:{websocket.client.port} has disconnected from compute"
518
+ f" console WebSocket"
519
+ )
520
+
521
+ async def telnet_forward(telnet_reader):
522
+
523
+ while not telnet_reader.at_eof():
524
+ data = await telnet_reader.read(1024)
525
+ if data:
526
+ await websocket.send_bytes(data)
527
+
528
+ # keep forwarding websocket data in both direction
529
+ if sys.version_info >= (3, 11, 0):
530
+ # Starting with Python 3.11, passing coroutine objects to wait() directly is forbidden.
531
+ aws = [asyncio.create_task(ws_forward(telnet_writer)), asyncio.create_task(telnet_forward(telnet_reader))]
532
+ else:
533
+ aws = [ws_forward(telnet_writer), telnet_forward(telnet_reader)]
534
+
535
+ done, pending = await asyncio.wait(aws, return_when=asyncio.FIRST_COMPLETED)
536
+ for task in done:
537
+ if task.exception():
538
+ log.warning(f"Exception while forwarding WebSocket data to Telnet server {task.exception()}")
539
+ for task in pending:
540
+ task.cancel()
541
+
542
+ @property
543
+ def aux(self):
544
+ """
545
+ Returns the aux console port of this node.
546
+
547
+ :returns: aux console port
548
+ """
549
+
550
+ return self._aux
551
+
552
+ @aux.setter
553
+ def aux(self, aux):
554
+ """
555
+ Changes the aux port
556
+
557
+ :params aux: Console port (integer) or None to free the port
558
+ """
559
+
560
+ if aux == self._aux or self._aux_type == "none":
561
+ return
562
+
563
+ if self._aux_type == "vnc" and aux is not None and aux < 5900:
564
+ raise NodeError(f"VNC auxiliary console require a port superior or equal to 5900, current port is {aux}")
565
+
566
+ if self._aux:
567
+ self._manager.port_manager.release_tcp_port(self._aux, self._project)
568
+ self._aux = None
569
+ if aux is not None:
570
+ if self.aux_type == "vnc":
571
+ self._aux = self._manager.port_manager.reserve_tcp_port(
572
+ aux, self._project, port_range_start=5900, port_range_end=6000
573
+ )
574
+ else:
575
+ self._aux = self._manager.port_manager.reserve_tcp_port(aux, self._project)
576
+
577
+ log.info(
578
+ "{module}: '{name}' [{id}]: auxiliary console port set to {port}".format(
579
+ module=self.manager.module_name, name=self.name, id=self.id, port=aux
580
+ )
581
+ )
582
+
583
+ @property
584
+ def console(self):
585
+ """
586
+ Returns the console port of this node.
587
+
588
+ :returns: console port
589
+ """
590
+
591
+ return self._console
592
+
593
+ @console.setter
594
+ def console(self, console):
595
+ """
596
+ Changes the console port
597
+
598
+ :params console: Console port (integer) or None to free the port
599
+ """
600
+
601
+ if console == self._console or self._console_type == "none":
602
+ return
603
+
604
+ if self._console_type == "vnc" and console is not None and console < 5900:
605
+ raise NodeError(f"VNC console require a port superior or equal to 5900, current port is {console}")
606
+
607
+ if self._console:
608
+ self._manager.port_manager.release_tcp_port(self._console, self._project)
609
+ self._console = None
610
+ if console is not None:
611
+ if self.console_type == "vnc":
612
+ vnc_console_start_port_range, vnc_console_end_port_range = self._get_vnc_console_port_range()
613
+ self._console = self._manager.port_manager.reserve_tcp_port(
614
+ console,
615
+ self._project,
616
+ port_range_start=vnc_console_start_port_range,
617
+ port_range_end=vnc_console_end_port_range,
618
+ )
619
+ else:
620
+ self._console = self._manager.port_manager.reserve_tcp_port(console, self._project)
621
+
622
+ log.info(
623
+ "{module}: '{name}' [{id}]: console port set to {port}".format(
624
+ module=self.manager.module_name, name=self.name, id=self.id, port=console
625
+ )
626
+ )
627
+
628
+ @property
629
+ def console_type(self):
630
+ """
631
+ Returns the console type for this node.
632
+
633
+ :returns: console type (string)
634
+ """
635
+
636
+ return self._console_type
637
+
638
+ @console_type.setter
639
+ def console_type(self, console_type):
640
+ """
641
+ Sets the console type for this node.
642
+
643
+ :param console_type: console type (string)
644
+ """
645
+
646
+ if console_type != self._console_type:
647
+ # get a new port if the console type change
648
+ if self._console:
649
+ self._manager.port_manager.release_tcp_port(self._console, self._project)
650
+ if console_type == "none":
651
+ # no need to allocate a port when the console type is none
652
+ self._console = None
653
+ elif console_type == "vnc":
654
+ vnc_console_start_port_range, vnc_console_end_port_range = self._get_vnc_console_port_range()
655
+ self._console = self._manager.port_manager.get_free_tcp_port(
656
+ self._project,
657
+ vnc_console_start_port_range,
658
+ vnc_console_end_port_range
659
+ )
660
+ else:
661
+ self._console = self._manager.port_manager.get_free_tcp_port(self._project)
662
+
663
+ self._console_type = console_type
664
+ log.info(
665
+ "{module}: '{name}' [{id}]: console type set to {console_type} (console port is {console})".format(
666
+ module=self.manager.module_name,
667
+ name=self.name,
668
+ id=self.id,
669
+ console_type=console_type,
670
+ console=self.console,
671
+ )
672
+ )
673
+
674
+ @property
675
+ def aux_type(self):
676
+ """
677
+ Returns the auxiliary console type for this node.
678
+
679
+ :returns: aux type (string)
680
+ """
681
+
682
+ return self._aux_type
683
+
684
+ @aux_type.setter
685
+ def aux_type(self, aux_type):
686
+ """
687
+ Sets the auxiliary console type for this node.
688
+
689
+ :param aux_type: console type (string)
690
+ """
691
+
692
+ if aux_type != self._aux_type:
693
+ # get a new port if the aux type change
694
+ if self._aux:
695
+ self._manager.port_manager.release_tcp_port(self._aux, self._project)
696
+ if aux_type == "none":
697
+ # no need to allocate a port when the auxiliary console type is none
698
+ self._aux = None
699
+ elif aux_type == "vnc":
700
+ # VNC is a special case and the range must be 5900-6000
701
+ self._aux = self._manager.port_manager.get_free_tcp_port(self._project, 5900, 6000)
702
+ else:
703
+ self._aux = self._manager.port_manager.get_free_tcp_port(self._project)
704
+
705
+ self._aux_type = aux_type
706
+ log.info(
707
+ "{module}: '{name}' [{id}]: console type set to {aux_type} (auxiliary console port is {aux})".format(
708
+ module=self.manager.module_name, name=self.name, id=self.id, aux_type=aux_type, aux=self.aux
709
+ )
710
+ )
711
+
712
+ @property
713
+ def ubridge(self):
714
+ """
715
+ Returns the uBridge hypervisor.
716
+
717
+ :returns: instance of uBridge
718
+ """
719
+
720
+ if self._ubridge_hypervisor and not self._ubridge_hypervisor.is_running():
721
+ self._ubridge_hypervisor = None
722
+ return self._ubridge_hypervisor
723
+
724
+ @ubridge.setter
725
+ def ubridge(self, ubride_hypervisor):
726
+ """
727
+ Set an uBridge hypervisor.
728
+
729
+ :param ubride_hypervisor: uBridge hypervisor
730
+ """
731
+
732
+ self._ubridge_hypervisor = ubride_hypervisor
733
+
734
+ @property
735
+ def ubridge_path(self):
736
+ """
737
+ Returns the uBridge executable path.
738
+
739
+ :returns: path to uBridge
740
+ """
741
+
742
+ path = shutil.which(self._manager.config.settings.Server.ubridge_path)
743
+ return path
744
+
745
+ @locking
746
+ async def _ubridge_send(self, command):
747
+ """
748
+ Sends a command to uBridge hypervisor.
749
+
750
+ :param command: command to send
751
+ """
752
+
753
+ if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
754
+ await self._start_ubridge(self._ubridge_require_privileged_access)
755
+ if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
756
+ raise NodeError(f"Cannot send command '{command}': uBridge is not running")
757
+ try:
758
+ await self._ubridge_hypervisor.send(command)
759
+ except UbridgeError as e:
760
+ raise UbridgeError(
761
+ f"Error while sending command '{command}': {e}: {self._ubridge_hypervisor.read_stdout()}"
762
+ )
763
+
764
+ @locking
765
+ async def _start_ubridge(self, require_privileged_access=False):
766
+ """
767
+ Starts uBridge (handles connections to and from this node).
768
+ """
769
+
770
+ # Prevent us to start multiple ubridge
771
+ if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running():
772
+ return
773
+
774
+ if self.ubridge_path is None:
775
+ raise NodeError(
776
+ "uBridge is not available, path doesn't exist, or you just installed GNS3 and need to restart your user session to refresh user permissions."
777
+ )
778
+
779
+ if require_privileged_access and not self._manager.has_privileged_access(self.ubridge_path):
780
+ raise NodeError("uBridge requires root access or the capability to interact with network adapters")
781
+
782
+ server_host = self._manager.config.settings.Server.host
783
+ if not self.ubridge:
784
+ self._ubridge_hypervisor = Hypervisor(self._project, self.ubridge_path, self.working_dir, server_host)
785
+ log.info(f"Starting new uBridge hypervisor {self._ubridge_hypervisor.host}:{self._ubridge_hypervisor.port}")
786
+ await self._ubridge_hypervisor.start()
787
+ if self._ubridge_hypervisor:
788
+ log.info(
789
+ f"Hypervisor {self._ubridge_hypervisor.host}:{self._ubridge_hypervisor.port} has successfully started"
790
+ )
791
+ await self._ubridge_hypervisor.connect()
792
+ # save if privileged are required in case uBridge needs to be restarted in self._ubridge_send()
793
+ self._ubridge_require_privileged_access = require_privileged_access
794
+
795
+ async def _stop_ubridge(self):
796
+ """
797
+ Stops uBridge.
798
+ """
799
+
800
+ if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running():
801
+ log.info(f"Stopping uBridge hypervisor {self._ubridge_hypervisor.host}:{self._ubridge_hypervisor.port}")
802
+ await self._ubridge_hypervisor.stop()
803
+ self._ubridge_hypervisor = None
804
+
805
+ async def add_ubridge_udp_connection(self, bridge_name, source_nio, destination_nio):
806
+ """
807
+ Creates an UDP connection in uBridge.
808
+
809
+ :param bridge_name: bridge name in uBridge
810
+ :param source_nio: source NIO instance
811
+ :param destination_nio: destination NIO instance
812
+ """
813
+
814
+ await self._ubridge_send(f"bridge create {bridge_name}")
815
+
816
+ if not isinstance(destination_nio, NIOUDP):
817
+ raise NodeError("Destination NIO is not UDP")
818
+
819
+ await self._ubridge_send(
820
+ "bridge add_nio_udp {name} {lport} {rhost} {rport}".format(
821
+ name=bridge_name, lport=source_nio.lport, rhost=source_nio.rhost, rport=source_nio.rport
822
+ )
823
+ )
824
+
825
+ await self._ubridge_send(
826
+ "bridge add_nio_udp {name} {lport} {rhost} {rport}".format(
827
+ name=bridge_name, lport=destination_nio.lport, rhost=destination_nio.rhost, rport=destination_nio.rport
828
+ )
829
+ )
830
+
831
+ if destination_nio.capturing:
832
+ await self._ubridge_send(
833
+ 'bridge start_capture {name} "{pcap_file}"'.format(
834
+ name=bridge_name, pcap_file=destination_nio.pcap_output_file
835
+ )
836
+ )
837
+
838
+ await self._ubridge_send(f"bridge start {bridge_name}")
839
+ await self._ubridge_apply_filters(bridge_name, destination_nio.filters)
840
+
841
+ async def update_ubridge_udp_connection(self, bridge_name, source_nio, destination_nio):
842
+ if destination_nio:
843
+ await self._ubridge_apply_filters(bridge_name, destination_nio.filters)
844
+
845
+ async def ubridge_delete_bridge(self, name):
846
+ """
847
+ :params name: Delete the bridge with this name
848
+ """
849
+
850
+ if self.ubridge:
851
+ await self._ubridge_send(f"bridge delete {name}")
852
+
853
+ async def _ubridge_apply_filters(self, bridge_name, filters):
854
+ """
855
+ Apply packet filters
856
+
857
+ :param bridge_name: bridge name in uBridge
858
+ :param filters: Array of filter dictionary
859
+ """
860
+
861
+ await self._ubridge_send("bridge reset_packet_filters " + bridge_name)
862
+ for packet_filter in self._build_filter_list(filters):
863
+ cmd = f"bridge add_packet_filter {bridge_name} {packet_filter}"
864
+ try:
865
+ await self._ubridge_send(cmd)
866
+ except UbridgeError as e:
867
+ match = re.search(r"Cannot compile filter '(.*)': syntax error", str(e))
868
+ if match:
869
+ message = f"Warning: ignoring BPF packet filter '{self.name}' due to syntax error: {match.group(1)}"
870
+ log.warning(message)
871
+ self.project.emit("log.warning", {"message": message})
872
+ else:
873
+ raise
874
+
875
+ def _build_filter_list(self, filters):
876
+ """
877
+ :returns: Iterator building a list of filter
878
+ """
879
+
880
+ i = 0
881
+ for (filter_type, values) in filters.items():
882
+ if isinstance(values[0], str):
883
+ for line in values[0].split("\n"):
884
+ line = line.strip()
885
+ yield "{filter_name} {filter_type} {filter_value}".format(
886
+ filter_name="filter" + str(i),
887
+ filter_type=filter_type,
888
+ filter_value='"{}" {}'.format(line, " ".join([str(v) for v in values[1:]])),
889
+ ).strip()
890
+ i += 1
891
+ else:
892
+ yield "{filter_name} {filter_type} {filter_value}".format(
893
+ filter_name="filter" + str(i),
894
+ filter_type=filter_type,
895
+ filter_value=" ".join([str(v) for v in values]),
896
+ )
897
+ i += 1
898
+
899
+ async def _add_ubridge_ethernet_connection(self, bridge_name, ethernet_interface, block_host_traffic=False):
900
+ """
901
+ Creates a connection with an Ethernet interface in uBridge.
902
+
903
+ :param bridge_name: bridge name in uBridge
904
+ :param ethernet_interface: Ethernet interface name
905
+ :param block_host_traffic: block network traffic originating from the host OS (Windows only)
906
+ """
907
+
908
+ if sys.platform.startswith("linux") and block_host_traffic is False:
909
+ # on Linux we use RAW sockets by default excepting if host traffic must be blocked
910
+ await self._ubridge_send(
911
+ 'bridge add_nio_linux_raw {name} "{interface}"'.format(name=bridge_name, interface=ethernet_interface)
912
+ )
913
+ else:
914
+ # on other platforms we just rely on the pcap library
915
+ await self._ubridge_send(
916
+ 'bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name, interface=ethernet_interface)
917
+ )
918
+ source_mac = None
919
+ for interface in interfaces():
920
+ if interface["name"] == ethernet_interface:
921
+ source_mac = interface["mac_address"]
922
+ if source_mac:
923
+ await self._ubridge_send(
924
+ 'bridge set_pcap_filter {name} "not ether src {mac}"'.format(name=bridge_name, mac=source_mac)
925
+ )
926
+ log.info(f"PCAP filter applied on '{ethernet_interface}' for source MAC {source_mac}")
927
+
928
+ def _create_local_udp_tunnel(self):
929
+ """
930
+ Creates a local UDP tunnel (pair of 2 NIOs, one for each direction)
931
+
932
+ :returns: source NIO and destination NIO.
933
+ """
934
+
935
+ m = PortManager.instance()
936
+ lport = m.get_free_udp_port(self.project)
937
+ rport = m.get_free_udp_port(self.project)
938
+ source_nio_settings = {"lport": lport, "rhost": "127.0.0.1", "rport": rport, "type": "nio_udp"}
939
+ destination_nio_settings = {"lport": rport, "rhost": "127.0.0.1", "rport": lport, "type": "nio_udp"}
940
+ source_nio = self.manager.create_nio(source_nio_settings)
941
+ destination_nio = self.manager.create_nio(destination_nio_settings)
942
+ log.info(
943
+ "{module}: '{name}' [{id}]:local UDP tunnel created between port {port1} and {port2}".format(
944
+ module=self.manager.module_name, name=self.name, id=self.id, port1=lport, port2=rport
945
+ )
946
+ )
947
+ return source_nio, destination_nio
948
+
949
+ @property
950
+ def hw_virtualization(self):
951
+ """
952
+ Returns either the node is using hardware virtualization or not.
953
+
954
+ :return: boolean
955
+ """
956
+
957
+ return self._hw_virtualization
958
+
959
+ def check_available_ram(self, requested_ram):
960
+ """
961
+ Sends a warning notification if there is not enough RAM on the system to allocate requested RAM.
962
+
963
+ :param requested_ram: requested amount of RAM in MB
964
+ """
965
+
966
+ available_ram = int(psutil.virtual_memory().available / (1024 * 1024))
967
+ percentage_left = 100 - psutil.virtual_memory().percent
968
+ if requested_ram > available_ram:
969
+ message = '"{}" requires {}MB of RAM to run but there is only {}MB - {}% of RAM left on "{}"'.format(
970
+ self.name, requested_ram, available_ram, percentage_left, platform.node()
971
+ )
972
+ self.project.emit("log.warning", {"message": message})
973
+
974
+ def _get_custom_adapter_settings(self, adapter_number):
975
+
976
+ for custom_adapter in self.custom_adapters:
977
+ if custom_adapter["adapter_number"] == adapter_number:
978
+ return custom_adapter
979
+ return {}