diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-09-02 16:42:57 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-09-06 12:54:38 +0200 |
commit | dce95a14595a37ce83bcf3e28f41feab715d0c81 (patch) | |
tree | 978d789e3822390df36e7503b1dd7c2be645d712 /ipaserver/plugins/dns.py | |
parent | afea9616318fbbffc2c296b7c41890db8595e3cc (diff) | |
download | freeipa-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/plugins/dns.py')
-rw-r--r-- | ipaserver/plugins/dns.py | 15 |
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 |