diff options
author | Martin Kosek <mkosek@redhat.com> | 2013-03-21 14:54:46 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-22 15:10:03 +0100 |
commit | 322458b5b2f80e179ef43b904c2665254c0a3763 (patch) | |
tree | 5f912b4ac420871e849e65d955959939d92a3153 /ipalib | |
parent | c2034805d323dcf505042d03dbd801561aa64ed3 (diff) | |
download | freeipa-322458b5b2f80e179ef43b904c2665254c0a3763.tar.gz freeipa-322458b5b2f80e179ef43b904c2665254c0a3763.tar.xz freeipa-322458b5b2f80e179ef43b904c2665254c0a3763.zip |
Fix structured DNS record output
Recent LDAP refactoring replaced entry_attrs regular dict with
normalized keys (i.e. lowercase) with LDAPEntry instance which keys
may not be normalized. This broke CND command output when
--structured and --all options were used.
Force lowercase normalization of the LDAPEntry keys in DNS plugin
structured format postprocessing. Also add a missing test for
DNS record structured output.
https://fedorahosted.org/freeipa/ticket/3526
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/dns.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index a23d1b823..dabab8405 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -2197,6 +2197,8 @@ class dnsrecord(LDAPObject): def postprocess_record(self, record, **options): if options.get('structured', False): for attr in record.keys(): + # attributes in LDAPEntry may not be normalized + attr = attr.lower() try: param = self.params[attr] except KeyError: |