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

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def dump_identifiers(network, filename):
    with open( filename, 'w') as f_dump:
# writes out lo_ip for routers, and identifying IP for servers
        for my_as in ank.get_as_graphs(network):
            for router in sorted(network.routers(my_as.asn), key = lambda x: x.fqdn):
                f_dump.write( "%s\t%s\n" % (router, router.lo_ip.ip))
            for server in sorted(network.servers(my_as.asn), key = lambda x: x.fqdn):
                    f_dump.write( "%s\t%s\n" % (server, server_ip(server)))
            f_dump.write("\n")
        


src/a/n/ank_le-HEAD/AutoNetkit/internet.py   ank_le(Download)
            ank.dump_graph(g_dns, os.path.join(config.log_dir, "dns"))
            ank.dump_graph(self.network.g_dns_auth, os.path.join(config.log_dir, "dns_auth"))
            ank.dump_identifiers(self.network, os.path.join(config.log_dir, "identifiers.txt"))
            ank.dump_graph(self.network.graph, os.path.join(config.log_dir, "physical"))
            physical_single_edge = nx.Graph(self.network.graph)
            ank.dump_graph(g_dns, os.path.join(config.log_dir, "dns"))
            ank.dump_graph(self.network.g_dns_auth, os.path.join(config.log_dir, "dns_auth"))
            ank.dump_identifiers(self.network, os.path.join(config.log_dir, "identifiers.txt"))
        except:
            LOG.warn("Unable to dump graphs to output file")