(self, directory)
return (None, None)
Get image attributes from image directory in v1 format
Get image attributes from image directory in v1 format
Get image attributes from image directory in v1 format
def _get_image_attributes_v1(self, directory):
        """Get image attributes from image directory in v1 format"""
        files = []
        layer_list = self.load_json("ancestry")
        if layer_list:
            for layer_id in reversed(layer_list):
                layer_file = directory + '/' + layer_id + ".layer"
                if not os.path.exists(layer_file):
                    return (None, None)
                files.append(layer_file)
            json_file_list = [directory + "/container.json",
                              directory + '/' + layer_list[0] + ".json", ]
            for json_file in json_file_list:
                if os.path.exists(json_file):
                    container_json = self.load_json(json_file)
                    return (container_json, files)
        return (None, None)
def _get_image_attributes_v1 ( self , directory ) : files = [ ] layer_list = self . load_json ( "ancestry" ) if layer_list : for layer_id in reversed ( layer_list ) : layer_file = directory + '/' + layer_id + ".layer" if not os . path . exists ( layer_file ) : return ( None , None ) files . append ( layer_file ) json_file_list = [ directory + "/container.json" , directory + '/' + layer_list [ 0 ] + ".json" , ] for json_file in json_file_list : if os . path . exists ( json_file ) : container_json = self . load_json ( json_file ) return ( container_json , files ) return ( None , None )