@auth
    def _GET(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()

        name = base64_decode(str(b64name))

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

        net = NetworkAddress(target)
        ipaddr  = net.ipaddr
        netmask = net.netmask
        netlen  = net.netlen

        gateway = _('N/A')
        flags   = _('N/A')
        ref     = _('N/A')
        use     = _('N/A')
        metric  = _('N/A')

        parser = Parser()
        status = parser.do_status()
        for _k,_v in status.iteritems():
            for _k2,_v2 in _v.iteritems():
                if name == "%s@%s" % (_k2,_k,):
                    gateway = _v2['gateway']
                    flags   = _v2['flags']
                    ref     = _v2['ref']
                    use     = _v2['use']
                    metric  = _v2['metric']

        route = dict(name=name,
                       ipaddr=ipaddr,
                       netmask=netmask,
                       netlen=netlen,
                       device=device,
                       gateway=gateway,
                       flags=flags,
                       ref=ref,
                       use=use,
                       metric=metric,
                       )

        self.view.route = route
        return True
dataset/ETHPy150Open karesansui/karesansui/karesansui/gadget/hostby1staticrouteby1.py/HostBy1StaticRouteBy1._GET/original