summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/host.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2014-05-16 12:21:04 +0200
committerMartin Kosek <mkosek@redhat.com>2014-06-03 15:55:32 +0200
commitb964d2130a15d7b1561c66c721e3257ce0d24305 (patch)
tree6c67297f14b7b1a57e074a18d133d9c32cf27fe6 /ipalib/plugins/host.py
parente70f88c696ef4efe405ef940f99f6955594cd0ab (diff)
downloadfreeipa-b964d2130a15d7b1561c66c721e3257ce0d24305.tar.gz
freeipa-b964d2130a15d7b1561c66c721e3257ce0d24305.tar.xz
freeipa-b964d2130a15d7b1561c66c721e3257ce0d24305.zip
Modified dns related global functions
* Modified functions to use DNSName type * Removed unused functions Part of ticket: IPA should allow internationalized domain names https://fedorahosted.org/freeipa/ticket/3169 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipalib/plugins/host.py')
-rw-r--r--ipalib/plugins/host.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 8f770ff02..64d018532 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -42,6 +42,7 @@ from ipalib.request import context
from ipalib.util import (normalize_sshpubkey, validate_sshpubkey_no_options,
convert_sshpubkey_post)
from ipapython.ipautil import ipa_generate_password, CheckedIPAddress
+from ipapython.dnsutil import DNSName
from ipapython.ssh import SSHPublicKey
from ipapython.dn import DN
@@ -442,7 +443,9 @@ class host_add(LDAPCreate):
host = parts[0]
domain = unicode('.'.join(parts[1:]))
check_reverse = not options.get('no_reverse', False)
- add_records_for_host_validation('ip_address', host, domain,
+ add_records_for_host_validation('ip_address',
+ DNSName(host),
+ DNSName(domain),
options['ip_address'],
check_forward=True,
check_reverse=check_reverse)
@@ -494,7 +497,8 @@ class host_add(LDAPCreate):
if options.get('ip_address'):
add_reverse = not options.get('no_reverse', False)
- add_records_for_host(host, domain, options['ip_address'],
+ add_records_for_host(DNSName(host), DNSName(domain),
+ options['ip_address'],
add_forward=True,
add_reverse=add_reverse)
del options['ip_address']