X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=pdns-pipe-nmc.hs;h=e9b29690aa0a866f2e57749dc41efa14fe304d4f;hp=9e4a72930691ab6b58e53e6220c4d6c495c5e4ce;hb=9ef6b8b7e3a1eeb20cdde32541e6d2aa549ba3b1;hpb=b90215dda1c086c7c288ac9d7e3d75e0516f0fd5 diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index 9e4a729..e9b2969 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -100,3 +100,13 @@ main = do PdnsRequestAXFR xfrreq -> putStrLn ("ERROR\tNo support for AXFR " ++ xfrreq) PdnsRequestPing -> putStrLn "OK" + +-- for testing + +ask str = do + cfg <- readConfig confFile + mgr <- newManager def + ncres <- queryNmc mgr cfg str "test-req-id" + case ncres of + Left e -> putStrLn $ "ERROR\t" ++ e + Right dom -> putStrLn $ pdnsOut RRTypeANY dom