예제 #1
0
 def update_operations(old_obj, trans_dict):
     new_ops = []
     for obj in old_obj.db_operations:
         if obj.vtType == 'delete':
             new_ops.append(DBDelete.update_version(obj, trans_dict))
         elif obj.vtType == 'add':
             new_op = DBAdd.update_version(obj, trans_dict)
             new_ops.append(new_op)
         elif obj.vtType == 'change':
             new_op = DBChange.update_version(obj, trans_dict)
             new_ops.append(new_op)
     return new_ops
예제 #2
0
파일: v1_0_4.py 프로젝트: hjanime/VisTrails
 def update_operations(old_obj, trans_dict):
     new_ops = []
     for obj in old_obj.db_operations:
         if obj.vtType == 'delete':
             new_ops.append(DBDelete.update_version(obj, trans_dict))
         elif obj.vtType == 'add':
             new_op = DBAdd.update_version(obj, trans_dict)
             new_ops.append(new_op)
         elif obj.vtType == 'change':
             new_op = DBChange.update_version(obj, trans_dict)
             new_ops.append(new_op)
     return new_ops
예제 #3
0
 def update_operations(old_obj, trans_dict):
     new_ops = []
     for obj in old_obj.db_operations:
         if obj.vtType == "delete":
             new_ops.append(DBDelete.update_version(obj, trans_dict))
         elif obj.vtType == "add":
             if obj.db_what == "portSpec":
                 trans_dict["DBAdd"] = {"data": update_portSpec_op}
                 new_op = DBAdd.update_version(obj, trans_dict)
                 new_ops.append(new_op)
                 del trans_dict["DBAdd"]
             else:
                 new_op = DBAdd.update_version(obj, trans_dict)
                 new_ops.append(new_op)
         elif obj.vtType == "change":
             if obj.db_what == "portSpec":
                 trans_dict["DBChange"] = {"data": update_portSpec_op}
                 new_op = DBChange.update_version(obj, trans_dict)
                 new_ops.append(new_op)
                 del trans_dict["DBChange"]
             else:
                 new_op = DBChange.update_version(obj, trans_dict)
                 new_ops.append(new_op)
     return new_ops
예제 #4
0
 def update_operations(old_obj, trans_dict):
     new_ops = []
     for obj in old_obj.db_operations:
         if obj.vtType == 'delete':
             new_ops.append(DBDelete.update_version(obj, trans_dict))
         elif obj.vtType == 'add':
             if obj.db_what == 'portSpec':
                 trans_dict['DBAdd'] = {'data': update_portSpec_op}
                 new_op = DBAdd.update_version(obj, trans_dict)
                 new_ops.append(new_op)
                 del trans_dict['DBAdd']
             else:
                 new_op = DBAdd.update_version(obj, trans_dict)
                 new_ops.append(new_op)
         elif obj.vtType == 'change':
             if obj.db_what == 'portSpec':
                 trans_dict['DBChange'] = {'data': update_portSpec_op}
                 new_op = DBChange.update_version(obj, trans_dict)
                 new_ops.append(new_op)
                 del trans_dict['DBChange']
             else:
                 new_op = DBChange.update_version(obj, trans_dict)
                 new_ops.append(new_op)
     return new_ops
예제 #5
0
파일: v1_0_2.py 프로젝트: licode/VisTrails
 def update_operations(old_obj, trans_dict):
     new_ops = []
     for obj in old_obj.db_operations:
         if obj.vtType == 'delete':
             new_ops.append(DBDelete.update_version(obj, trans_dict))
         elif obj.vtType == 'add':
             if obj.db_what == 'portSpec':
                 trans_dict['DBAdd'] = {'data': update_portSpec_op}
                 new_op = DBAdd.update_version(obj, trans_dict)
                 new_ops.append(new_op)
                 del trans_dict['DBAdd']
             else:
                 new_op = DBAdd.update_version(obj, trans_dict)
                 new_ops.append(new_op)
         elif obj.vtType == 'change':
             if obj.db_what == 'portSpec':
                 trans_dict['DBChange'] = {'data': update_portSpec_op}
                 new_op = DBChange.update_version(obj, trans_dict)
                 new_ops.append(new_op)
                 del trans_dict['DBChange']
             else:
                 new_op = DBChange.update_version(obj, trans_dict)
                 new_ops.append(new_op)
     return new_ops