(self, structure)
return loaded_repositories
Load OCI image repositories
Load OCI image repositories
Load OCI image repositories
def _load_repositories(self, structure):
        """Load OCI image repositories"""
        loaded_repositories = []
        for manifest in structure["index"]["manifests"]:
            if manifest["mediaType"] == \
                    "application/vnd.oci.image.manifest.v1+json":
                loaded_repositories.append(
                    self._load_manifest(structure, manifest))
            elif manifest["mediaType"] == \
                    "application/vnd.oci.image.index.v1+json":
                loaded_repositories.extend(self._load_repositories(
                    self.localrepo.load_json(
                        structure["repolayers"]
                        [manifest["digest"]]["layer_f"])))
        return loaded_repositories
def _load_repositories ( self , structure ) : loaded_repositories = [ ] for manifest in structure [ "index" ] [ "manifests" ] : if manifest [ "mediaType" ] == "application/vnd.oci.image.manifest.v1+json" : loaded_repositories . append ( self . _load_manifest ( structure , manifest ) ) elif manifest [ "mediaType" ] == "application/vnd.oci.image.index.v1+json" : loaded_repositories . extend ( self . _load_repositories ( self . localrepo . load_json ( structure [ "repolayers" ] [ manifest [ "digest" ] ] [ "layer_f" ] ) ) ) return loaded_repositories