コード例 #1
0
ファイル: config.py プロジェクト: youcef-laribi/experiments
def delete_object_config(obj_type, obj_id):
    before_metasection, metasection, after_metasection = extract_config_sections(
    )

    metasection = remove_object_from_metasection(metasection, obj_type, obj_id)

    merge_config_sections(before_metasection, metasection, after_metasection)
コード例 #2
0
ファイル: config.py プロジェクト: youcef-laribi/experiments
def delete_transient_object_configs():
    before_metasection, metasection, after_metasection = extract_config_sections(
    )

    new_metasection = remove_transient_conflines_from_metasection(metasection)

    merge_config_sections(before_metasection, new_metasection,
                          after_metasection)
コード例 #3
0
ファイル: config.py プロジェクト: ctxs-atlas/experiments
def add_object_config(obj_type, obj):

     before_metasection, metasection, after_metasection = extract_config_sections()

     metasection, obj_id = update_metasection_with_new_object(metasection, obj_type, obj)

     merge_config_sections(before_metasection, metasection, after_metasection)

     return obj_id
コード例 #4
0
ファイル: config.py プロジェクト: youcef-laribi/experiments
def add_object_config(obj_type, obj):

    before_metasection, metasection, after_metasection = extract_config_sections(
    )

    metasection, obj_id = update_metasection_with_new_object(
        metasection, obj_type, obj)

    merge_config_sections(before_metasection, metasection, after_metasection)

    return obj_id
コード例 #5
0
ファイル: config.py プロジェクト: ctxs-atlas/experiments
def update_object_config(obj_type, obj_id, current_obj, obj_updates):
    # Before merging current state with new state, remove any 
    # meta-attributes added during get_object_config()
    if TRANSIENT_META_FIELD in current_obj:
        del current_obj[TRANSIENT_META_FIELD]

    updated_obj = _merge_updates_into_new_obj(current_obj, obj_updates)

    before_metasection, metasection, after_metasection = extract_config_sections()

    updated_obj_str = _convert_obj_to_string(obj_type, obj_id, updated_obj)

    metasection = update_metasection_with_updated_object(metasection, obj_type, obj_id, updated_obj_str)

    merge_config_sections(before_metasection, metasection, after_metasection)

    return updated_obj
コード例 #6
0
ファイル: config.py プロジェクト: youcef-laribi/experiments
def update_object_config(obj_type, obj_id, current_obj, obj_updates):
    # Before merging current state with new state, remove any
    # meta-attributes added during get_object_config()
    if TRANSIENT_META_FIELD in current_obj:
        del current_obj[TRANSIENT_META_FIELD]

    updated_obj = _merge_updates_into_new_obj(current_obj, obj_updates)

    before_metasection, metasection, after_metasection = extract_config_sections(
    )

    updated_obj_str = _convert_obj_to_string(obj_type, obj_id, updated_obj)

    metasection = update_metasection_with_updated_object(
        metasection, obj_type, obj_id, updated_obj_str)

    merge_config_sections(before_metasection, metasection, after_metasection)

    return updated_obj
コード例 #7
0
ファイル: config.py プロジェクト: ctxs-atlas/experiments
def delete_transient_object_configs():
    before_metasection, metasection, after_metasection = extract_config_sections()
    
    new_metasection = remove_transient_conflines_from_metasection(metasection)
    
    merge_config_sections(before_metasection, new_metasection, after_metasection)
コード例 #8
0
ファイル: config.py プロジェクト: ctxs-atlas/experiments
def delete_object_config(obj_type, obj_id):
     before_metasection, metasection, after_metasection = extract_config_sections()

     metasection = remove_object_from_metasection(metasection, obj_type, obj_id)
     
     merge_config_sections(before_metasection, metasection, after_metasection)