saltstack/salt — pull request #4861 by techhat (2013-05-06 20:13:46+00:00)
Title: Splitting out dnsutil into separate dig module

Apologies to @hank-at-code42, some code of his was merged that was not correctly reviewed.

The dnsutil module was originally written to provide functionality that would be used by BIND/named. However, it was written in such a way that the functions could be as cross-platform as possible, so that other modules could also make use of it. The dig functions that were added were good, but imposed a requirement upon dig that should never exist inside the dnsutil module itself.

In order to handle this, but minimize workflow breakage for people already using this, I broke out the dig-specific functions into their own module. I also added support functions inside dnsutil to call the relevant functions from dig, if it is installed. The one breakage that will occur was changing check_IP() to check_ip, to make it more Pythonic. I also believe that this function should be moved into a different module entirely, since it can be useful for applications that are not DNS-specific.