Esempio n. 1
0
def update_modules(old_obj, trans_dict):
    new_modules = []
    for obj in old_obj.db_modules:
        if obj.vtType == 'module':
            new_modules.append(DBModule.update_version(obj, trans_dict))
        elif obj.vtType == 'abstractionRef':
            new_modules.append(DBAbstraction.update_version(obj, trans_dict))
        elif obj.vtType == 'group':
            new_modules.append(DBGroup.update_version(obj, trans_dict))
    return new_modules
Esempio n. 2
0
        def update_abstractionRef(old_obj, trans_dict):
            def get_internal_version(old_obj, trans_dict):
                return str(old_obj.db_version)

            def get_version(old_obj, trans_dict):
                return ""

            new_dict = {"DBAbstraction": {"internal_version": get_internal_version, "version": get_version}}
            new_dict.update(trans_dict)
            return DBAbstraction.update_version(old_obj.db_data, new_dict)
Esempio n. 3
0
 def update_abstractionRef(old_obj, trans_dict):
     def get_internal_version(old_obj, trans_dict):
         return str(old_obj.db_version)
     def get_version(old_obj, trans_dict):
         return ''
     new_dict = {'DBAbstraction':
                 {'internal_version': get_internal_version,
                  'version': get_version}}
     new_dict.update(trans_dict)
     return DBAbstraction.update_version(old_obj.db_data, new_dict)
Esempio n. 4
0
def update_modules(old_obj, trans_dict):
    new_modules = []
    for obj in old_obj.db_modules:
        if obj.vtType == "module":
            new_modules.append(DBModule.update_version(obj, trans_dict))
        elif obj.vtType == "abstractionRef":
            new_modules.append(DBAbstraction.update_version(obj, trans_dict))
        elif obj.vtType == "group":
            new_modules.append(DBGroup.update_version(obj, trans_dict))
    return new_modules
Esempio n. 5
0
        def update_abstractionRef(old_obj, trans_dict):
            def get_internal_version(old_obj, trans_dict):
                return str(old_obj.db_version)

            def get_version(old_obj, trans_dict):
                return ''

            new_dict = {
                'DBAbstraction': {
                    'internal_version': get_internal_version,
                    'version': get_version
                }
            }
            new_dict.update(trans_dict)
            return DBAbstraction.update_version(old_obj.db_data, new_dict)