diff --git a/CHANGELOG b/CHANGELOG
index a5a834f7..b628fe23 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,14 @@
# Change Log
+## 2.2.52 02/12/2024
+
+* Bundle web-ui v2.2.52
+* Sync appliances
+* Remove restrictions based on file extension when listing images and fix ELF header checks
+* Fix use project name instead of ID for fast duplication when running local server. Fixes #2446
+* Overwrite user resources when the originals have changed.
+* Relax setuptools requirement to allow for easier Debian packaging on Ubuntu Focal & Jammy
+
## 2.2.51 07/11/2024
* Catch error when cannot resize Docker container TTY.
diff --git a/gns3server/appliances/cisco-7200.gns3a b/gns3server/appliances/cisco-7200.gns3a
index 6638702b..3e723e50 100644
--- a/gns3server/appliances/cisco-7200.gns3a
+++ b/gns3server/appliances/cisco-7200.gns3a
@@ -33,11 +33,23 @@
"md5sum": "cbbbea66a253f1dac0fcf81274dc778d",
"filesize": 87756936
},
+ {
+ "filename": "c7200-adventerprisek9-mz.152-4.M11.image",
+ "version": "152-4.M11",
+ "md5sum": "9a2005ad09ce1ec6fe7cf9af1e9b099e",
+ "filesize": 128487680
+ },
{
"filename": "c7200-adventerprisek9-mz.124-24.T5.image",
"version": "124-24.T5",
"md5sum": "6b89d0d804e1f2bb5b8bda66b5692047",
"filesize": 102345240
+ },
+ {
+ "filename": "c7200-a3jk9s-mz.124-25g.image",
+ "version": "124-25G",
+ "md5sum": "9c7cc9b3f3b3571411a7f62faaa2c036",
+ "filesize": 71528984
}
],
"versions": [
@@ -55,12 +67,26 @@
"image": "c7200-advipservicesk9-mz.152-4.S5.image"
}
},
+ {
+ "name": "152-4.M11",
+ "idlepc": "0x6062e5c0",
+ "images": {
+ "image": "c7200-adventerprisek9-mz.152-4.M11.image"
+ }
+ },
{
"name": "124-24.T5",
"idlepc": "0x606df838",
"images": {
"image": "c7200-adventerprisek9-mz.124-24.T5.image"
}
+ },
+ {
+ "name": "124-25G",
+ "idlepc": "0x6066a998",
+ "images": {
+ "image": "c7200-a3jk9s-mz.124-25g.image"
+ }
}
]
}
diff --git a/gns3server/appliances/cisco-asav.gns3a b/gns3server/appliances/cisco-asav.gns3a
index 48ee3196..eacc48d8 100644
--- a/gns3server/appliances/cisco-asav.gns3a
+++ b/gns3server/appliances/cisco-asav.gns3a
@@ -12,7 +12,7 @@
"status": "stable",
"maintainer": "GNS3 Team",
"maintainer_email": "developers@gns3.net",
- "usage": "There is no default password and enable password. A default configuration is present. ASAv goes through a double-boot before becoming active. This is normal and expected.",
+ "usage": "There is no default password and enable password. A default configuration is present. ASAv goes through a double-boot before becoming active. This is normal and expected. Switch to the Telnet console type after the first boot.",
"symbol": ":/symbols/asa.svg",
"first_port_name": "Management0/0",
"port_name_format": "Gi0/{0}",
@@ -26,6 +26,13 @@
"kvm": "require"
},
"images": [
+ {
+ "filename": "asav9-22-1-1.qcow2",
+ "version": "9.22.1.1 CML",
+ "md5sum": "250a924cdc2370208eaac9d1dc8dc9e3",
+ "filesize": 379518976,
+ "download_url": "https://learningnetworkstore.cisco.com/cisco-modeling-labs-personal/cisco-modeling-labs-personal/CML-PERSONAL.html"
+ },
{
"filename": "asav9-18-2.qcow2",
"version": "9.18.2 CML",
@@ -126,6 +133,12 @@
}
],
"versions": [
+ {
+ "name": "9.22.1.1 CML",
+ "images": {
+ "hda_disk_image": "asav9-22-1-1.qcow2"
+ }
+ },
{
"name": "9.18.2 CML",
"images": {
diff --git a/gns3server/appliances/cisco-csr1000v.gns3a b/gns3server/appliances/cisco-csr1000v.gns3a
index d1afb91f..90be6447 100644
--- a/gns3server/appliances/cisco-csr1000v.gns3a
+++ b/gns3server/appliances/cisco-csr1000v.gns3a
@@ -24,12 +24,26 @@
"kvm": "require"
},
"images": [
+ {
+ "filename": "csr1000v-universalk9.17.03.08a-serial.qcow2",
+ "version": "17.03.08a",
+ "md5sum": "6abece87d6db99d9fd6917203e253f91",
+ "filesize": 1421410304,
+ "download_url": "https://software.cisco.com/download/home/286323714/type/282046477/release/Amsterdam-17.3.8a"
+ },
{
"filename": "csr1000v-universalk9.17.03.06-serial.qcow2",
"version": "17.03.06",
"md5sum": "086ab9bef6e66de847af0da3910c60e8",
"filesize": 1422000128,
- "download_url": "https://software.cisco.com/download/home/284364978/type/282046477/release/Gibraltar-16.12.3"
+ "download_url": "https://software.cisco.com/download/home/286323714/type/282046477/release/Amsterdam-17.3.6"
+ },
+ {
+ "filename": "csr1000v-ucmk9.16.12.5-serial.qcow2",
+ "version": "16.12.05",
+ "md5sum": "5c0cc217f0f0648407b34b11a1dd5b8e",
+ "filesize": 844103680,
+ "download_url": "https://software.cisco.com/download/home/286323714/type/286321980/release/16.12.5"
},
{
"filename": "csr1000v-universalk9.16.12.03-serial.qcow2",
@@ -166,13 +180,25 @@
}
],
"versions": [
+ {
+ "name": "17.03.08a",
+ "images": {
+ "hda_disk_image": "csr1000v-universalk9.17.03.08a-serial.qcow2"
+ }
+ },
{
"name": "17.03.06",
"images": {
"hda_disk_image": "csr1000v-universalk9.17.03.06-serial.qcow2"
}
},
- {
+ {
+ "name": "16.12.05",
+ "images": {
+ "hda_disk_image": "csr1000v-ucmk9.16.12.5-serial.qcow2"
+ }
+ },
+ {
"name": "16.12.3",
"images": {
"hda_disk_image": "csr1000v-universalk9.16.12.03-serial.qcow2"
diff --git a/gns3server/appliances/cisco-iou-l2.gns3a b/gns3server/appliances/cisco-iou-l2.gns3a
index 546cc36c..031a608a 100644
--- a/gns3server/appliances/cisco-iou-l2.gns3a
+++ b/gns3server/appliances/cisco-iou-l2.gns3a
@@ -13,11 +13,17 @@
"iou": {
"ethernet_adapters": 4,
"serial_adapters": 0,
- "nvram": 128,
- "ram": 256,
+ "nvram": 512,
+ "ram": 512,
"startup_config": "iou_l2_base_startup-config.txt"
},
"images": [
+ {
+ "filename": "x86_64_crb_linux_l2-adventerprisek9-ms.iol",
+ "version": "17.15.1",
+ "md5sum": "6c587cdfd5056078e70b3f6c26800d66",
+ "filesize": 243251976
+ },
{
"filename": "x86_64_crb_linux_l2-adventerprisek9-ms.bin",
"version": "17.12.1",
@@ -44,6 +50,12 @@
}
],
"versions": [
+ {
+ "name": "17.15.1",
+ "images": {
+ "image": "x86_64_crb_linux_l2-adventerprisek9-ms.iol"
+ }
+ },
{
"name": "17.12.1",
"images": {
diff --git a/gns3server/appliances/cisco-iou-l3.gns3a b/gns3server/appliances/cisco-iou-l3.gns3a
index f7328449..296fd05d 100644
--- a/gns3server/appliances/cisco-iou-l3.gns3a
+++ b/gns3server/appliances/cisco-iou-l3.gns3a
@@ -13,11 +13,17 @@
"iou": {
"ethernet_adapters": 2,
"serial_adapters": 2,
- "nvram": 128,
- "ram": 256,
+ "nvram": 512,
+ "ram": 512,
"startup_config": "iou_l3_base_startup-config.txt"
},
"images": [
+ {
+ "filename": "x86_64_crb_linux-adventerprisek9-ms.iol",
+ "version": "17.15.1",
+ "md5sum": "5d584f6cfbeaadc87d55f613da1049ed",
+ "filesize": 292001512
+ },
{
"filename": "x86_64_crb_linux-adventerprisek9-ms.bin",
"version": "17.12.1",
@@ -44,6 +50,12 @@
}
],
"versions": [
+ {
+ "name": "17.15.1",
+ "images": {
+ "image": "x86_64_crb_linux-adventerprisek9-ms.iol"
+ }
+ },
{
"name": "17.12.1",
"images": {
diff --git a/gns3server/appliances/cisco-vWLC.gns3a b/gns3server/appliances/cisco-vWLC.gns3a
index a17374d7..5dfe1df3 100644
--- a/gns3server/appliances/cisco-vWLC.gns3a
+++ b/gns3server/appliances/cisco-vWLC.gns3a
@@ -28,7 +28,21 @@
"options": ""
},
"images": [
- {
+ {
+ "filename": "MFG_CTVM_8_10_196_0.iso",
+ "version": "8.10.196.0",
+ "md5sum": "6093aca44dcf45c999f83e62dc9aeea2",
+ "filesize": 650809344,
+ "download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.10.196.0"
+ },
+ {
+ "filename": "MFG_CTVM_8_5_182_0.iso",
+ "version": "8.5.182.0",
+ "md5sum": "1cf3c57c2b123e739ab4662ea0abbc34",
+ "filesize": 388579328,
+ "download_url": "https://software.cisco.com/download/home/284464214/type/280926587/release/8.5.182.0"
+ },
+ {
"filename": "MFG_CTVM_8_3_102_0.iso",
"version": "8.3.102.0",
"md5sum": "7f6b7968b5bed04b5ecc119b6ba4e41c",
@@ -73,6 +87,20 @@
}
],
"versions": [
+ {
+ "name": "8.10.196.0",
+ "images": {
+ "hda_disk_image": "empty8G.qcow2",
+ "cdrom_image": "MFG_CTVM_8_10_196_0.iso"
+ }
+ },
+ {
+ "name": "8.5.182.0",
+ "images": {
+ "hda_disk_image": "empty8G.qcow2",
+ "cdrom_image": "MFG_CTVM_8_5_182_0.iso"
+ }
+ },
{
"name": "8.3.102.0",
"images": {
diff --git a/gns3server/appliances/viptela-edge-genericx86-64.gns3a b/gns3server/appliances/viptela-edge-genericx86-64.gns3a
index f729590d..4b802954 100644
--- a/gns3server/appliances/viptela-edge-genericx86-64.gns3a
+++ b/gns3server/appliances/viptela-edge-genericx86-64.gns3a
@@ -10,8 +10,8 @@
"product_url": "http://www.cisco.com/",
"registry_version": 4,
"status": "experimental",
- "maintainer": "Laurent LEVIER",
- "maintainer_email": "laurent.levier@orange.com",
+ "maintainer": "Christopher Uhrig",
+ "maintainer_email": "christopher.uhrig@telekom.de",
"usage": "Initial username is admin, password is admin as well.",
"first_port_name": "Management0/0",
"port_name_format": "Ge0/{0}",
@@ -39,6 +39,20 @@
"md5sum": "4aa487101d4cdc390f53a6e8b6f45ca7",
"filesize": 328400896,
"download_url": "http://www.cisco.com/"
+ },
+ {
+ "filename": "viptela-edge-20.9.5.1-genericx86-64.qcow2",
+ "version": "20.9.5.1",
+ "md5sum": "41d9e981908fd83695de78d6ca5794bd",
+ "filesize": 409468928,
+ "download_url": "https://software.cisco.com/download/home/286320995/type/286321047/release/20.9.5.1"
+ },
+ {
+ "filename": "viptela-edge-20.12.4-genericx86-64.qcow2",
+ "version": "20.12.4",
+ "md5sum": "9f1aedada5e632c7bc29a51c004f4486",
+ "filesize": 411762688,
+ "download_url": "https://software.cisco.com/download/home/286320995/type/286321047/release/20.12.4"
}
],
"versions": [
@@ -53,6 +67,18 @@
"images": {
"hda_disk_image": "viptela-edge-genericx86-64.qcow2"
}
+ },
+ {
+ "name": "20.9.5.1",
+ "images": {
+ "hda_disk_image": "viptela-edge-20.9.5.1-genericx86-64.qcow2"
+ }
+ },
+ {
+ "name": "20.12.4",
+ "images": {
+ "hda_disk_image": "viptela-edge-20.12.4-genericx86-64.qcow2"
+ }
}
]
}
diff --git a/gns3server/appliances/viptela-smart-genericx86-64.gns3a b/gns3server/appliances/viptela-smart-genericx86-64.gns3a
index c877743e..bd960219 100644
--- a/gns3server/appliances/viptela-smart-genericx86-64.gns3a
+++ b/gns3server/appliances/viptela-smart-genericx86-64.gns3a
@@ -24,6 +24,20 @@
"options": "-smp 2,maxcpus=2 -cpu host"
},
"images": [
+ {
+ "filename": "viptela-smart-20.12.4-genericx86-64.qcow2",
+ "version": "20.12.4",
+ "md5sum": "0e7b6468498a89195ab815260bc4cfb6",
+ "filesize": 411762688,
+ "download_url": "https://software.cisco.com/download/home/286320995/type/286321043/release/20.12.4"
+ },
+ {
+ "filename": "viptela-smart-20.9.5.1-genericx86-64.qcow2",
+ "version": "20.9.5.1",
+ "md5sum": "08e105778bb68f8f24f323dfd263a91a",
+ "filesize": 409468928,
+ "download_url": "https://software.cisco.com/download/home/286320995/type/286321043/release/20.9.5.1"
+ },
{
"filename": "viptela-smart-19.2.0-genericx86-64.qcow2",
"version": "19.2.0",
@@ -31,7 +45,7 @@
"filesize": 328400896,
"download_url": "http://www.cisco.com/"
},
- {
+ {
"filename": "viptela-smart-genericx86-64-disk1.vmdk",
"version": "18.3.7",
"md5sum": "ab9b06c212319336810a4b336ec3dd96",
@@ -51,6 +65,18 @@
"images": {
"hda_disk_image": "viptela-smart-19.2.0-genericx86-64.qcow2"
}
+ },
+ {
+ "name": "20.9.5.1",
+ "images": {
+ "hda_disk_image": "viptela-smart-20.9.5.1-genericx86-64.qcow2"
+ }
+ },
+ {
+ "name": "20.12.4",
+ "images": {
+ "hda_disk_image": "viptela-smart-20.12.4-genericx86-64.qcow2"
+ }
}
]
}
diff --git a/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a b/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a
index 8c547ec4..30634abc 100644
--- a/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a
+++ b/gns3server/appliances/viptela-vmanage-genericx86-64.gns3a
@@ -10,8 +10,8 @@
"product_url": "http://www.cisco.com/",
"registry_version": 4,
"status": "experimental",
- "maintainer": "Laurent LEVIER",
- "maintainer_email": "laurent.levier@orange.com",
+ "maintainer": "Christopher Uhrig",
+ "maintainer_email": "christopher.uhrig@telekom.de",
"usage": "Initial username is admin, password is admin as well.",
"qemu": {
"adapter_type": "vmxnet3",
@@ -25,14 +25,28 @@
"options": "-cpu host -smp 2,maxcpus=2"
},
"images": [
- {
+ {
+ "filename": "viptela-vmanage-20.12.4-genericx86-64.qcow2",
+ "version": "20.12.4",
+ "md5sum": "4e0d4c379623c495a0bb671a76a12f9f",
+ "filesize": 4951375872,
+ "download_url": "https://software.cisco.com/download/home/286320995/type/286321039/release/20.12.4"
+ },
+ {
+ "filename": "viptela-vmanage-20.9.5.2-genericx86-64.qcow2",
+ "version": "20.9.5.2",
+ "md5sum": "a8a4ebee0274541200f4fe94a739d454",
+ "filesize": 3133865984,
+ "download_url": "https://software.cisco.com/download/home/286320995/type/286321039/release/20.9.5.2"
+ },
+ {
"filename": "viptela-vmanage-19.2.0-genericx86-64.qcow2",
"version": "19.2.0",
"md5sum": "27ef126f178c6c929a36ad2cf6ed8db7",
"filesize": 1185349632,
"download_url": "http://www.cisco.com/"
},
- {
+ {
"filename": "viptela-vmanage-genericx86-64-disk1.vmdk",
"version": "18.3.7",
"md5sum": "2290c6467c907d9ca9c65793fe898716",
@@ -55,6 +69,20 @@
"hda_disk_image": "viptela-vmanage-19.2.0-genericx86-64.qcow2",
"hdb_disk_image": "empty30G.qcow2"
}
+ },
+ {
+ "name": "20.12.4",
+ "images": {
+ "hda_disk_image": "viptela-vmanage-20.12.4-genericx86-64.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
+ },
+ {
+ "name": "20.9.5.2",
+ "images": {
+ "hda_disk_image": "viptela-vmanage-20.9.5.2-genericx86-64.qcow2",
+ "hdb_disk_image": "empty30G.qcow2"
+ }
},
{
"name": "18.3.7",
diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py
index 5113cfb0..05b0dfe2 100644
--- a/gns3server/controller/__init__.py
+++ b/gns3server/controller/__init__.py
@@ -29,7 +29,7 @@ except ImportError:
from importlib import resources as importlib_resources
from ..config import Config
-from ..utils import parse_version
+from ..utils import parse_version, md5sum
from ..utils.images import default_images_directory
from .project import Project
@@ -289,12 +289,21 @@ class Controller:
except OSError as e:
log.error(str(e))
+
@staticmethod
- def install_resource_files(dst_path, resource_name):
+ def install_resource_files(dst_path, resource_name, upgrade_resources=True):
"""
Install files from resources to user's file system
"""
+ def should_copy(src, dst, upgrade_resources):
+ if not os.path.exists(dst):
+ return True
+ if upgrade_resources is False:
+ return False
+ # copy the resource if it is different
+ return md5sum(src) != md5sum(dst)
+
if hasattr(sys, "frozen") and sys.platform.startswith("win"):
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
for filename in os.listdir(resource_path):
@@ -303,7 +312,7 @@ class Controller:
else:
for entry in importlib_resources.files('gns3server').joinpath(resource_name).iterdir():
full_path = os.path.join(dst_path, entry.name)
- if entry.is_file() and not os.path.exists(full_path):
+ if entry.is_file() and should_copy(str(entry), full_path, upgrade_resources):
log.debug(f'Installing {resource_name} resource file "{entry.name}" to "{full_path}"')
shutil.copy(str(entry), os.path.join(dst_path, entry.name))
elif entry.is_dir():
@@ -319,7 +328,7 @@ class Controller:
dst_path = self.configs_path()
log.info(f"Installing base configs in '{dst_path}'")
try:
- Controller.install_resource_files(dst_path, "configs")
+ Controller.install_resource_files(dst_path, "configs", upgrade_resources=False)
except OSError as e:
log.error(f"Could not install base config files to {dst_path}: {e}")
@@ -332,7 +341,7 @@ class Controller:
dst_path = self.disks_path()
log.info(f"Installing built-in disks in '{dst_path}'")
try:
- Controller.install_resource_files(dst_path, "disks")
+ Controller.install_resource_files(dst_path, "disks", upgrade_resources=False)
except OSError as e:
log.error(f"Could not install disk files to {dst_path}: {e}")
diff --git a/gns3server/controller/appliance_manager.py b/gns3server/controller/appliance_manager.py
index 39012129..9607f629 100644
--- a/gns3server/controller/appliance_manager.py
+++ b/gns3server/controller/appliance_manager.py
@@ -82,7 +82,7 @@ class ApplianceManager:
os.makedirs(appliances_path, exist_ok=True)
return appliances_path
- def builtin_appliances_path(self, delete_first=False):
+ def builtin_appliances_path(self):
"""
Get the built-in appliance storage directory
"""
@@ -91,8 +91,6 @@ class ApplianceManager:
appname = vendor = "GNS3"
resources_path = os.path.expanduser(server_config.get("resources_path", platformdirs.user_data_dir(appname, vendor, roaming=True)))
appliances_dir = os.path.join(resources_path, "appliances")
- if delete_first:
- shutil.rmtree(appliances_dir, ignore_errors=True)
os.makedirs(appliances_dir, exist_ok=True)
return appliances_dir
@@ -101,7 +99,7 @@ class ApplianceManager:
At startup we copy the built-in appliances files.
"""
- dst_path = self.builtin_appliances_path(delete_first=True)
+ dst_path = self.builtin_appliances_path()
log.info(f"Installing built-in appliances in '{dst_path}'")
from . import Controller
try:
diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py
index b1651c1a..743758c7 100644
--- a/gns3server/controller/project.py
+++ b/gns3server/controller/project.py
@@ -588,7 +588,7 @@ class Project:
if node_type == "iou":
async with self._iou_id_lock:
- # wait for a IOU node to be completely created before adding a new one
+ # wait for an IOU node to be completely created before adding a new one
# this is important otherwise we allocate the same application ID (used
# to generate MAC addresses) when creating multiple IOU node at the same time
if "properties" in kwargs.keys():
@@ -1275,7 +1275,10 @@ class Project:
p_work = pathlib.Path(location or self.path).parent.absolute()
t0 = time.time()
new_project_id = str(uuid.uuid4())
- new_project_path = p_work.joinpath(new_project_id)
+ if location:
+ new_project_path = p_work.joinpath(location)
+ else:
+ new_project_path = p_work.joinpath(new_project_id)
# copy dir
await wait_run_in_executor(shutil.copytree, self.path, new_project_path.as_posix(), symlinks=True, ignore_dangling_symlinks=True)
log.info("Project content copied from '{}' to '{}' in {}s".format(self.path, new_project_path, time.time() - t0))
diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py
index 6ad998a5..5336d3e2 100644
--- a/gns3server/crash_report.py
+++ b/gns3server/crash_report.py
@@ -57,7 +57,7 @@ class CrashReport:
Report crash to a third party service
"""
- DSN = "https://088679fcf3aa35f775356982a80fe37c@o19455.ingest.us.sentry.io/38482"
+ DSN = "https://b2ea85d65646be3f56aebf2458337918@o19455.ingest.us.sentry.io/38482"
_instance = None
def __init__(self):
diff --git a/gns3server/static/web-ui/index.html b/gns3server/static/web-ui/index.html
index 8202e755..4ecb05cb 100644
--- a/gns3server/static/web-ui/index.html
+++ b/gns3server/static/web-ui/index.html
@@ -46,6 +46,6 @@
gtag('config', 'G-0BT7QQV1W1');
-
+