Use custom zonemgr for reverse zones

When DNS is being installed during ipa-{server,dns,replica}-install,
forward and reverse zone is created. However, reverse zone was always
created with default zonemgr even when a custom zonemgr was passed
to the installer as this functionality was missing in function
creating reverse zone.

Consolidate functions creating forward and reverse zones to avoid
code duplication and errors like this one. Reverse zones are now
created with custom zonemgr (when entered by user).

https://fedorahosted.org/freeipa/ticket/2790
This commit is contained in:
Martin Kosek
2012-09-25 10:36:01 +02:00
parent ba5248135c
commit c49bc80494
4 changed files with 33 additions and 70 deletions

View File

@@ -28,7 +28,7 @@ import krbV
from ipapython import ipautil
from ipaserver.install import bindinstance, dsinstance, installutils, certs
from ipaserver.install.bindinstance import add_zone, add_reverse_zone, add_fwd_rr, add_ptr_rr, dns_container_exists
from ipaserver.install.bindinstance import add_zone, add_fwd_rr, add_ptr_rr, dns_container_exists
from ipaserver.install.replication import enable_replication_version_checking
from ipaserver.install.installutils import resolve_host, BadHostError, HostLookupError
from ipaserver.plugins.ldap2 import ldap2
@@ -466,7 +466,7 @@ def main():
if reverse_zone is not None:
print "Using reverse zone %s" % reverse_zone
add_reverse_zone(reverse_zone)
add_zone(reverse_zone)
add_ptr_rr(reverse_zone, ip_address, replica_fqdn)
try: