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

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Returns default router for a server

        def default_route(node):
    """Returns default router for a server"""
#TODO: check node is a server
    if not node.is_server:
        LOG.debug("Only return default route for servers, %s is a %s" % (node, node.device_type))
        return

    for link in node.network.links(node):
        if link.remote_host.is_router:
            return link.remote_ip
        


src/a/n/ank_le-HEAD/AutoNetkit/compiler/netkitcompiler.py   ank_le(Download)
            default_route = None
            if node.is_server:
                default_route = ank.default_route(node)
# add default_route for server to router