@auth
    def _DELETE(self, *param, **params):
        host_id = self.chk_hostby1(param)
        if host_id is None: return web.notfound()
        
        b64name = param[1]
        if not (b64name and host_id):
            return web.badrequest()

        host = findbyhost1(self.orm, host_id)

        name = base64_decode(str(b64name))

        (target, device) = name.split("@")

        net = NetworkAddress(target)
        ipaddr  = net.ipaddr
        netmask = net.netmask
        netlen  = net.netlen
        target = "%s/%s" % (ipaddr,netlen,)

        modules = ["staticroute"]

        dop = read_conf(modules, self, host)
        if dop is False:
            return web.internalerror('Internal Server Error. (Timeout)')

        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,)
        extra_args = {"post-command": command}

        retval = write_conf(dop, self, host, extra_args=extra_args)
        if retval is False:
            return web.internalerror('Internal Server Error. (Adding Task)')

        return web.accepted()
dataset/ETHPy150Open karesansui/karesansui/karesansui/gadget/hostby1staticrouteby1.py/HostBy1StaticRouteBy1._DELETE/original