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

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
Servers don't have a loopback IP

        def server_ip(node):
    """Servers don't have a loopback IP"""
    host_links = node.network.links(node)
    return host_links.next().ip
        


src/a/n/ank_le-HEAD/AutoNetkit/compiler/netkitcompiler.py   ank_le(Download)
                advertise_block = ip_as_allocs[child.asn]
                reverse_identifier = ank.rev_dns_identifier(advertise_block)
                child_servers.append( (child.domain, reverse_identifier, ank.server_ip(child)))
            f_root_db = open(os.path.join(bind_dir(self.network, server), "db.root"), 'wb') 
            f_root_db.write( root_dns_template.render(
        for server in caching_servers:
            #root_db_hint = ( ("ns.AS%s" % n.asn, ank.server_ip(n)) for n in ank.dns_hiearchy_parents(server))
            root_db_hint = ( ("ROOT-SERVER", ank.server_ip(n)) for n in root_servers)
            root_db_hint = list(root_db_hint)
#TODO: make caching use parent rather than global root
                        host_cname_list =  host_cname_list,
                        dns_server = server.dns_hostname,
                        dns_server_ip = ank.server_ip(server),
                ))
 
#TODO: ROOT-SERVER can't be part of a domain...  - need to correctly handle case of multiple root servers
# and also need to handle this for case of single root server (ie no hiearchy) probably ok as /etc/resolv.conf points to server itself, not through dns hints
            root_db_hint = ( ("ROOT-SERVER", ank.server_ip(n)) for n in ank.dns_hiearchy_parents(server))
            f_root = open( os.path.join(bind_dir(self.network, server), "db.root"), 'wb')
            f_root.write( root_template.render( root_servers = root_db_hint))
 
        for server in dns_servers:
            f_resolv = open( os.path.join(etc_dir(self.network, server), "resolv.conf"), 'wb')
            f_resolv.write ( resolve_template.render(
                nameservers = [ank.server_ip(server)],