(self, structure, imagerepo, tag)
return [imagetag]
Prepare load of OCI image
Prepare load of OCI image
Prepare load of OCI image
def _load_image_step2(self, structure, imagerepo, tag):
        """Prepare load of OCI image"""
        imagetag = imagerepo + ':' + tag
        (config_layer_id, layers) = \
                self._get_from_manifest(structure, imagetag)
        if config_layer_id:
            json_file = structure["repolayers"][config_layer_id]["layer_f"]
            self._move_layer_to_v1repo(json_file, config_layer_id,
                                       "container.json")
        layer_hash_list = []
        for layer_id in layers:
            Msg().out("Info: adding layer:", layer_id, l=Msg.INF)
            filename = str(structure["repolayers"][layer_id]["layer_f"])
            if not self._move_layer_to_v1repo(filename, layer_id):
                Msg().err("Error: copying layer file", filename, l=Msg.VER)
                return []
            layer_hash_list.append(structure["repolayers"][layer_id]["layer_h"])
        self.localrepo.save_json("ancestry", layer_hash_list)
        return [imagetag]
def _load_image_step2 ( self , structure , imagerepo , tag ) : imagetag = imagerepo + ':' + tag ( config_layer_id , layers ) = self . _get_from_manifest ( structure , imagetag ) if config_layer_id : json_file = structure [ "repolayers" ] [ config_layer_id ] [ "layer_f" ] self . _move_layer_to_v1repo ( json_file , config_layer_id , "container.json" ) layer_hash_list = [ ] for layer_id in layers : Msg ( ) . out ( "Info: adding layer:" , layer_id , l = Msg . INF ) filename = str ( structure [ "repolayers" ] [ layer_id ] [ "layer_f" ] ) if not self . _move_layer_to_v1repo ( filename , layer_id ) : Msg ( ) . err ( "Error: copying layer file" , filename , l = Msg . VER ) return [ ] layer_hash_list . append ( structure [ "repolayers" ] [ layer_id ] [ "layer_h" ] ) self . localrepo . save_json ( "ancestry" , layer_hash_list ) return [ imagetag ]