From 322458b5b2f80e179ef43b904c2665254c0a3763 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Thu, 21 Mar 2013 14:54:46 +0100 Subject: 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 --- ipalib/plugins/dns.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ipalib/plugins/dns.py') diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index a23d1b82..dabab840 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: -- cgit