summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-09-02 16:42:57 +0200
committerMartin Basti <mbasti@redhat.com>2016-09-06 12:54:38 +0200
commitdce95a14595a37ce83bcf3e28f41feab715d0c81 (patch)
tree978d789e3822390df36e7503b1dd7c2be645d712 /ipaserver
parentafea9616318fbbffc2c296b7c41890db8595e3cc (diff)
downloadfreeipa-dce95a14595a37ce83bcf3e28f41feab715d0c81.tar.gz
freeipa-dce95a14595a37ce83bcf3e28f41feab715d0c81.tar.xz
freeipa-dce95a14595a37ce83bcf3e28f41feab715d0c81.zip
dns: prompt for missing record parts in CLI
Fix the code which determines if a record part is required and thus should be prompted not to wrongfully consider all record parts to be optional. https://fedorahosted.org/freeipa/ticket/6203 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/plugins/dns.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/ipaserver/plugins/dns.py b/ipaserver/plugins/dns.py
index 6f1bd716d..f048351e6 100644
--- a/ipaserver/plugins/dns.py
+++ b/ipaserver/plugins/dns.py
@@ -3471,6 +3471,21 @@ class dnsrecord(LDAPObject):
)
+# Make DNS record types available as objects in the API.
+# This is used by the CLI to get otherwise unavailable attributes of record
+# parts.
+for param in _dns_records:
+ register()(
+ type(
+ 'dns{}record'.format(param.rrtype.lower()),
+ (Object,),
+ dict(
+ takes_params=(param.parts or ()) + (param.extra or ()),
+ )
+ )
+ )
+
+
@register()
class dnsrecord_split_parts(Command):
NO_CLI = True