diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index 7f0a094f2..6ff500b22 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -185,3 +185,9 @@ def assert_absolute_dnsname(name): assert isinstance(name, DNSName), ("name must be DNSName instance, " "got '%s'" % type(name)) assert name.is_absolute(), "name must be absolute, got '%s'" % name + + +def is_auto_empty_zone(zone): + """True if specified zone name exactly matches an automatic empty zone.""" + assert isinstance(zone, DNSName) + return zone in EMPTY_ZONES diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 4c9693368..4597f1c63 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -52,7 +52,7 @@ from ipapython.ipa_log_manager import root_logger from ipapython import config from ipaplatform.paths import paths from ipapython.dn import DN -from ipapython.dnsutil import DNSName, EMPTY_ZONES +from ipapython.dnsutil import DNSName, is_auto_empty_zone SHARE_DIR = paths.USR_SHARE_IPA_DIR PLUGINS_SHARE_DIR = paths.IPA_PLUGINS @@ -1065,12 +1065,6 @@ def check_zone_overlap(zone, raise_on_error=True): raise ValueError(msg) -def is_auto_empty_zone(zone): - """True if specified zone name exactly matches an automatic empty zone.""" - assert isinstance(zone, DNSName) - return zone in EMPTY_ZONES - - def config_replace_variables(filepath, replacevars=dict(), appendvars=dict()): """ Take a key=value based configuration file, and write new version