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

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

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1firewall.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
from karesansui.lib.firewall.iptables import KaresansuiIpTables
from karesansui.gadget.hostby1firewallrule import validates_rule
from karesansui.lib.utils import get_ifconfig_info, dict_ksort
 
    def _POST(self, *param, **params):
        host_id = self.chk_hostby1(param)
        if host_id is None: return web.notfound()
 
        if not validates_rule(self, is_newrule=True):

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1firewallruleby1.py   karesansui(Download)
import web
 
from karesansui.gadget.hostby1firewallrule import validates_rule
from karesansui.lib.rest import Rest, auth
from karesansui.lib.firewall.iptables import KaresansuiIpTables
    def _PUT(self, *param, **params):
        host_id = self.chk_hostby1(param)
        if host_id is None: return web.notfound()
 
        if not validates_rule(self):