summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/bindinstance.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipaserver/install/bindinstance.py')
-rw-r--r--ipaserver/install/bindinstance.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 8284f3eaa..c2c4a86b4 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -33,7 +33,8 @@ from ipapython import sysrestore
from ipapython import ipautil
from ipalib.parameters import IA5Str
from ipalib.util import (validate_zonemgr, normalize_zonemgr,
- get_dns_forward_zone_update_policy, get_dns_reverse_zone_update_policy)
+ get_dns_forward_zone_update_policy, get_dns_reverse_zone_update_policy,
+ normalize_zone, get_reverse_zone_default)
from ipapython.ipa_log_manager import *
from ipalib.text import _
@@ -72,12 +73,6 @@ def check_inst(unattended):
return True
-def normalize_zone(zone):
- if zone[-1] != '.':
- return zone + '.'
- else:
- return zone
-
def create_reverse():
return ipautil.user_input("Do you want to configure the reverse zone?", True)
@@ -231,17 +226,6 @@ def verify_reverse_zone(zone, ip_address):
return True
-def get_reverse_zone_default(ip_address):
- ip = netaddr.IPAddress(ip_address)
- items = ip.reverse_dns.split('.')
-
- if ip.version == 4:
- items = items[1:] # /24 for IPv4
- elif ip.version == 6:
- items = items[16:] # /64 for IPv6
-
- return normalize_zone('.'.join(items))
-
def find_reverse_zone(ip_address):
ip = netaddr.IPAddress(ip_address)
zone = normalize_zone(ip.reverse_dns)