码迷,mamicode.com
首页 > 其他好文 > 详细

haproxy配置增删改查

时间:2016-12-07 02:39:26      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:python   choice   import   false   result   


shutil
json


():
   quit_flag = quit_flag:
       item_list()
       choice = ().strip()
       choice == :
           backend_info = ().strip()
           result = fetch(backend_info)
           (result)
       choice == :
           back_up()
           backend_record_dict = input_json()  key backend_record_dict:
               backend = key
               record = backend_record_dict[key]
           delete(backendrecord)
       choice == :
           back_up()
           backend_record_dict = input_json()  key backend_record_dict:
               backend = key
               record = backend_record_dict[key]
           add(backendrecord)
       choice == :
           back_up()
           backend_record_dict = input_json()  key backend_record_dict:
               backend = key
               record = backend_record_dict[key]
           modify(backendrecord)
       choice == choice == :
           quit_flag = ()
       :
           ()


():
    lis = []
    (lis)


():
    shutil.copyfile()


():
    flag = fetch_list = []
    (=) f:
        line f:
            line.strip() == %():
                flag = line.strip().startswith():  flag = flag line.strip():
                fetch_list.append(line.strip())
    fetch_list


():
    flag = fetch_list = []
    (=) f:
        line f:
            line.strip() == %():
                fetch_list.append()
                flag = line.strip().startswith():  flag = flag line.strip():
                fetch_list.append(line.strip())
    fetch_list


():
    (=) old(=) new:
        flag = line old:
            line.strip().startswith() line.strip() == % :
                flag = new.write(line)
                new_line :
                    new.write(* + new_line + )
                flag line.strip().startswith():  flag = new.write(line)
                line.strip() flag:
                new.write(line)


():
    (=) old(=) new:
        flag = line old:
            line.strip().startswith() line.strip() == % :
                flag = new_line :
                    new.write(* + new_line + )
                    new.flush()
                flag line.strip().startswith():  flag = new.write(line)
                new.flush()
                line.strip() flag:
                new.write(line)
                new.flush()


():
    (=) old(=) new:
        flag = line old:
            line.strip().startswith() line.strip() == % :
                flag = flag line.strip().startswith():  flag = new.write(line)
                new.flush()
                line.strip() flag:
                new.write(line)
                new.flush()


():
    change_flag
    record_list = fetch()  record_list:  (=) old(=) new:
            line old:
                new.write(line)
            new.write(+ + )
            new.write(* + + )
        ()
        change_flag = :  record_list:
            ()
            change_flag = :  record_list.append()
            writer(record_list)
            ()
            change_flag = change_flag :  shutil.move()


():
    change_flag
    record_list = fetch1()  (record_list)
    record_list:  (.center())
        change_flag = :  record_list:
            record_list.remove()  writer1(record_list)  ()
            change_flag = :  writer2()
            ()
            change_flag = change_flag :  shutil.move()
    change_flag


():
    change_flag
    record_list = fetch1()  record_list:  (=) old(=) new:
            line old:
                new.write(line)
            new.write(+ + )
            new.write(* + + )
        change_flag = change_flag :  shutil.move()
    :  delete()
        add()
    change_flag


():
    continue_flag = continue_flag :
        backend_record = ().strip()
        :
            backend_record_dict = json.loads(backend_record)
        :
            ()
            continue_flag = backend_record_dict

__name__ == :
    main()


haproxy配置增删改查

标签:python   choice   import   false   result   

原文地址:http://lifei88.blog.51cto.com/11252623/1880188

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!