Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/k/a/karesansui-HEAD/karesansui/lib/parser/base/xml_like_conf_parser.py   karesansui(Download)
        if action == "delete":
            dop.add('__',new_key,val)
            dop.delete('__',new_key)
        elif action == "set":
            dop.set('__',new_key,val)

src/k/a/karesansui-HEAD/karesansui/lib/parser/staticroute.py   karesansui(Download)
 
                if action == "delete":
                    dop.delete("__",[target])
 
                orders.append([target])
                    dop.add("__",["ADDRESS%d" % index],ipaddr)
                    if action == "delete":
                        dop.delete("__",["ADDRESS%d" % index])
                    orders.insert(cnt*3+0,["ADDRESS%d" % index])
 
                    dop.add("__",["NETMASK%d" % index],netmask)
                    if action == "delete":
                        dop.delete("__",["NETMASK%d" % index])
                    dop.add("__",["GATEWAY%d" % index],gateway)
                    if action == "delete":
                        dop.delete("__",["GATEWAY%d" % index])
                    orders.insert(cnt*3+2,["GATEWAY%d" % index])
 

src/k/a/karesansui-HEAD/karesansui/lib/parser/modprobe_conf.py   karesansui(Download)
    # 2、パラメータを削除する
    delete_key = '/path/to/include/file2'
    dop.delete("dum",["include",delete_key])
 
    """
    # 2、パラメータを削除する
    delete_key = 'eth3'
    dop.delete("dum",["alias",delete_key])
 
    # 3、パラメータの値を変更する

src/k/a/karesansui-HEAD/karesansui/lib/parser/network.py   karesansui(Download)
    dop.add("dum","NETWORK","1.0.0.0")
    dop.add("dum","NETWORK2","1.0.0.0")
    dop.delete("dum","NETWORK")
    conf = dop.getconf("dum")
    parser.write_conf(conf,dryrun=True)