Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
queried.
An RPM version is listed only in the layer where it is first installed (or first updated).
Results are printed to stdout as CSV with these columns:
image_id,image_name,image_tag,layer_id,layer_order,layer_command,installed_rpm_file
Note that if a layer does not contain RPMs or is not for an RPM-based distro the results may be empty.
The rows are repeated for each RPM found.
Output is printed to stdout. Use a ">" redirect to save in a file.
"""
headers = 'image_id image_name image_tag layer_id layer_order layer_command installed_rpm_file'.split()
data = installed_rpms_by_image_layer(image_id)
w = unicodecsv.UnicodeWriter(sys.stdout, encoding='utf-8')
w.writerow(headers)
w.writerows(data)