summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/dns.py
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-01-31 18:05:07 +0100
committerRob Crittenden <rcritten@redhat.com>2011-01-31 22:15:45 -0500
commit0dce1bc9e13d54f223b45d44e9a2108c995cd455 (patch)
treef78480e135867977b1dea0c22217a2c209fc1c39 /ipalib/plugins/dns.py
parenta7e89190fae68633ecfe0c0d8c5d7702b123c0fd (diff)
downloadfreeipa-0dce1bc9e13d54f223b45d44e9a2108c995cd455.tar.gz
freeipa-0dce1bc9e13d54f223b45d44e9a2108c995cd455.tar.xz
freeipa-0dce1bc9e13d54f223b45d44e9a2108c995cd455.zip
Add an address for a nameserver when a new zone is created during install
https://fedorahosted.org/freeipa/ticket/881
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r--ipalib/plugins/dns.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index f770af32..ed117e27 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -286,7 +286,7 @@ class dnszone_add(LDAPCreate):
"""
takes_options = LDAPCreate.takes_options + (
Flag('force',
- doc=_('force DNS zone even if name server not in DNS'),
+ doc=_('force DNS zone creation even if name server not in DNS'),
),
Str('ip_address?', _validate_ipaddr,
doc=_('Add the nameserver to DNS with this IP address'),
@@ -577,6 +577,12 @@ class dnsrecord_add(LDAPCreate, dnsrecord_cmd_w_record_options):
Add new DNS resource record.
"""
no_option_msg = 'No options to add a specific record provided.'
+ takes_options = LDAPCreate.takes_options + (
+ Flag('force',
+ flags=['no_option', 'no_output'],
+ doc=_('force NS record creation even if its hostname is not in DNS'),
+ ),
+ )
def get_options(self):
for option in super(dnsrecord_add, self).get_options():
@@ -589,6 +595,9 @@ class dnsrecord_add(LDAPCreate, dnsrecord_cmd_w_record_options):
return super(dnsrecord_add, self).args_options_2_entry(*keys, **options)
def _nsrecord_pre_callback(self, ldap, dn, entry_attrs, *keys, **options):
+ if options.get('force', False):
+ return dn
+
for ns in options['nsrecord']:
is_ns_rec_resolvable(ns)
return dn