diff options
| author | Petr Spacek <pspacek@redhat.com> | 2016-03-07 13:30:35 +0100 |
|---|---|---|
| committer | Petr Vobornik <pvoborni@redhat.com> | 2016-04-28 18:46:06 +0200 |
| commit | 6752d6404af13a933105e53ea5875adfb933e293 (patch) | |
| tree | f8b9c52c1adc929f9d00c7c9074b569b275f7604 /ipapython/dnsutil.py | |
| parent | 41464b74f43ab0a7f9ad650bdaac19308fc7ff5c (diff) | |
| download | freeipa-6752d6404af13a933105e53ea5875adfb933e293.tar.gz freeipa-6752d6404af13a933105e53ea5875adfb933e293.tar.xz freeipa-6752d6404af13a933105e53ea5875adfb933e293.zip | |
Move function is_auto_empty_zone() into ipapython.dnsutil
I'm going to extend this so it is better to have it in module.
At the same time it is now using shared assert_absolute_dnsname()
helper.
https://fedorahosted.org/freeipa/ticket/5710
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipapython/dnsutil.py')
| -rw-r--r-- | ipapython/dnsutil.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
