Compare commits

...
19 Commits
Author SHA1 Message Date
grossmj 43c7acb0cf Release v2.2.0b3 2019-06-15 15:39:32 +02:00
Jeremy Grossmann 239d9e6fd6 Merge pull request #1599 from GNS3/cdrom-refresh
Refresh mounted media after ISO switch
2019-06-15 15:26:48 +02:00
grossmj 9e54ab77d0 Merge 2.1 into 2.2 branch. 2019-06-15 15:26:20 +02:00
grossmj 5dbedb744e Sync appliance files. 2019-06-15 15:24:45 +02:00
grossmj 7a463676cd Eject cdrom first before changing an image. Use 'force' when ejecting. 2019-06-15 15:20:21 +02:00
grossmj b0700b8787 Merge remote-tracking branch 'origin/2.2' into 2.2 2019-06-15 12:53:55 +02:00
grossmj 06ce0868ec Fix template migration issues from GUI to controller. Fixes https://github.com/GNS3/gns3-gui/issues/2803 2019-06-15 12:52:50 +02:00
grossmj 7c33d3510a Development on 2.1.22dev1 2019-06-14 19:42:18 +02:00
grossmj cb1f73e9a2 Release v2.1.21 2019-06-14 10:47:07 +02:00
grossmj 2476581dca Change uBridge debug level to '1' when debugging is enabled. Fixes #1598 2019-06-12 14:35:13 +02:00
grossmj b7af2e4d5c Refresh mounted media after ISO switch. 2019-06-12 14:23:03 +02:00
Jeremy Grossmann b002812907 Merge pull request #1597 from kazkansouh/2.2-fix-1595-volumes
Fix for issue #1595
2019-06-05 12:10:34 +02:00
Karim af78031322 Resolve conflicts in docker volumes instead of error. Fixes https://github.com/GNS3/gns3-server/issues/1595 2019-06-05 10:40:40 +01:00
grossmj 61c87e57a4 Use console port to allocate guest CID (console ID) for Qemu VMs. Fixes #2804 2019-06-05 11:25:35 +02:00
grossmj 9cce4de190 %guest-cid% variable implementation for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2804 2019-06-04 18:00:44 +02:00
grossmj 54d50b2ef4 Set hkp protocol for keyserver in remote install script. Fixes #1596 2019-06-04 15:10:34 +02:00
grossmj 9e518412b3 Set keyserver port to 80 in remote install script. Fixes #1596 2019-06-04 15:03:28 +02:00
grossmj e9154f6af6 Fix KeyError: 'usage' exception when configuring IOU template. Fixes https://github.com/GNS3/gns3-gui/issues/2806 2019-05-31 08:41:44 +02:00
grossmj dd05884096 Development on 2.2.0dev13 2019-05-29 17:52:38 +07:00
29 changed files with 611 additions and 657 deletions

No files matched your search

+8
View File
@@ -1,5 +1,13 @@
# Change Log
## 2.2.0b3 15/06/2019
* Fix template migration issues from GUI to controller. Fixes https://github.com/GNS3/gns3-gui/issues/2803
* Refresh mounted media after ISO switch.
* Resolve conflicts in docker volumes instead of error. Fixes https://github.com/GNS3/gns3-server/issues/1595
* %guest-cid% variable implementation for Qemu VMs. Fixes https://github.com/GNS3/gns3-gui/issues/2804
* Fix KeyError: 'usage' exception when configuring IOU template. Fixes https://github.com/GNS3/gns3-gui/issues/2806
## 2.2.0b2 29/05/2019
* Ignore Unicode errors when reading base config file contents.
+68
View File
@@ -0,0 +1,68 @@
{
"name": "ParrotOS",
"category": "guest",
"description": " Parrot is a GNU/Linux distribution based on Debian Testing and designed with Security, Development and Privacy in mind. It includes a full portable laboratory for security and digital forensics experts, but it also includes all you need to develop your own software or protect your privacy while surfing the net.",
"vendor_name": "Parrot Project",
"vendor_url": "https://parrotsec.org/",
"documentation_url": "https://docs.parrotsec.org/doku.php",
"product_name": "ParrotOS",
"product_url": "https://parrotsec.org/",
"registry_version": 3,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
"usage": "Passwords are set during installation.",
"symbol": "parrotlogo.png",
"qemu": {
"adapter_type": "e1000",
"adapters": 1,
"ram": 2048,
"arch": "x86_64",
"console_type": "vnc",
"kvm": "require"
},
"images": [
{
"filename": "Parrot-security-4.6_amd64.iso",
"version": "Security Build 4.6",
"md5sum": "ead812edc83119e8bcb4ee9daabdc105",
"filesize": 3788668928,
"download_url": "https://www.parrotsec.org/download-security.php",
"direct_download_url": "https://download.parrotsec.org/parrot/iso/4.6/Parrot-security-4.6_amd64.iso"
},
{
"filename": "Parrot-security-3.11_amd64.iso",
"version": "Security Build 3.11",
"md5sum": "71c94474fb474f682da0844d95f0040b",
"filesize": 3788668928,
"download_url": "https://www.parrotsec.org/download.fx",
"direct_download_url": "https://www.parrotsec.org/download-full.fx"
},
{
"filename": "empty30G.qcow2",
"version": "1.0",
"md5sum": "3411a599e822f2ac6be560a26405821a",
"filesize": 197120,
"download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%30disk/",
"direct_download_url": "http://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty30G.qcow2/download"
}
],
"versions": [
{
"name": "Security Build 4.6",
"images": {
"hda_disk_image": "empty30G.qcow2",
"cdrom_image": "Parrot-security-4.6_amd64.iso"
}
},
{
"name": "Security Build 3.11",
"images": {
"hda_disk_image": "empty30G.qcow2",
"cdrom_image": "Parrot-security-3.11_amd64.iso"
}
}
]
}
+9 -9
View File
@@ -24,17 +24,17 @@
},
"images": [
{
"filename": "Check_Point_R80.10_T421_Gaia.iso",
"filename": "Check_Point_R80.10_T479_Gaia.iso",
"version": "80.10",
"md5sum": "12d9723fadb89bb722e20ca3f89012ce",
"filesize": 3420127232,
"download_url": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk104859"
"md5sum": "1b97cce21dbee78fec505b44e637cc9a",
"filesize": 3301212160,
"download_url": "https://supportcenter.checkpoint.com/supportcenter/portal/user/anon/page/default.psml/media-type/html?action=portlets.DCFileAction&eventSubmit_doGetdcdetails=&fileid=54509"
},
{
"filename": "Check_Point_R77.30_T204_Install_and_Upgrade.Gaia.iso",
"filename": "Check_Point_R77.30_Install_and_Upgrade_T5.Gaia.iso",
"version": "77.30",
"md5sum": "6fa7586bbb6832fa965d3173276c5b87",
"filesize": 2799271936,
"md5sum": "3f6f459df3fb3beaf7b2457f08982425",
"filesize": 289692076,
"download_url": "https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk104859"
},
{
@@ -58,14 +58,14 @@
"name": "80.10",
"images": {
"hda_disk_image": "empty100G.qcow2",
"cdrom_image": "Check_Point_R80.10_T421_Gaia.iso"
"cdrom_image": "Check_Point_R80.10_T479_Gaia.iso"
}
},
{
"name": "77.30",
"images": {
"hda_disk_image": "empty100G.qcow2",
"cdrom_image": "Check_Point_R77.30_T204_Install_and_Upgrade.Gaia.iso"
"cdrom_image": "Check_Point_R77.30_Install_and_Upgrade_T5.Gaia.iso"
}
},
{
+14
View File
@@ -27,6 +27,13 @@
},
"images": [
{
"filename": "ise-2.4.0.357.SPA.x86_64.iso",
"version": "2.4.0.357",
"md5sum": "766945618a0ff35f6c720b3bc4b46bfb",
"filesize": 8326062080,
"download_url": "https://software.cisco.com/download/home/283801620/type/283802505/release/2.4.0"
},
{
"filename": "ise-2.2.0.470.SPA.x86_64.iso",
"version": "2.2.0.470",
"md5sum": "7fe5e730d0a51ef66e69d1463717ff3f",
@@ -65,6 +72,13 @@
],
"versions": [
{
"name": "2.4.0.357",
"images": {
"hda_disk_image": "empty200G.qcow2",
"cdrom_image": "ise-2.4.0.357.SPA.x86_64.iso"
}
},
{
"name": "2.2.0.470",
"images": {
"hda_disk_image": "empty200G.qcow2",
+14
View File
@@ -28,6 +28,13 @@
"images": [
{
"filename": "EXOS-VM_v30.2.1.8.qcow2",
"version": "30.2.1.8",
"md5sum": "4bdbf3ddff7a030e19c6bb71270b56d2",
"filesize": 355205120,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_EXOS/EXOS-VM_v30.2.1.8.qcow2"
},
{
"filename": "EXOS-VM_v30.1.1.4.qcow2",
"version": "30.1.1.4",
@@ -88,6 +95,13 @@
],
"versions": [
{
"name": "30.2.1.8",
"images": {
"hda_disk_image": "EXOS-VM_v30.2.1.8.qcow2"
}
},
{
"name": "30.1.1.4",
"images": {
+15
View File
@@ -24,6 +24,15 @@
"kvm": "allow"
},
"images": [
{
"filename": "ipfire-2.23.2gb-ext4.x86_64-full-core131.img",
"version": "2.23",
"md5sum": "604c06e20c36985ff00802da4509340c",
"filesize": 1541160960,
"download_url": "http://www.ipfire.org/download",
"direct_download_url": "https://muug.ca/mirror/ipfire/releases/ipfire-2.x/2.23-core131/ipfire-2.23.2gb-ext4.x86_64-full-core131.img.xz",
"compression": "xz"
},
{
"filename": "ipfire-2.21.2gb-ext4.x86_64-full-core129.img",
"version": "2.21.129",
@@ -98,6 +107,12 @@
}
],
"versions": [
{
"name": "2.23",
"images": {
"hda_disk_image": "ipfire-2.23.2gb-ext4.x86_64-full-core131.img"
}
},
{
"name": "2.21.129",
"images": {
+28
View File
@@ -20,6 +20,22 @@
"kvm": "require"
},
"images": [
{
"filename": "kali-linux-mate-2019.2-amd64.iso",
"version": "2019.2 (MATE)",
"md5sum": "fec8dd7009f932c51a74323df965a709",
"filesize": 3313217536,
"download_url": "https://www.kali.org/downloads/",
"direct_download_url": "http://cdimage.kali.org/kali-2019.1a/kali-linux-mate-2019.2-amd64.iso"
},
{
"filename": "kali-linux-2019.2-amd64.iso",
"version": "2019.2",
"md5sum": "0f89b6225d7ea9c18682f7cc541c1179",
"filesize": 3353227264,
"download_url": "https://www.kali.org/downloads/",
"direct_download_url": "http://cdimage.kali.org/kali-2019.1a/kali-linux-2019.2-amd64.iso"
},
{
"filename": "kali-linux-2019.1a-amd64.iso",
"version": "2019.1a",
@@ -102,6 +118,18 @@
}
],
"versions": [
{
"name": "2019.2 (MATE)",
"images": {
"cdrom_image": "kali-linux-mate-2019.2-amd64.iso"
}
},
{
"name": "2019.2",
"images": {
"cdrom_image": "kali-linux-2019.2-amd64.iso"
}
},
{
"name": "2019.1a",
"images": {
+15 -321
View File
@@ -26,6 +26,15 @@
"options": "-nographic"
},
"images": [
{
"filename": "chr-6.44.3.img",
"version": "6.44.2",
"md5sum": "c46b33125d536faa24473a519abbb89d",
"filesize": 67108864,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download.mikrotik.com/routeros/6.44.2/chr-6.44.2.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.44.2.img",
"version": "6.44.2",
@@ -97,198 +106,15 @@
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.40.3/chr-6.40.3.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.39.2.img",
"version": "6.39.2",
"md5sum": "ecb37373dedfba04267a999d23b8e203",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.39.2/chr-6.39.2.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.39.1.img",
"version": "6.39.1",
"md5sum": "c53293bc41f76d85a8642005fd1cbd54",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.39.1/chr-6.39.1.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.39.img",
"version": "6.39",
"md5sum": "7e77c8ac4c9aeaf88f6ff15897f33163",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.39/chr-6.39.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.38.7.img",
"version": "6.38.7",
"md5sum": "69a51c96b1247bbaf1253d2873617122",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.38.7/chr-6.38.7.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.38.5.img",
"version": "6.38.5",
"md5sum": "8147f42ea1ee96f580a35a298b7f9354",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.38.5/chr-6.38.5.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.38.1.img",
"version": "6.38.1",
"md5sum": "753ed7c86e0f54fd9e18d044db64538d",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "https://download2.mikrotik.com/routeros/6.38.1/chr-6.38.1.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.38.img",
"version": "6.38",
"md5sum": "37e2165112f8a9beccac06a9a6009000",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.38/chr-6.38.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.37.3.img",
"version": "6.37.3",
"md5sum": "bda87db475f80debdf3181accf6b78e2",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.37.3/chr-6.37.3.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.37.1.img",
"version": "6.37.1",
"md5sum": "713b14a5aba9f967f7bdd9029c8d85b6",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.37.1/chr-6.37.1.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.36.4.img",
"version": "6.36.4",
"md5sum": "09527bde50697711926c08d545940c1e",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.36.4/chr-6.36.4.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.34.2.vmdk",
"version": "6.34.2 (.vmdk)",
"md5sum": "0360f121b76a8b491a05dc37640ca319",
"filesize": 30277632,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.34.2/chr-6.34.2.vmdk"
},
{
"filename": "chr-6.34.2.vdi",
"version": "6.34.2 (.vdi)",
"md5sum": "e7e4021aeeee2eaabd024d48702bb2e1",
"filesize": 30409728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.34.2/chr-6.34.2.vdi"
},
{
"filename": "chr-6.34.2.img",
"version": "6.34.2 (.img)",
"md5sum": "984d4d11c2ff209fcdc21ac42895edbe",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.34.2/chr-6.34.2.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.34.vmdk",
"version": "6.34 (.vmdk)",
"md5sum": "c5e6d192ae19d263a9a313d4b4bee7e4",
"filesize": 30277632,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.34/chr-6.34.vmdk"
},
{
"filename": "chr-6.34.vdi",
"version": "6.34 (.vdi)",
"md5sum": "34b161f83a792c744c76a529afc094a8",
"filesize": 30409728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.34/chr-6.34.vdi"
},
{
"filename": "chr-6.34.img",
"version": "6.34 (.img)",
"md5sum": "32ffde7fb934c7bfee555c899ccd77b6",
"filesize": 134217728,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.34/chr-6.34.img.zip",
"compression": "zip"
},
{
"filename": "chr-6.33.5.vmdk",
"version": "6.33.5 (.vmdk)",
"md5sum": "cd284e28aa02ae59f55ed8f43ff27fbf",
"filesize": 23920640,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.33.5/chr-6.33.5.vmdk"
},
{
"filename": "chr-6.33.5.vdi",
"version": "6.33.5 (.vdi)",
"md5sum": "fa84e63a558e7c61d7d338386cfd08c9",
"filesize": 24118272,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.33.5/chr-6.33.5.vdi"
},
{
"filename": "chr-6.33.5.img",
"version": "6.33.5 (.img)",
"md5sum": "210cc8ad06f25c9f27b6b99f6e00bd91",
"filesize": 67108864,
"direct_download_url": "http://download2.mikrotik.com/routeros/6.33.5/chr-6.33.5.img.zip",
"download_url": "http://www.mikrotik.com/download",
"compression": "zip"
},
{
"filename": "chr-6.33.3.vmdk",
"version": "6.33.3 (.vmdk)",
"md5sum": "08532a5af1a830182d65c416eab2b089",
"filesize": 23920640,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.33.3/chr-6.33.3.vmdk"
},
{
"filename": "chr-6.33.2.vmdk",
"version": "6.33.2 (.vmdk)",
"md5sum": "6291893c2c9626603c6d38d23390a8be",
"filesize": 23920640,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.33.2/chr-6.33.2.vmdk"
},
{
"filename": "chr-6.33.vmdk",
"version": "6.33 (.vmdk)",
"md5sum": "63bee5405fa1e209388adc6b5f78bb70",
"filesize": 23920640,
"download_url": "http://www.mikrotik.com/download",
"direct_download_url": "http://download2.mikrotik.com/routeros/6.33/chr-6.33.vmdk"
}
],
"versions": [
{
"name": "6.44.3",
"images": {
"hda_disk_image": "chr-6.44.3.img"
}
},
{
"name": "6.44.2",
"images": {
@@ -330,138 +156,6 @@
"images": {
"hda_disk_image": "chr-6.40.3.img"
}
},
{
"name": "6.39.2",
"images": {
"hda_disk_image": "chr-6.39.2.img"
}
},
{
"name": "6.39.1",
"images": {
"hda_disk_image": "chr-6.39.1.img"
}
},
{
"name": "6.39",
"images": {
"hda_disk_image": "chr-6.39.img"
}
},
{
"name": "6.38.7",
"images": {
"hda_disk_image": "chr-6.38.7.img"
}
},
{
"name": "6.38.5",
"images": {
"hda_disk_image": "chr-6.38.5.img"
}
},
{
"name": "6.38.1",
"images": {
"hda_disk_image": "chr-6.38.1.img"
}
},
{
"name": "6.38",
"images": {
"hda_disk_image": "chr-6.38.img"
}
},
{
"name": "6.37.3",
"images": {
"hda_disk_image": "chr-6.37.3.img"
}
},
{
"name": "6.37.1",
"images": {
"hda_disk_image": "chr-6.37.1.img"
}
},
{
"name": "6.36.4",
"images": {
"hda_disk_image": "chr-6.36.4.img"
}
},
{
"name": "6.34.2 (.vmdk)",
"images": {
"hda_disk_image": "chr-6.34.2.vmdk"
}
},
{
"name": "6.34.2 (.vdi)",
"images": {
"hda_disk_image": "chr-6.34.2.vdi"
}
},
{
"name": "6.34.2 (.img)",
"images": {
"hda_disk_image": "chr-6.34.2.img"
}
},
{
"name": "6.34 (.vmdk)",
"images": {
"hda_disk_image": "chr-6.34.vmdk"
}
},
{
"name": "6.34 (.vdi)",
"images": {
"hda_disk_image": "chr-6.34.vdi"
}
},
{
"name": "6.34 (.img)",
"images": {
"hda_disk_image": "chr-6.34.img"
}
},
{
"name": "6.33.5 (.vmdk)",
"images": {
"hda_disk_image": "chr-6.33.5.vmdk"
}
},
{
"name": "6.33.5 (.vdi)",
"images": {
"hda_disk_image": "chr-6.33.5.vdi"
}
},
{
"name": "6.33.5 (.img)",
"images": {
"hda_disk_image": "chr-6.33.5.img"
}
},
{
"name": "6.33.3 (.vmdk)",
"images": {
"hda_disk_image": "chr-6.33.3.vmdk"
}
},
{
"name": "6.33.2 (.vmdk)",
"images": {
"hda_disk_image": "chr-6.33.2.vmdk"
}
},
{
"name": "6.33 (.vmdk)",
"images": {
"hda_disk_image": "chr-6.33.vmdk"
}
}
]
}
+44
View File
@@ -0,0 +1,44 @@
{
"name": "OpenNAC",
"category": "guest",
"description": "openNAC is an opensource Network Access Control for corporate LAN / WAN environments. It enables authentication, authorization and audit policy-based all access to network. It supports diferent network vendors like Cisco, Alcatel, 3Com or Extreme Networks, and different clients like PCs with Windows or Linux, Mac,devices like smartphones and tablets. Based on open source components and self-development It is based on industry standards such as FreeRadius, 802.1x, AD, ldap, ...It is very extensible, new features can be incorporated because it is architectured in plugins. Easily integrated with existing systems Last but not least, It provides value added services such as configuration management, network, backup configurations, Network Discovery and Network Monitoring. Download the OVA, then extract the VMDK (tar -xvf FILE.ova), then convert to qcow2 (qemu-img convert -O qcow2 FILE.vmdk FILE.qcow2).",
"vendor_name": "Opennactech",
"vendor_url": "http://www.opennac.org/opennac/en.html",
"documentation_url": "http://www.opennac.org/opennac/en/support.html",
"product_name": "OpenNAC",
"product_url": "https://opennac.org/",
"registry_version": 3,
"status": "stable",
"maintainer": "Brent Stewart",
"maintainer_email": "brent@stewart.tc",
"usage": "Passwords are set during installation.",
"symbol": "opennac.png",
"qemu": {
"adapter_type": "e1000",
"adapters": 1,
"ram": 512,
"arch": "x86_64",
"console_type": "vnc",
"kvm": "require",
"options": "-smp 2"
},
"images": [
{
"filename": "opennac_3711_img.qcow2",
"version": "OpenNAC 3711",
"md5sum": "88d6129265860aa58c5306cd7b413aab",
"filesize": 3968729088,
"download_url": "http://www.opennac.org/opennac/en/download.html",
"direct_download_url": "http://sourceforge.net/projects/opennac/files/ova/opennac_3711_img.ova/download"
}
],
"versions": [
{
"name": "OpenNAC 3711",
"images": {
"hda_disk_image": "opennac_3711_img.qcow2"
}
}
]
}
+17 -76
View File
@@ -11,7 +11,8 @@
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Boot the live CD",
"usage": "Rename the downloaded file to include the version number. Boot the live CD",
"symbol": "packetfence2.png",
"qemu": {
"adapter_type": "virtio-net-pci",
"adapters": 2,
@@ -22,6 +23,15 @@
"kvm": "require"
},
"images": [
{
"filename": "PacketFenceZEN_USB-9.0.1.img",
"version": "9.0.1",
"md5sum": "05a18a5a3c53bf10e84082b3d8db3961",
"filesize": 3221225472,
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "https://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/9.0.1/PacketFenceZEN_USB-9.0.1.tar.bz2/download",
"compression": "bzip2"
},
{
"filename": "PacketFenceZEN_USB-8.3.0.img",
"version": "8.3.0",
@@ -75,54 +85,15 @@
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "https://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/7.0.0/PacketFenceZEN_USB-7.0.0.tar.bz2/download",
"compression": "bzip2"
},
{
"filename": "PacketFenceZEN_USB-6.5.1.img",
"version": "6.5.1",
"md5sum": "937c02640bd487889b7071e8f094a62a",
"filesize": 3221225472,
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "http://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/6.5.1/PacketFenceZEN_USB-6.5.1.tar.bz2/download",
"compression": "bzip2"
},
{
"filename": "PacketFenceZEN_USB-6.5.0.img",
"version": "6.5.0",
"md5sum": "5d5ff015f115e9dbcfd355f1bb22f5d9",
"filesize": 3221225472,
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "http://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/6.5.0/PacketFenceZEN_USB-6.5.0.tar.bz2/download",
"compression": "bzip2"
},
{
"filename": "PacketFenceZEN_USB-6.4.0.img",
"version": "6.4.0",
"md5sum": "7f2bea58421d094152ea71f49cc3084a",
"filesize": 3221225472,
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "https://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/6.4.0/PacketFenceZEN_USB-6.4.0.tar.bz2/download",
"compression": "bzip2"
},
{
"filename": "PacketFenceZEN_USB-6.3.0.img",
"version": "6.3.0",
"md5sum": "94e19349faedf292743fdc0ab48f8466",
"filesize": 3221225472,
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "https://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/6.3.0/PacketFenceZEN_USB-6.3.0.tar.bz2/download",
"compression": "bzip2"
},
{
"filename": "PacketFenceZEN_USB-6.2.1.img",
"version": "6.2.1",
"md5sum": "f212be7c8621b90d973f500f00ef1277",
"filesize": 3221225472,
"download_url": "https://packetfence.org/download.html#/zen",
"direct_download_url": "http://sourceforge.net/projects/packetfence/files/PacketFence%20ZEN/6.2.1/PacketFenceZEN_USB-6.2.1.tar.bz2/download",
"compression": "bzip2"
}
],
"versions": [
{
"name": "9.0.1",
"images": {
"hda_disk_image": "PacketFenceZEN_USB-9.0.1.img"
}
},
{
"name": "8.3.0",
"images": {
@@ -158,36 +129,6 @@
"images": {
"hda_disk_image": "PacketFenceZEN_USB-7.0.0.img"
}
},
{
"name": "6.5.0",
"images": {
"hda_disk_image": "PacketFenceZEN_USB-6.5.1.img"
}
},
{
"name": "6.5.0",
"images": {
"hda_disk_image": "PacketFenceZEN_USB-6.5.0.img"
}
},
{
"name": "6.4.0",
"images": {
"hda_disk_image": "PacketFenceZEN_USB-6.4.0.img"
}
},
{
"name": "6.3.0",
"images": {
"hda_disk_image": "PacketFenceZEN_USB-6.3.0.img"
}
},
{
"name": "6.2.1",
"images": {
"hda_disk_image": "PacketFenceZEN_USB-6.2.1.img"
}
}
]
}
+15
View File
@@ -22,6 +22,14 @@
"kvm": "require"
},
"images": [
{
"filename": "Parrot-security-4.6_amd64.iso",
"version": "Security Build 4.6",
"md5sum": "ead812edc83119e8bcb4ee9daabdc105",
"filesize": 3788668928,
"download_url": "https://www.parrotsec.org/download-security.php",
"direct_download_url": "https://download.parrotsec.org/parrot/iso/4.6/Parrot-security-4.6_amd64.iso"
},
{
"filename": "Parrot-security-3.11_amd64.iso",
"version": "Security Build 3.11",
@@ -41,6 +49,13 @@
],
"versions": [
{
"name": "Security Build 4.6",
"images": {
"hda_disk_image": "empty30G.qcow2",
"cdrom_image": "Parrot-security-4.6_amd64.iso"
}
},
{
"name": "Security Build 3.11",
"images": {
+16 -2
View File
@@ -17,11 +17,19 @@
"adapter_type": "e1000",
"adapters": 2,
"ram": 3072,
"arch": "i386",
"console_type": "telnet",
"arch": "x86_64",
"console_type": "vnc",
"kvm": "allow"
},
"images": [
{
"filename": "securityonion-16.04.6.1.iso",
"version": "16.04.6.1",
"md5sum": "ca835cef92c2c0daafa16e789c343d1d",
"filesize": 2020605952,
"download_url": "https://github.com/Security-Onion-Solutions/security-onion/releases/",
"direct_download_url": "https://github.com/Security-Onion-Solutions/security-onion/releases/download/v16.04.5.3_20181010/securityonion-16.04.6.1.iso"
},
{
"filename": "securityonion-16.04.5.3.iso",
"version": "16.04.5.3",
@@ -58,6 +66,12 @@
],
"versions": [
{
"name": "16.04.6.1",
"images": {
"hda_disk_image": "empty30G.qcow2",
"cdrom_image": "securityonion-16.04.6.1.iso"
}
}, {
"name": "16.04.5.3",
"images": {
"hda_disk_image": "empty30G.qcow2",
+8 -7
View File
@@ -1,7 +1,7 @@
{
"name": "VyOS",
"category": "router",
"description": "VyOS is a community fork of Vyatta, a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality.",
"description": "VyOS is a community fork of Vyatta, a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. VyOS has a subscription LTS version and a community rolling release. The latest version in this appliance is in the rolling release track.",
"vendor_name": "Linux",
"vendor_url": "http://vyos.net/",
"documentation_url": "http://vyos.net/wiki/User_Guide",
@@ -9,6 +9,7 @@
"product_url": "http://vyos.net/",
"registry_version": 3,
"status": "stable",
"symbol": "vyos.png",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
"usage": "Default username/password is vyos/vyos. At first boot the router will start from the cdrom, login and then type install system and follow the instructions.",
@@ -24,10 +25,10 @@
},
"images": [
{
"filename": "vyos-1.2.0-beta1-amd64.iso",
"version": "1.2.0-beta1",
"md5sum": "c2906532d4c7a0d29b61e8eab326d6c7",
"filesize": 243269632,
"filename": "vyos-1.2.0-rolling+201906040337-amd64.iso",
"version": "1.2.0-2019-06-04",
"md5sum": "2a1342985b2a9edfef9f66310ce11a92",
"filesize": 427819008,
"download_url": "http://dev.packages.vyos.net/iso/preview/1.2.0-beta1/",
"direct_download_url": "http://dev.packages.vyos.net/iso/preview/1.2.0-beta1/vyos-1.2.0-beta1-amd64.iso"
},
@@ -74,10 +75,10 @@
],
"versions": [
{
"name": "1.2.0-beta1",
"name": "1.2.0-2019-06-04",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "vyos-1.2.0-beta1-amd64.iso"
"cdrom_image": "vyos-1.2.0-rolling+201906040337-amd64.iso"
}
},
{
+13 -8
View File
@@ -248,27 +248,32 @@ class DockerVM(BaseNode):
# We mount our own etc/network
try:
network_config = self._create_network_config()
self._create_network_config()
except OSError as e:
raise DockerError("Could not create network config in the container: {}".format(e))
binds.append("{}:/gns3volumes/etc/network:rw".format(network_config))
volumes = ["/etc/network"]
self._volumes = ["/etc/network"]
volumes = list((image_info.get("Config", {}).get("Volumes") or {}).keys())
volumes.extend((image_info.get("Config", {}).get("Volumes") or {}).keys())
for volume in self._extra_volumes:
if not volume.strip() or volume[0] != "/" or volume.find("..") >= 0:
raise DockerError("Persistent volume '{}' has invalid format. It must start with a '/' and not contain '..'.".format(volume))
volumes.extend(self._extra_volumes)
self._volumes = []
# define lambdas for validation checks
nf = lambda x: re.sub(r"//+", "/", (x if x.endswith("/") else x + "/"))
incompatible = lambda v1, v2: nf(v1).startswith(nf(v2)) or nf(v2).startswith(nf(v1))
generalises = lambda v1, v2: nf(v2).startswith(nf(v1))
for volume in volumes:
if [ v for v in self._volumes if incompatible(v, volume) ] :
raise DockerError("Duplicate persistent volume {} detected.\n\nVolumes specified in docker image as well as user specified persistent volumes must be unique.".format(volume))
# remove any mount that is equal or more specific, then append this one
self._volumes = list(filter(lambda v: not generalises(volume, v), self._volumes))
# if there is nothing more general, append this mount
if not [ v for v in self._volumes if generalises(v, volume) ] :
self._volumes.append(volume)
for volume in self._volumes:
source = os.path.join(self.working_dir, os.path.relpath(volume, "/"))
os.makedirs(source, exist_ok=True)
binds.append("{}:/gns3volumes{}".format(source, volume))
self._volumes.append(volume)
return binds
+28
View File
@@ -30,6 +30,7 @@ from ...utils.asyncio import subprocess_check_output
from ..base_manager import BaseManager
from .qemu_error import QemuError
from .qemu_vm import QemuVM
from .utils.guest_cid import get_next_guest_cid
import logging
log = logging.getLogger(__name__)
@@ -40,6 +41,33 @@ class Qemu(BaseManager):
_NODE_CLASS = QemuVM
_NODE_TYPE = "qemu"
def __init__(self):
super().__init__()
self._guest_cid_lock = asyncio.Lock()
async def create_node(self, *args, **kwargs):
"""
Creates a new Qemu VM.
:returns: QemuVM instance
"""
node = await super().create_node(*args, **kwargs)
# allocate a guest console ID (CID)
if node.console_type != "none" and node.console:
# by default, the guest CID is equal to the console port
node.guest_cid = node.console
else:
# otherwise pick a guest CID if no console port is configured
async with self._guest_cid_lock:
# wait for a node to be completely created before adding a new one
# this is important otherwise we allocate the same guest ID
# when creating multiple Qemu VMs at the same time
node.guest_cid = get_next_guest_cid(self.nodes)
return node
@staticmethod
async def get_kvm_archs():
"""
+49 -6
View File
@@ -36,6 +36,7 @@ import json
from gns3server.utils import parse_version
from gns3server.utils.asyncio import subprocess_check_output, cancellable_wait_run_in_executor
from .qemu_error import QemuError
from .utils.qcow2 import Qcow2, Qcow2Error
from ..adapters.ethernet_adapter import EthernetAdapter
from ..nios.nio_udp import NIOUDP
from ..nios.nio_tap import NIOTAP
@@ -43,7 +44,6 @@ from ..base_node import BaseNode
from ...schemas.qemu import QEMU_OBJECT_SCHEMA, QEMU_PLATFORMS
from ...utils.asyncio import monitor_process
from ...utils.images import md5sum
from .qcow2 import Qcow2, Qcow2Error
from ...utils import macaddress_to_int, int_to_macaddress
@@ -80,6 +80,7 @@ class QemuVM(BaseNode):
self._qemu_img_stdout_file = ""
self._execute_lock = asyncio.Lock()
self._local_udp_tunnels = {}
self._guest_cid = None
# QEMU VM settings
if qemu_path:
@@ -124,6 +125,26 @@ class QemuVM(BaseNode):
self.adapters = 1 # creates 1 adapter by default
log.info('QEMU VM "{name}" [{id}] has been created'.format(name=self._name, id=self._id))
@property
def guest_cid(self):
"""
Returns the CID (console ID) which is an unique identifier between 3 and 65535
:returns: integer between 3 and 65535
"""
return self._guest_cid
@guest_cid.setter
def guest_cid(self, guest_cid):
"""
Set the CID (console ID) which is an unique identifier between 3 and 65535
:returns: integer between 3 and 65535
"""
self._guest_cid = guest_cid
@property
def monitor(self):
"""
@@ -413,10 +434,31 @@ class QemuVM(BaseNode):
:param cdrom_image: QEMU cdrom image path
"""
self._cdrom_image = self.manager.get_abs_image_path(cdrom_image, self.project.path)
log.info('QEMU VM "{name}" [{id}] has set the QEMU cdrom image path to {cdrom_image}'.format(name=self._name,
id=self._id,
cdrom_image=self._cdrom_image))
if cdrom_image:
self._cdrom_image = self.manager.get_abs_image_path(cdrom_image, self.project.path)
log.info('QEMU VM "{name}" [{id}] has set the QEMU cdrom image path to {cdrom_image}'.format(name=self._name,
id=self._id,
cdrom_image=self._cdrom_image))
else:
self._cdrom_image = ""
async def update_cdrom_image(self):
"""
Update the cdrom image path for the Qemu guest OS
"""
if self.is_running():
if self._cdrom_image:
self._cdrom_option() # this will check the cdrom image is accessible
await self._control_vm("eject -f ide1-cd0")
await self._control_vm("change ide1-cd0 {}".format(self._cdrom_image))
log.info('QEMU VM "{name}" [{id}] has changed the cdrom image path to {cdrom_image}'.format(name=self._name,
id=self._id,
cdrom_image=self._cdrom_image))
else:
await self._control_vm("eject -f ide1-cd0")
log.info('QEMU VM "{name}" [{id}] has ejected the cdrom image'.format(name=self._name, id=self._id))
@property
def bios_image(self):
@@ -1917,7 +1959,8 @@ class QemuVM(BaseNode):
additional_options = additional_options.replace("%vm-id%", self._id)
additional_options = additional_options.replace("%project-id%", self.project.id)
additional_options = additional_options.replace("%project-path%", '"' + self.project.path.replace('"', '\\"') + '"')
if self._console:
additional_options = additional_options.replace("%guest-cid%", str(self._guest_cid))
if self._console_type != "none" and self._console:
additional_options = additional_options.replace("%console-port%", str(self._console))
command = [self.qemu_path]
command.extend(["-name", self._name])
Whitespace-only changes.
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ..qemu_error import QemuError
import logging
log = logging.getLogger(__name__)
def get_next_guest_cid(nodes):
"""
Calculates free guest_id from given nodes
:param nodes:
:raises QemuError when exceeds number
:return: integer first free cid
"""
used = set([n.guest_cid for n in nodes])
pool = set(range(3, 65535))
try:
return (pool - used).pop()
except KeyError:
raise QemuError("Cannot create a new Qemu VM (limit of 65535 guest ID on one host reached)")
File renamed without changes.
-113
View File
@@ -175,7 +175,6 @@ class Controller:
try:
if not os.path.exists(self._config_file):
await self._import_gns3_gui_conf()
self._config_loaded = True
self.save()
with open(self._config_file) as f:
@@ -254,118 +253,6 @@ class Controller:
os.makedirs(images_path, exist_ok=True)
return images_path
async def _import_gns3_gui_conf(self):
"""
Import old config from GNS3 GUI
"""
config_file = os.path.join(os.path.dirname(self._config_file), "gns3_gui.conf")
if os.path.exists(config_file):
with open(config_file) as f:
settings = json.load(f)
server_settings = settings.get("Servers", {})
for remote in server_settings.get("remote_servers", []):
try:
await self.add_compute(host=remote.get("host", "localhost"),
port=remote.get("port", 3080),
protocol=remote.get("protocol", "http"),
name=remote.get("url"),
user=remote.get("user"),
password=remote.get("password"))
except aiohttp.web.HTTPConflict:
pass # if the server is broken we skip it
if "vm" in server_settings:
vmname = None
vm_settings = server_settings["vm"]
if vm_settings["virtualization"] == "VMware":
engine = "vmware"
vmname = vm_settings.get("vmname", "")
elif vm_settings["virtualization"] == "VirtualBox":
engine = "virtualbox"
vmname = vm_settings.get("vmname", "")
else:
engine = "remote"
# In case of remote server we match the compute with url parameter
for compute in self._computes.values():
if compute.host == vm_settings.get("remote_vm_host") and compute.port == vm_settings.get("remote_vm_port"):
vmname = compute.name
if vm_settings.get("auto_stop", True):
when_exit = "stop"
else:
when_exit = "keep"
self.gns3vm.settings = {
"engine": engine,
"enable": vm_settings.get("auto_start", False),
"when_exit": when_exit,
"headless": vm_settings.get("headless", False),
"vmname": vmname
}
vms = []
for vm in settings.get("Qemu", {}).get("vms", []):
vm["template_type"] = "qemu"
vms.append(vm)
for vm in settings.get("IOU", {}).get("devices", []):
vm["template_type"] = "iou"
vms.append(vm)
for vm in settings.get("Docker", {}).get("containers", []):
vm["template_type"] = "docker"
vms.append(vm)
for vm in settings.get("Builtin", {}).get("cloud_nodes", []):
vm["template_type"] = "cloud"
vms.append(vm)
for vm in settings.get("Builtin", {}).get("ethernet_switches", []):
vm["template_type"] = "ethernet_switch"
vms.append(vm)
for vm in settings.get("Builtin", {}).get("ethernet_hubs", []):
vm["template_type"] = "ethernet_hub"
vms.append(vm)
for vm in settings.get("Dynamips", {}).get("routers", []):
vm["template_type"] = "dynamips"
vms.append(vm)
for vm in settings.get("VMware", {}).get("vms", []):
vm["template_type"] = "vmware"
vms.append(vm)
for vm in settings.get("VirtualBox", {}).get("vms", []):
vm["template_type"] = "virtualbox"
vms.append(vm)
for vm in settings.get("VPCS", {}).get("nodes", []):
vm["template_type"] = "vpcs"
vms.append(vm)
for vm in settings.get("TraceNG", {}).get("nodes", []):
vm["template_type"] = "traceng"
vms.append(vm)
for vm in vms:
# remove deprecated properties
for prop in vm.copy():
if prop in ["enable_remote_console", "use_ubridge", "acpi_shutdown"]:
del vm[prop]
# remove deprecated default_symbol and hover_symbol
# and set symbol if not present
deprecated = ["default_symbol", "hover_symbol"]
if len([prop for prop in vm.keys() if prop in deprecated]) > 0:
if "default_symbol" in vm.keys():
del vm["default_symbol"]
if "hover_symbol" in vm.keys():
del vm["hover_symbol"]
if "symbol" not in vm.keys():
vm["symbol"] = ":/symbols/computer.svg"
vm.setdefault("template_id", str(uuid.uuid4()))
try:
template = Template(vm["template_id"], vm)
template.__json__() # Check if loaded without error
self.template_manager.templates[template.id] = template
except KeyError as e:
# template data is not complete (missing name or type)
log.warning("Cannot load template {} ('{}'): missing key {}".format(vm["template_id"], vm.get("name", "unknown"), e))
continue
async def add_compute(self, compute_id=None, name=None, force=False, connect=True, **kwargs):
"""
Add a server to the dictionary of computes controlled by this controller
+1 -1
View File
@@ -58,7 +58,7 @@ class CrashReport:
Report crash to a third party service
"""
DSN = "https://eb9c34a9e4504bf99a6392a3ed2e0568:65d873fc33544886b239628c5e8577e4@sentry.io/38482"
DSN = "https://52dee6fc5b2a4a61880328386919e2f4:c84e7bbd39ce43b7aec27349e49fedf0@sentry.io/38482"
if hasattr(sys, "frozen"):
cacert = get_resource("cacert.pem")
if cacert is not None and os.path.isfile(cacert):
@@ -116,7 +116,7 @@ class QEMUHandler:
description="Update a Qemu VM instance",
input=QEMU_UPDATE_SCHEMA,
output=QEMU_OBJECT_SCHEMA)
def update(request, response):
async def update(request, response):
qemu_manager = Qemu.instance()
vm = qemu_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
@@ -125,6 +125,9 @@ class QEMUHandler:
for name, value in request.json.items():
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
if name == "cdrom_image":
# let the guest know about the new cdrom image
await vm.update_cdrom_image()
vm.updated()
response.json(vm)
+1
View File
@@ -28,6 +28,7 @@ IOU_TEMPLATE_PROPERTIES = {
"usage": {
"description": "How to use the IOU VM",
"type": "string",
"default": ""
},
"ethernet_adapters": {
"description": "Number of ethernet adapters",
+1 -1
View File
@@ -253,5 +253,5 @@ class Hypervisor(UBridgeHypervisor):
command = [self._path]
command.extend(["-H", "{}:{}".format(self._host, self._port)])
if log.getEffectiveLevel() == logging.DEBUG:
command.extend(["-d", "2"])
command.extend(["-d", "1"])
return command
+1 -1
View File
@@ -23,7 +23,7 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)
__version__ = "2.2.0b2"
__version__ = "2.2.0b3"
__version_info__ = (2, 2, 0, -99)
# If it's a git checkout try to add the commit
+1 -1
View File
@@ -146,7 +146,7 @@ deb-src http://archive.ubuntu.com/ubuntu/ ${UBUNTU_CODENAME}-updates main univer
EOFLIST2
fi
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A2E3EF7B
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A2E3EF7B
log "Update system packages"
apt-get update
+202 -18
View File
@@ -99,7 +99,7 @@ def test_create(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -138,7 +138,7 @@ def test_create_with_tag(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -180,7 +180,7 @@ def test_create_vnc(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
'/tmp/.X11-unix/:/tmp/.X11-unix/'
],
"Privileged": True
@@ -296,7 +296,7 @@ def test_create_start_cmd(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -396,7 +396,7 @@ def test_create_image_not_available(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -439,7 +439,7 @@ def test_create_with_user(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -509,8 +509,35 @@ def test_create_with_extra_volumes_duplicate_1_image(loop, project, manager):
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]) as mock_list_images:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response) as mock:
vm = DockerVM("test", str(uuid.uuid4()), project, manager, "ubuntu:latest", extra_volumes=["/vol/1"])
with pytest.raises(DockerError):
loop.run_until_complete(asyncio.ensure_future(vm.create()))
loop.run_until_complete(asyncio.ensure_future(vm.create()))
mock.assert_called_with("POST", "containers/create", data={
"Tty": True,
"OpenStdin": True,
"StdinOnce": False,
"HostConfig":
{
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/vol/1".format(os.path.join(vm.working_dir, "vol", "1")),
],
"Privileged": True
},
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network:/vol/1"
],
"Entrypoint": ["/gns3/init.sh"],
"Cmd": ["/bin/sh"]
})
assert vm._cid == "e90e34656806"
def test_create_with_extra_volumes_duplicate_2_user(loop, project, manager):
@@ -521,8 +548,35 @@ def test_create_with_extra_volumes_duplicate_2_user(loop, project, manager):
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]) as mock_list_images:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response) as mock:
vm = DockerVM("test", str(uuid.uuid4()), project, manager, "ubuntu:latest", extra_volumes=["/vol/1", "/vol/1"])
with pytest.raises(DockerError):
loop.run_until_complete(asyncio.ensure_future(vm.create()))
loop.run_until_complete(asyncio.ensure_future(vm.create()))
mock.assert_called_with("POST", "containers/create", data={
"Tty": True,
"OpenStdin": True,
"StdinOnce": False,
"HostConfig":
{
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/vol/1".format(os.path.join(vm.working_dir, "vol", "1")),
],
"Privileged": True
},
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network:/vol/1"
],
"Entrypoint": ["/gns3/init.sh"],
"Cmd": ["/bin/sh"]
})
assert vm._cid == "e90e34656806"
def test_create_with_extra_volumes_duplicate_3_subdir(loop, project, manager):
@@ -533,8 +587,35 @@ def test_create_with_extra_volumes_duplicate_3_subdir(loop, project, manager):
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]) as mock_list_images:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response) as mock:
vm = DockerVM("test", str(uuid.uuid4()), project, manager, "ubuntu:latest", extra_volumes=["/vol/1/", "/vol"])
with pytest.raises(DockerError):
loop.run_until_complete(asyncio.ensure_future(vm.create()))
loop.run_until_complete(asyncio.ensure_future(vm.create()))
mock.assert_called_with("POST", "containers/create", data={
"Tty": True,
"OpenStdin": True,
"StdinOnce": False,
"HostConfig":
{
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/vol".format(os.path.join(vm.working_dir, "vol")),
],
"Privileged": True
},
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network:/vol"
],
"Entrypoint": ["/gns3/init.sh"],
"Cmd": ["/bin/sh"]
})
assert vm._cid == "e90e34656806"
def test_create_with_extra_volumes_duplicate_4_backslash(loop, project, manager):
@@ -545,8 +626,111 @@ def test_create_with_extra_volumes_duplicate_4_backslash(loop, project, manager)
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]) as mock_list_images:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response) as mock:
vm = DockerVM("test", str(uuid.uuid4()), project, manager, "ubuntu:latest", extra_volumes=["/vol//", "/vol"])
with pytest.raises(DockerError):
loop.run_until_complete(asyncio.ensure_future(vm.create()))
loop.run_until_complete(asyncio.ensure_future(vm.create()))
mock.assert_called_with("POST", "containers/create", data={
"Tty": True,
"OpenStdin": True,
"StdinOnce": False,
"HostConfig":
{
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/vol".format(os.path.join(vm.working_dir, "vol")),
],
"Privileged": True
},
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network:/vol"
],
"Entrypoint": ["/gns3/init.sh"],
"Cmd": ["/bin/sh"]
})
assert vm._cid == "e90e34656806"
def test_create_with_extra_volumes_duplicate_5_subdir_issue_1595(loop, project, manager):
response = {
"Id": "e90e34656806",
"Warnings": [],
}
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]) as mock_list_images:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response) as mock:
vm = DockerVM("test", str(uuid.uuid4()), project, manager, "ubuntu:latest", extra_volumes=["/etc"])
loop.run_until_complete(asyncio.ensure_future(vm.create()))
mock.assert_called_with("POST", "containers/create", data={
"Tty": True,
"OpenStdin": True,
"StdinOnce": False,
"HostConfig":
{
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc".format(os.path.join(vm.working_dir, "etc")),
],
"Privileged": True
},
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc"
],
"Entrypoint": ["/gns3/init.sh"],
"Cmd": ["/bin/sh"]
})
assert vm._cid == "e90e34656806"
def test_create_with_extra_volumes_duplicate_6_subdir_issue_1595(loop, project, manager):
response = {
"Id": "e90e34656806",
"Warnings": [],
}
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]) as mock_list_images:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value=response) as mock:
vm = DockerVM("test", str(uuid.uuid4()), project, manager, "ubuntu:latest", extra_volumes=["/etc/test", "/etc"])
loop.run_until_complete(asyncio.ensure_future(vm.create()))
mock.assert_called_with("POST", "containers/create", data={
"Tty": True,
"OpenStdin": True,
"StdinOnce": False,
"HostConfig":
{
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc".format(os.path.join(vm.working_dir, "etc")),
],
"Privileged": True
},
"Volumes": {},
"NetworkDisabled": True,
"Name": "test",
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc"
],
"Entrypoint": ["/gns3/init.sh"],
"Cmd": ["/bin/sh"]
})
assert vm._cid == "e90e34656806"
def test_create_with_extra_volumes(loop, project, manager):
@@ -572,7 +756,7 @@ def test_create_with_extra_volumes(loop, project, manager):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/vol/1".format(os.path.join(vm.working_dir, "vol", "1")),
"{}:/gns3volumes/vol/2".format(os.path.join(vm.working_dir, "vol", "2")),
],
@@ -795,7 +979,7 @@ def test_update(loop, vm):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -864,7 +1048,7 @@ def test_update_running(loop, vm):
"CapAdd": ["ALL"],
"Binds": [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network"))
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network"))
],
"Privileged": True
},
@@ -1138,7 +1322,7 @@ def test_mount_binds(vm, tmpdir):
dst = os.path.join(vm.working_dir, "test/experimental")
assert vm._mount_binds(image_infos) == [
"{}:/gns3:ro".format(get_resource("compute/docker/resources")),
"{}:/gns3volumes/etc/network:rw".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes/etc/network".format(os.path.join(vm.working_dir, "etc", "network")),
"{}:/gns3volumes{}".format(dst, "/test/experimental")
]
+1 -1
View File
@@ -20,7 +20,7 @@ import pytest
import shutil
import asyncio
from gns3server.compute.qemu.qcow2 import Qcow2, Qcow2Error
from gns3server.compute.qemu.utils.qcow2 import Qcow2, Qcow2Error
def qemu_img():
-91
View File
@@ -106,97 +106,6 @@ def test_import_computes_1_x(controller, controller_config_path, async_run):
assert compute.password is None
def test_import_gns3vm_1_x(controller, controller_config_path, async_run):
"""
At first start the server should import the
gns3vm settings from the gns3_gui 1.X
"""
gns3_gui_conf = {
"Servers": {
"vm": {
"adjust_local_server_ip": True,
"auto_start": True,
"auto_stop": False,
"headless": True,
"remote_vm_host": "",
"remote_vm_password": "",
"remote_vm_port": 3080,
"remote_vm_protocol": "http",
"remote_vm_url": "",
"remote_vm_user": "",
"virtualization": "VMware",
"vmname": "GNS3 VM",
"vmx_path": "/Users/joe/Documents/Virtual Machines.localized/GNS3 VM.vmwarevm/GNS3 VM.vmx"
}
}
}
config_dir = os.path.dirname(controller_config_path)
os.makedirs(config_dir, exist_ok=True)
with open(os.path.join(config_dir, "gns3_gui.conf"), "w+") as f:
json.dump(gns3_gui_conf, f)
controller.gns3vm.settings["engine"] = None
async_run(controller._load_controller_settings())
assert controller.gns3vm.settings["engine"] == "vmware"
assert controller.gns3vm.settings["enable"]
assert controller.gns3vm.settings["headless"]
assert controller.gns3vm.settings["when_exit"] == "keep"
assert controller.gns3vm.settings["vmname"] == "GNS3 VM"
def test_import_remote_gns3vm_1_x(controller, controller_config_path, async_run):
"""
At first start the server should import the
computes and remote GNS3 VM from the gns3_gui 1.X
"""
gns3_gui_conf = {
"Servers": {
"remote_servers": [
{
"host": "127.0.0.1",
"password": "",
"port": 3080,
"protocol": "http",
"url": "http://127.0.0.1:3080",
"user": ""
},
{
"host": "127.0.0.1",
"password": "",
"port": 3081,
"protocol": "http",
"url": "http://127.0.0.1:3081",
"user": ""
}
],
"vm": {
"adjust_local_server_ip": True,
"auto_start": True,
"auto_stop": False,
"headless": True,
"remote_vm_host": "127.0.0.1",
"remote_vm_password": "",
"remote_vm_port": 3081,
"remote_vm_protocol": "http",
"remote_vm_url": "http://127.0.0.1:3081",
"remote_vm_user": "",
"virtualization": "remote",
"vmname": "GNS3 VM",
"vmx_path": "/Users/joe/Documents/Virtual Machines.localized/GNS3 VM.vmwarevm/GNS3 VM.vmx"
}
}
}
config_dir = os.path.dirname(controller_config_path)
os.makedirs(config_dir, exist_ok=True)
with open(os.path.join(config_dir, "gns3_gui.conf"), "w+") as f:
json.dump(gns3_gui_conf, f)
with asyncio_patch("gns3server.controller.compute.Compute.connect"):
async_run(controller._load_controller_settings())
assert controller.gns3vm.settings["engine"] == "remote"
assert controller.gns3vm.settings["vmname"] == "http://127.0.0.1:3081"
def test_load_projects(controller, projects_dir, async_run):
controller.save()