@auth
    def _PUT(self, *param, **params):
        host_id = self.chk_hostby1(param)
        if host_id == None: return web.notfound()
        
        if not validates_rule(self):
            return web.badrequest(self.view.alert)

        rule_id = int(param[1])
        if not validates_param_id(self, rule_id):
            return web.notfound(self.view.alert)


        self.view.host_id = host_id

        kit = KaresansuiIpTables()
        kit.firewall_xml = kit.read_firewall_xml()

        rule_info = {"target" : self.input.target,
                     "protocol" : self.input.protocol,
                     "source" : self.input.source,
                     "destination" : self.input.destination,
                     "source-port" : self.input.sport,
                     "destination-port" : self.input.dport,
                     "in-interface" : self.input.inif,
                     "out-interface" : self.input.outif,
                     }
        rule_id = kit.modify_rule(rule_id,rule_info)
        kit.write_firewall_xml()
        
        return web.seeother("%s?mode=input" % web.ctx.path)
dataset/ETHPy150Open karesansui/karesansui/karesansui/gadget/hostby1firewallruleby1.py/HostBy1FirewallRuleby1._PUT/operator `is` -> `==`