Merge pull request #537 from b-ehlers/clean_versions

Cleanup versions
This commit is contained in:
Jeremy Grossmann 2020-08-22 23:34:36 +08:00 committed by GitHub
commit 064ed66987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 149 additions and 108 deletions

View File

@ -49,7 +49,7 @@
},
{
"filename": "vEOS-lab-4.21.1.1F.vmdk",
"version": "4.21.1.1F",
"version": "4.21.1F",
"md5sum": "02bfb7e53781fd44ff02357f201586d9",
"filesize": 358809600,
"download_url": "https://www.arista.com/en/support/software-download"

View File

@ -24,7 +24,7 @@
"images": [
{
"filename": "BCF-Controller-BCF-CE-3.5.0-2016-01-22.qcow2",
"version": "3.5.0-2016-01-22",
"version": "3.5.0",
"md5sum": "d1c2ecf0db8101f6b6d311470697545a",
"filesize": 2860253184,
"download_url": "http://www.bigswitch.com/community-edition"
@ -32,7 +32,7 @@
],
"versions": [
{
"name": "3.5",
"name": "3.5.0",
"images": {
"hda_disk_image": "BCF-Controller-BCF-CE-3.5.0-2016-01-22.qcow2"
}

View File

@ -27,7 +27,7 @@
"images": [
{
"filename": "CentOS-7-x86_64-GenericCloud-1809.qcow2",
"version": "7-1809",
"version": "7 (1809)",
"md5sum": "da79108d1324b27bd1759362b82fbe40",
"filesize": 914948096,
"download_url": "https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1809.qcow2"

View File

@ -28,25 +28,11 @@
},
"images": [
{
"filename": "Cisco-vWLC-AIR-CTVM-7-3-101-0-file1.iso",
"version": "7.3.101.0",
"md5sum": "6bf17dceaf46e57aab0fb0d43eb6ea06",
"filesize": 157900800,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=7.3.101.0"
},
{
"filename": "AIR-CTVM-7-6-110-0-file1.iso",
"version": "7.6.110.0",
"md5sum": "7acbd88120f008a25d849b72b7207e92",
"filesize": 185561088,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=7.6.110.0"
},
{
"filename": "AIR-CTVM-k9-8-1-120.0.iso",
"version": "8.1.120.0",
"md5sum": "477363f88f07f64499bb4ab80ffa9d2f",
"filesize": 302104576,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.1.120.0"
"filename": "MFG_CTVM_8_3_102_0.iso",
"version": "8.3.102.0",
"md5sum": "7f6b7968b5bed04b5ecc119b6ba4e41c",
"filesize": 365996032,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.3.102.0"
},
{
"filename": "MFG_CTVM_8_2_141_0.iso",
@ -56,11 +42,25 @@
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.2.141.0"
},
{
"filename": "MFG_CTVM_8_3_102_0.iso",
"version": "8.3.102.0",
"md5sum": "7f6b7968b5bed04b5ecc119b6ba4e41c",
"filesize": 365996032,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.3.102.0"
"filename": "AIR-CTVM-k9-8-1-120.0.iso",
"version": "8.1.120.0",
"md5sum": "477363f88f07f64499bb4ab80ffa9d2f",
"filesize": 302104576,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=8.1.120.0"
},
{
"filename": "AIR-CTVM-7-6-110-0-file1.iso",
"version": "7.6.110.0",
"md5sum": "7acbd88120f008a25d849b72b7207e92",
"filesize": 185561088,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=7.6.110.0"
},
{
"filename": "Cisco-vWLC-AIR-CTVM-7-3-101-0-file1.iso",
"version": "7.3.101.0",
"md5sum": "6bf17dceaf46e57aab0fb0d43eb6ea06",
"filesize": 157900800,
"download_url": "https://software.cisco.com/download/release.html?mdfid=284464214&flowid=&softwareid=280926587&release=7.3.101.0"
},
{
"filename": "empty8G.qcow2",
@ -73,10 +73,10 @@
],
"versions": [
{
"name": "8.1.120.0",
"name": "8.3.102.0",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "AIR-CTVM-k9-8-1-120.0.iso"
"cdrom_image": "MFG_CTVM_8_3_102_0.iso"
}
},
{
@ -87,10 +87,24 @@
}
},
{
"name": "8.3.102.0",
"name": "8.1.120.0",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "MFG_CTVM_8_3_102_0.iso"
"cdrom_image": "AIR-CTVM-k9-8-1-120.0.iso"
}
},
{
"name": "7.6.110.0",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "AIR-CTVM-7-6-110-0-file1.iso"
}
},
{
"name": "7.3.101.0",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "Cisco-vWLC-AIR-CTVM-7-3-101-0-file1.iso"
}
}
]

View File

@ -46,7 +46,7 @@
],
"versions": [
{
"name": "danos-1908-amd64-vrouter",
"name": "1908",
"images": {
"hda_disk_image": "empty8G.qcow2",
"cdrom_image": "danos-1908-amd64-vrouter.iso"

View File

@ -35,7 +35,7 @@
],
"versions": [
{
"name": "Debian 10.2.0",
"name": "10.2.0",
"images": {
"hda_disk_image": "debian10-gns3.qcow2"
}

View File

@ -28,28 +28,28 @@
"images": [
{
"filename": "VOSSGNS3.8.1.5.0.qcow2",
"version": "v8.1.5.0",
"version": "8.1.5.0",
"md5sum": "dff95f67fc04f82f627209ff7b7b3860",
"filesize": 331087872,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.8.1.5.0.qcow2"
},
{
"filename": "VOSSGNS3.8.1.0.0.qcow2",
"version": "v8.1.0.0",
"version": "8.1.0.0",
"md5sum": "6b46fd54999a4cd2369440809ccc5099",
"filesize": 311820288,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.8.1.0.0.qcow2"
},
{
"filename": "VOSSGNS3.7.1.0.0.qcow2",
"version": "voss_7.1.0.0",
"version": "7.1.0.0",
"md5sum": "7bb2974efe1a1ab857debd9fa894dbe7",
"filesize": 193724416,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.7.1.0.0.qcow2"
},
{
"filename": "VOSSGNS3.7.0.0.0.img",
"version": "voss_7.0.0.0",
"version": "7.0.0.0",
"md5sum": "65fe97461156aa88c836a90be1287649",
"filesize": 419430400,
"direct_download_url": "https://akamai-ep.extremenetworks.com/Extreme_P/github-en/Virtual_VOSS/VOSSGNS3.7.0.0.0.img"
@ -57,13 +57,13 @@
],
"versions": [
{
"name": "v8.1.5.0",
"name": "8.1.5.0",
"images": {
"hda_disk_image": "VOSSGNS3.8.1.5.0.qcow2"
}
},
{
"name": "v8.1.0.0",
"name": "8.1.0.0",
"images": {
"hda_disk_image": "VOSSGNS3.8.1.0.0.qcow2"
}

View File

@ -234,14 +234,14 @@
{
"name": "5.0.1",
"images": {
"hda_disk_image": "FAD_KVM-V400-build0989-FORTINET.out.kvm-boot.qcow2",
"hda_disk_image": "FAD_KVM-V500-build0056-FORTINET.out.kvm-boot.qcow2",
"hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
}
},
{
"name": "5.0.0",
"images": {
"hda_disk_image": "FAD_KVM-V400-build0989-FORTINET.out.kvm-boot.qcow2",
"hda_disk_image": "FAD_KVM-V500-build0045-FORTINET.out.kvm-boot.qcow2",
"hdb_disk_image": "FAD_KVM-FORTINET.out.kvm-data.qcow2"
}
},

View File

@ -183,6 +183,13 @@
"hdb_disk_image": "empty30G.qcow2"
}
},
{
"name": "6.0.3",
"images": {
"hda_disk_image": "FMG_VM64_KVM-v6-build0255-FORTINET.out.kvm.qcow2",
"hdb_disk_image": "empty30G.qcow2"
}
},
{
"name": "6.0.2",
"images": {

View File

@ -117,7 +117,13 @@
],
"versions": [
{
"name": "2.23",
"name": "2.23.136",
"images": {
"hda_disk_image": "ipfire-2.23.2gb-ext4.x86_64-full-core136.img"
}
},
{
"name": "2.23.131",
"images": {
"hda_disk_image": "ipfire-2.23.2gb-ext4.x86_64-full-core131.img"
}

View File

@ -468,7 +468,7 @@
}
},
{
"name": "15.1F6.9",
"name": "15.1F6.9-KVM",
"images": {
"hda_disk_image": "junos-vmx-x86-64-15.1F6.9.qcow2",
"hdb_disk_image": "vmxhdd-15.1F6.9.img",

View File

@ -139,14 +139,14 @@
},
{
"filename": "junos-vsrx-vmdisk-15.1X49-D20.2.qcow2",
"version": "15.1X49-D20.2",
"version": "15.1X49-D20",
"md5sum": "43e8000870207db47c1382192319eb45",
"filesize": 2904096768,
"download_url": "https://www.juniper.net/us/en/dm/free-vsrx-trial/"
},
{
"filename": "junos-vsrx-12.1X47-D20.7-domestic-disk1.vmdk",
"version": "12.1X47-D20.7",
"version": "12.1X47-D20",
"md5sum": "d22ed7a7eb131984e892a4430c5f4730",
"filesize": 235894272,
"download_url": "https://www.juniper.net/us/en/dm/free-vsrx-trial/"

View File

@ -49,7 +49,7 @@
},
{
"filename": "LoadMaster-VLM-7.2.36.2.14271.RELEASE-Linux-KVM-XEN-FREE.disk",
"version": "7.1.36.2",
"version": "7.2.36.2",
"md5sum": "eebfc96bd6c1c50827d00647206b59dd",
"filesize": 17179869185,
"download_url": "http://freeloadbalancer.com/download/"

View File

@ -23,7 +23,7 @@
"images": [
{
"filename": "openwrt-15.05.1-realview-vmlinux-initramfs.elf",
"version": "15.05.1",
"version": "Chaos Calmer 15.05.1",
"md5sum": "3660b9de654cf03f2a50997ae89c2daf",
"filesize": 2278696,
"download_url": "http://downloads.openwrt.org/chaos_calmer/15.05.1/realview/generic/",
@ -31,7 +31,7 @@
},
{
"filename": "openwrt-realview-vmlinux-initramfs-14.07.elf",
"version": "14.07",
"version": "Barrier Breaker 14.07",
"md5sum": "2411307d0794baa618537c5dfcb19575",
"filesize": 2183520,
"download_url": "http://downloads.openwrt.org/barrier_breaker/14.07/realview/generic/",

View File

@ -40,15 +40,6 @@
"direct_download_url": "https://downloads.openwrt.org/releases/19.07.2/targets/x86/64/openwrt-19.07.2-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-18.06.8-x86-64-combined-ext4.img",
"version": "18.06.8",
"md5sum": "8b235443df9d1a236b147c1c29a97083",
"filesize": 285736960,
"download_url": "https://downloads.openwrt.org/releases/18.06.8/targets/x86/64/",
"direct_download_url": "https://downloads.openwrt.org/releases/18.06.8/targets/x86/64/openwrt-18.06.8-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-19.07.1-x86-64-combined-ext4.img",
"version": "19.07.1",
@ -58,15 +49,6 @@
"direct_download_url": "https://downloads.openwrt.org/releases/19.07.1/targets/x86/64/openwrt-19.07.1-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-18.06.7-x86-64-combined-ext4.img",
"version": "18.06.7",
"md5sum": "f463f38cccf89e1a2229f74a4c42d3ef",
"filesize": 285736960,
"download_url": "https://downloads.openwrt.org/releases/18.06.7/targets/x86/64/",
"direct_download_url": "https://downloads.openwrt.org/releases/18.06.7/targets/x86/64/openwrt-18.06.7-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-19.07.0-x86-64-combined-ext4.img",
"version": "19.07.0",
@ -76,6 +58,24 @@
"direct_download_url": "https://downloads.openwrt.org/releases/19.07.0/targets/x86/64/openwrt-19.07.0-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-18.06.8-x86-64-combined-ext4.img",
"version": "18.06.8",
"md5sum": "8b235443df9d1a236b147c1c29a97083",
"filesize": 285736960,
"download_url": "https://downloads.openwrt.org/releases/18.06.8/targets/x86/64/",
"direct_download_url": "https://downloads.openwrt.org/releases/18.06.8/targets/x86/64/openwrt-18.06.8-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-18.06.7-x86-64-combined-ext4.img",
"version": "18.06.7",
"md5sum": "f463f38cccf89e1a2229f74a4c42d3ef",
"filesize": 285736960,
"download_url": "https://downloads.openwrt.org/releases/18.06.7/targets/x86/64/",
"direct_download_url": "https://downloads.openwrt.org/releases/18.06.7/targets/x86/64/openwrt-18.06.7-x86-64-combined-ext4.img.gz",
"compression": "gzip"
},
{
"filename": "openwrt-18.06.6-x86-64-combined-ext4.img",
"version": "18.06.6",
@ -144,30 +144,30 @@
"hda_disk_image": "openwrt-19.07.2-x86-64-combined-ext4.img"
}
},
{
"name": "18.06.8",
"images": {
"hda_disk_image": "openwrt-18.06.8-x86-64-combined-ext4.img"
}
},
{
"name": "19.07.1",
"images": {
"hda_disk_image": "openwrt-19.07.1-x86-64-combined-ext4.img"
}
},
{
"name": "18.06.7",
"images": {
"hda_disk_image": "openwrt-18.06.7-x86-64-combined-ext4.img"
}
},
{
"name": "19.07.0",
"images": {
"hda_disk_image": "openwrt-19.07.0-x86-64-combined-ext4.img"
}
},
{
"name": "18.06.8",
"images": {
"hda_disk_image": "openwrt-18.06.8-x86-64-combined-ext4.img"
}
},
{
"name": "18.06.7",
"images": {
"hda_disk_image": "openwrt-18.06.7-x86-64-combined-ext4.img"
}
},
{
"name": "18.06.6",
"images": {
@ -181,25 +181,25 @@
}
},
{
"name": "openwrt 18.06.2",
"name": "18.06.2",
"images": {
"hda_disk_image": "openwrt-18.06.2-x86-64-combined-ext4.img"
}
},
{
"name": "openwrt 18.06.1",
"name": "18.06.1",
"images": {
"hda_disk_image": "openwrt-18.06.1-x86-64-combined-ext4.img"
}
},
{
"name": "openwrt/lede 17.01.6",
"name": "17.01.6",
"images": {
"hda_disk_image": "lede-17.01.6-x86-64-combined-ext4.img"
}
},
{
"name": "openwrt 15.05.1",
"name": "15.05.1",
"images": {
"hda_disk_image": "openwrt-15.05.1-x86-64-combined-ext4.img"
}

View File

@ -70,7 +70,7 @@
},
{
"filename": "PA-VM-ESX-8.1.0-disk1.vmdk",
"version": "8.1.0",
"version": "8.1.0 (ESX)",
"md5sum": "49af8e8225c2e90414bde0be15eaf421",
"filesize": 2281454080,
"download_url": "https://support.paloaltonetworks.com/Updates/SoftwareUpdates/"
@ -84,7 +84,7 @@
},
{
"filename": "PA-VM-ESX-8.0.0-disk1.vmdk",
"version": "8.0.0",
"version": "8.0.0 (ESX)",
"md5sum": "a505fb1dbcc855ecf98630fd5d329f9a",
"filesize": 2002713088,
"download_url": "https://support.paloaltonetworks.com/Updates/SoftwareUpdates/"

View File

@ -152,7 +152,7 @@
}
},
{
"name": "16.05.1 MR1",
"name": "16.05.1 RC1",
"images": {
"hda_disk_image": "VI-SFOS_16.05.0_RC-1.KVM-098-PRIMARY.qcow2",
"hdb_disk_image": "VI-SFOS_16.05.0_RC-1.KVM-098-AUXILARY.qcow2"

View File

@ -34,7 +34,7 @@
},
{
"filename": "linux-tinycore-6.4-2.img",
"version": "6.4",
"version": "6.4~2",
"md5sum": "dcbb5318c3e18ab085088d4474d8de85",
"filesize": 36503552,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
@ -42,7 +42,7 @@
},
{
"filename": "linux-tinycore-6.4.img",
"version": "6.4",
"version": "6.4~1",
"md5sum": "e3de478780c0acb76ef92f872fe734c4",
"filesize": 22544384,
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",

View File

@ -27,7 +27,7 @@
"images": [
{
"filename": "ubuntu-18.04-server-cloudimg-amd64.img",
"version": "18.04",
"version": "18.04 (LTS)",
"md5sum": "f4134e7fa16d7fa766c7467cbe25c949",
"filesize": 336134144,
"download_url": "https://cloud-images.ubuntu.com/releases/18.04/release-20180426.2/ubuntu-18.04-server-cloudimg-amd64.img"
@ -41,14 +41,14 @@
},
{
"filename": "ubuntu-16.04-server-cloudimg-amd64-disk1.img",
"version": "16.04",
"version": "16.04 (LTS)",
"md5sum": "22c124ba65ea096cdef8b0a197dd613a",
"filesize": 290193408,
"download_url": "https://cloud-images.ubuntu.com/releases/16.04/release-20180405/ubuntu-16.04-server-cloudimg-amd64-disk1.img"
},
{
"filename": "ubuntu-14.04-server-cloudimg-amd64-disk1.img",
"version": "14.04",
"version": "14.04 (LTS)",
"md5sum": "d11b89321d41d0eeddcacf73bf0d2262",
"filesize": 262668800,
"download_url": "https://cloud-images.ubuntu.com/releases/14.04/release-20180404/ubuntu-14.04-server-cloudimg-amd64-disk1.img"

View File

@ -27,7 +27,7 @@
"images": [
{
"filename": "Ubuntu Server 18.04.3 LTS (64bit).vmdk",
"version": "18.04.3",
"version": "18.04.3 LTS Server",
"md5sum": "435f15a54f7f673e302ad26f05226e0e",
"filesize": 2707814912,
"download_url": "https://www.ictkin.com/gns3-appliance/"

View File

@ -27,7 +27,7 @@
"images": [
{
"filename": "vpp_public-18.10-07.qcow2",
"version": "0.7",
"version": "18.10-07",
"md5sum": "3e962985e5bbda0de4dc7893e60f6366",
"filesize": 2065825792,
"direct_download_url": "https://sigaba.net/vpp/vpp_public-18.10-07.qcow2"

View File

@ -35,7 +35,7 @@
},
{
"filename": "MSEdge_-_Win10_preview.vmdk",
"version": "10 w/ Edge",
"version": "10 w/ Edge (Preview)",
"md5sum": "e06d97b871581d91b7363bf72a81553d",
"filesize": 10907287552,
"download_url": "https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/"

View File

@ -27,7 +27,10 @@ from picture import get_size
SCHEMA_VERSIONS = [3, 4, 5, 6]
warnings = 0
def validate_schema(appliance_json, name, schemas):
global warnings
version = appliance_json['registry_version']
if version not in SCHEMA_VERSIONS:
@ -42,9 +45,8 @@ def validate_schema(appliance_json, name, schemas):
appliance_json = appliance_json.copy()
appliance_json['registry_version'] = version
jsonschema.validate(appliance_json, schemas[version])
print('Appliance {name} can be downgraded to registry version {version}'.format(name=name,
version=version))
sys.exit(1)
print('Appliance {name} can be downgraded to registry version {version}'.format(name=name, version=version))
warnings += 1
except jsonschema.exceptions.ValidationError:
pass
@ -57,9 +59,8 @@ def signal_abort(sig, frame):
def check_appliance(appliance):
global images
images = set()
global md5sums
global warnings
images = {}
md5sums = set()
schemas = {}
@ -80,19 +81,27 @@ def check_appliance(appliance):
if image['md5sum'] in md5sums:
print('Duplicate image md5sum ' + image['md5sum'])
sys.exit(1)
images.add(image['filename'])
versions_found = False
for version in appliance_json['versions']:
if image['filename'] in version['images'].values():
versions_found = True
if not versions_found:
print('Unused image ' + image['filename'] + ' in ' + appliance)
warnings += 1
images[image['filename']] = image['version']
md5sums.add(image['md5sum'])
for version in appliance_json['versions']:
version_match = False
for image in version['images'].values():
found = False
for i in appliance_json['images']:
if i['filename'] in image:
found = True
if not found:
if image not in images:
print('Missing relation ' + image + ' in ' + appliance + ' for version ' + version['name'])
sys.exit(1)
if images[image] == version['name']:
version_match = True
if not version_match:
print('Version mismatch for version ' + version['name'] + ' in ' + appliance)
sys.exit(1)
def check_packer(packer):
@ -130,6 +139,8 @@ def check_symbol(symbol):
def main():
global warnings
signal.signal(signal.SIGINT, signal_abort)
print("=> Check appliances")
for appliance in os.listdir('appliances'):
@ -143,7 +154,10 @@ def main():
print("=> Check packer files")
for packer in os.listdir('packer'):
check_packer(packer)
print("Everything is ok!")
if warnings:
print("{} warning!".format(warnings))
else:
print("Everything is ok!")
if __name__ == '__main__':
main()