Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
__URL__: $LINK:composeimage-detail:compose_id$
This API end-point allows retrieving RPM manifest for a given compose.
It will return the exact same data as was imported.
"""
compose = get_object_or_404(Compose, compose_id=kwargs['compose_id'])
cimages = ComposeImage.objects.filter(variant_arch__variant__compose=compose)
manifest = Images()
manifest.compose.date = compose.compose_date.strftime('%Y%m%d')
manifest.compose.id = compose.compose_id
manifest.compose.respin = compose.compose_respin
manifest.compose.type = compose.compose_type.name
for cimage in cimages:
im = Image(None)
im.path = os.path.join(cimage.path.path, cimage.image.file_name)
im.arch = cimage.image.arch
im.bootable = cimage.image.bootable
im.mtime = cimage.image.mtime
im.size = cimage.image.size
im.volume_id = cimage.image.volume_id
im.type = cimage.image.image_type.name
im.format = cimage.image.image_format.name
im.arch = cimage.image.arch
im.disc_number = cimage.image.disc_number
im.disc_count = cimage.image.disc_count
im.checksums = {'sha256': cimage.image.sha256}
im.subvariant = cimage.image.subvariant
if cimage.image.md5:
im.checksums['md5'] = cimage.image.md5
if cimage.image.sha1: