fix: tools/get_network_footprint.py mediatypes and failure handling
What does this MR do and why?
This MR fix defects in tools/get_network_footprint.py.
-
Previously,
application/vnd.oci.image.index.v1+jsonwas incorrectly included inMANIFEST_MEDIA_TYPESinstead ofMANIFEST_LIST_MEDIA_TYPES. This caused failures when retrieving image layers for OCI artifacts, as the code would not properly recognize multi-platform manifests.
This MR corrects the lists to ensure OCI image indexes are handled as manifest lists, fixing layer extraction for affected images. -
Additionally, the script now handles cases where no media type is specified in the manifest by attempting to extract layers directly. If no layers are found, the script will raise an error.
-
The script will also fail if a manifest cannot be read.
-
I've added a small CI job to test the script.
cc @tmmorin