diff options
| author | Jan Cholasta <jcholast@redhat.com> | 2016-04-28 10:32:00 +0200 |
|---|---|---|
| committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-20 16:39:12 +0200 |
| commit | 234270dc753ef39cd5c0ada17e88ef7f512a8cd0 (patch) | |
| tree | 52833b90d580b1a4275fb7a5c402a935a6ab07ec /ipaclient/plugins | |
| parent | ade8d425254864dd0155719714b81ef444bbb57b (diff) | |
| download | freeipa-234270dc753ef39cd5c0ada17e88ef7f512a8cd0.tar.gz freeipa-234270dc753ef39cd5c0ada17e88ef7f512a8cd0.tar.xz freeipa-234270dc753ef39cd5c0ada17e88ef7f512a8cd0.zip | |
dns: do not rely on custom param fields in record attributes
Obtain the information provided by the `hint` kwarg and `dnsrecord_part`
and `dnsrecord_extra` flags by other means.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaclient/plugins')
| -rw-r--r-- | ipaclient/plugins/dns.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipaclient/plugins/dns.py b/ipaclient/plugins/dns.py index 06cd2c281..d04f686dd 100644 --- a/ipaclient/plugins/dns.py +++ b/ipaclient/plugins/dns.py @@ -25,7 +25,8 @@ import copy from ipaclient.frontend import MethodOverride, CommandOverride from ipalib import errors -from ipalib.dns import (get_record_rrtype, +from ipalib.dns import (get_part_rrtype, + get_record_rrtype, has_cli_options, iterate_rrparams_by_parts, record_name_format) @@ -63,7 +64,7 @@ def prompt_parts(rrtype, cmd, mod_dnsvalue=None): name, mod_dnsvalue)['result'] user_options = {} - parts = [p for p in cmd.params() if 'dnsrecord_part' in p.flags] + parts = [p for p in cmd.params() if get_part_rrtype(p.name) == rrtype] if not parts: return user_options @@ -80,7 +81,7 @@ def prompt_parts(rrtype, cmd, mod_dnsvalue=None): def prompt_missing_parts(rrtype, cmd, kw, prompt_optional=False): user_options = {} - parts = [p for p in cmd.params() if 'dnsrecord_part' in p.flags] + parts = [p for p in cmd.params() if get_part_rrtype(p.name) == rrtype] if not parts: return user_options |
