Hi, In trust_show command, make sure that --raw flag is honoured. Attributes ipanttrusttype and ipanttrustdirection are no longer translated to strings from their raw ldap values when --raw is used.
https://fedorahosted.org/freeipa/ticket/3525 Tomas
From 14db1f8ce62efdba75fbb6710d5ed16b81f49e3a Mon Sep 17 00:00:00 2001 From: Tomas Babej <tba...@redhat.com> Date: Mon, 27 May 2013 14:21:57 +0200 Subject: [PATCH] Do not translate trust type and direction with --raw in trust_show In trust_show command, make sure that --raw flag is honoured. Attributes ipanttrusttype and ipanttrustdirection are no longer translated to strings from their raw ldap values when --raw is used. https://fedorahosted.org/freeipa/ticket/3525 --- ipalib/plugins/trust.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py index 9bcfb417a9413faffdeb4009d9de06d6041b223e..5a42999ccd2330ba2a8d1dfd4002bf826ddf96ae 100644 --- a/ipalib/plugins/trust.py +++ b/ipalib/plugins/trust.py @@ -524,9 +524,14 @@ class trust_show(LDAPRetrieve): result = None error = e if result: - result['result']['trusttype'] = [trust_type_string(result['result']['ipanttrusttype'][0])] - result['result']['trustdirection'] = [trust_direction_string(result['result']['ipanttrustdirection'][0])] - break + if not options.get('raw', False): + type_str = trust_type_string(result['result'] + ['ipanttrusttype'][0]) + dir_str = trust_direction_string(result['result'] + ['ipanttrustdirection'][0]) + result['result']['trusttype'] = [type_str] + result['result']['trustdirection'] = [dir_str] + break if error or not result: self.obj.handle_not_found(*keys) -- 1.8.1.4
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel