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

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

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1staticroute.py   karesansui(Download)
        dop.set("staticroute", [device,target], gateway)
 
        from karesansui.lib.parser.staticroute import PARSER_COMMAND_ROUTE
        if net.netlen == 32:
            command = "%s add -host %s gw %s dev %s" % (PARSER_COMMAND_ROUTE,ipaddr,gateway,device,)
            command = "%s add -host %s dev %s" % (PARSER_COMMAND_ROUTE,ipaddr,device,)
        else:
            command = "%s add -net %s netmask %s gw %s dev %s" % (PARSER_COMMAND_ROUTE,network,netmask,gateway,device,)

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1staticrouteby1.py   karesansui(Download)
        dop.delete("staticroute", [device,target])
 
        from karesansui.lib.parser.staticroute import PARSER_COMMAND_ROUTE
        if net.netlen == 32:
            command = "%s del -host %s dev %s" % (PARSER_COMMAND_ROUTE,ipaddr,device,)
        else:
            command = "%s del -net %s netmask %s dev %s" % (PARSER_COMMAND_ROUTE,ipaddr,netmask,device,)