def daemon(args, one_args, **kwargs): test = kwargs.get('test', False) test_vms = kwargs.get('test_vms') srv = server.OneDNS(args.domain, one_kwargs=one_args) srv.daemon(dns_port=args.dns_port, sync_interval=args.sync_interval, test=test, test_vms=test_vms)
def shell(args, one_args, **kwargs): srv = server.OneDNS(args.domain, one_kwargs=one_args) oneclient = srv._one ns = dict(one_dns=srv, oneclient=oneclient, log=logger.log) utils.shell(local_ns=ns)
def one_dns(request, oneclient): dns = server.OneDNS(domain=DOMAIN) dns._one = oneclient dns.start(dns_address=INTERFACE, dns_port=PORT, tcp=True) request.addfinalizer(dns.close) return dns