(self, structure, imagetag)
Search for OCI manifest and return Config and layer ids
Search for OCI manifest and return Config and layer ids
Search for OCI manifest and return Config and layer ids
def _get_from_manifest(self, structure, imagetag):
        """Search for OCI manifest and return Config and layer ids"""
        try:
            config_layer = \
                    structure["manifest"][imagetag]["json"]["config"]["digest"]
        except (KeyError, ValueError, TypeError):
            config_layer = ""
        try:
            layers = []
            for layer in structure["manifest"][imagetag]["json"]["layers"]:
                layers.append(layer["digest"])
            layers.reverse()
            return (config_layer, layers)
        except (KeyError, ValueError, TypeError):
            return (config_layer, [])
def _get_from_manifest ( self , structure , imagetag ) : try : config_layer = structure [ "manifest" ] [ imagetag ] [ "json" ] [ "config" ] [ "digest" ] except ( KeyError , ValueError , TypeError ) : config_layer = "" try : layers = [ ] for layer in structure [ "manifest" ] [ imagetag ] [ "json" ] [ "layers" ] : layers . append ( layer [ "digest" ] ) layers . reverse ( ) return ( config_layer , layers ) except ( KeyError , ValueError , TypeError ) : return ( config_layer , [ ] )