[Freeipa-devel] [PATCH] Provide a way to display CLI-LDAP attribute relation

Jan Zelený jzeleny at redhat.com
Mon Jan 31 08:51:35 UTC 2011


Rob Crittenden <rcritten at redhat.com> wrote:
> Jan Zelený wrote:
> > Since some LDAP attributes have their cli_name value defined,
> > so they can be more user friendly, it can be difficult for user to find
> > out which attributes do the parameteres given to CLI really represent.
> > This patch provides new command, which will take another IPA command as
> > and argument and display attributes which given command takes and what
> > LDAP attributes are they mapped to.
> > 
> > https://fedorahosted.org/freeipa/ticket/447
> > 
> > When reviewing, please pay attention to line 39 of the patch (detection
> > of the 'webui' in param.excludes). I think this is the right approach,
> > but I'm not 100% sure.
> > 
> > Thanks
> > Jan
> 
> nack.

I'm sending updated patch. Few comments:

> The argument should be a Str, not Bytes.

Should I change it in class help then? That's where I copied this from.
> 
> This will blow up as expected in the FIXME if an unknown command is
> passed in.

Fixed, thanks.

> ipa show-mappings user-show returns just 'rights'

If it was the acting correctly, it shouldn't be displayed at all, because it 
is not LDAP based (and user-show doesn't take any other LDAP-based 
arguments/options).

I'm just not sure how to do this with minimal changes. One option is to create 
new flag denoting whether parameter is LDAP based or not and for each parameter 
set it appropriately, but that is just too much effort for something that is 
not that important. That's why I use the 'webui' flag to filter things at least 
a little bit.

> Should it take a second arg or an option to lookup a specific
> attribute/option pair?

Frankly I don't see any real benefit. I thought about it when Dmitri suggested 
it, but commands don't take that many options - IMO it's not a problem to find 
one in a list of ten.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jzeleny-freeipa-0030-02-Provide-a-way-to-display-CLI-LDAP-relation.patch
Type: text/x-patch
Size: 2473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110131/5fc3d50a/attachment.bin>


More information about the Freeipa-devel mailing list