[Freeipa-devel] [PATCH 0090] show optionally configured components in server-find/show command output
Martin Basti
mbasti at redhat.com
Thu Oct 22 14:13:21 UTC 2015
On 22.10.2015 10:44, Martin Babinsky wrote:
> https://fedorahosted.org/freeipa/ticket/5181
>
>
>
Thank you for the patch.
1)
+OPTIONAL_SERVICES = {
+ 'DNS',
+ 'CA',
+ 'KRA',
+ 'ADTRUST',
+ 'EXTID',
+ 'DNSKeyExporter',
+ 'DNSSEC',
+ 'DNSKeySync',
+}
This did not scale well, maybe we should improve it to use some general
solution for whole IPA to distinct mandratory and optionl service, but I
do not know how (or if it is possible)
2)
+ search_filter=('(&(objectclass=ipaConfigObject)'
+ '(ipaConfigString=enabledService))')
Common user cannot read ipaConfigString, so this will work only for
admins, I do not see any limitations of access in code for other users.
3)
+ opt_components = [
+ r['cn'][0] for r in result if r['cn'][0] in OPTIONAL_SERVICES
+ ]
Probably instead of indexing, you may use result.single_value['cn']
Martin^2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20151022/8c00c909/attachment.htm>
More information about the Freeipa-devel
mailing list