Merge pull request #897 from b-ehlers/appliancev8

Fix appliance schema v8, adapt check.py for schema v8
This commit is contained in:
Jeremy Grossmann 2024-07-07 17:45:46 +02:00 committed by GitHub
commit 87cd5e763c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 169 additions and 168 deletions

View File

@ -96,8 +96,9 @@ def check_appliance(appliance):
if image['filename'] in images:
print('Duplicate image filename ' + image['filename'])
warnings += 1
if image['md5sum'] in md5sums:
print('Duplicate image md5sum ' + image['md5sum'])
md5sum = image.get('checksum') or image.get('md5sum')
if md5sum in md5sums:
print('Duplicate image md5sum ' + md5sum)
sys.exit(1)
versions_found = False
for version in appliance_json['versions']:
@ -107,7 +108,7 @@ def check_appliance(appliance):
print('Unused image ' + image['filename'] + ' in ' + appliance)
warnings += 1
images[image['filename']] = image['version']
md5sums.add(image['md5sum'])
md5sums.add(md5sum)
for version in appliance_json['versions']:
version_match = False

View File

@ -720,7 +720,6 @@
"template_properties"
]
}
}
},
"images": {
"type": "array",
@ -889,6 +888,7 @@
"name"
]
}
}
},
"required": [
"appliance_id",