Re: [Freeipa-devel] [PATCH] 029 Enforce uniqueness on (key, info) pairs in automount keys

2011-01-23 Thread Jakub Hrozek

On 01/21/2011 05:55 PM, Rob Crittenden wrote:

Jakub Hrozek wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/10/2011 05:15 PM, Jakub Hrozek wrote:

On 12/20/2010 03:33 PM, Jakub Hrozek wrote:

On 12/20/2010 02:49 PM, Jakub Hrozek wrote:

Attached is a patch that changes the uniqueness constraint of
automount
keys from (key) to (key,info) pairs. The patch is not really standard
baseldap style. The reason is that during development, I found that
baseldap is really dependent on having a single primary key and also
during many operations accessing it as keys[-1].



Please note that the ipa automountkey-* commands used to have three
args, now its two args and two required options (that compose the
tuple
that is primary key). I know next to nothing about UI, but I assume
this
has consequences as the JSON marshalled call needs to be different
now.
Can someone point me to the place in code that I need to fix now?



Fixes:
https://fedorahosted.org/freeipa/ticket/293



Sorry, I left some debugging statements in. Attached is a new patch.


Attached is a patch that applies cleanly on top of origin/master.


Can you provide some guidance on how to test this patch?

thanks

rob


Sure:

The main change to CLI is that both key and info must be provided. These 
are put into the description attribute, at the same time this (key,info) 
tuple is checked for uniqueness.


The automount test is a good start for testing the patch. It also tests 
a duplicate direct map. To test the duplicates manually:


ipa automountlocation-add baltimore
ipa automountmap-add baltimore auto.direct2
ipa automountkey-add baltimore auto.master --key=/- --info=auto.direct2
ipa automountlocation-tofiles baltimore

You should see something like:
/etc/auto.master:
/-  /etc/auto.direct
/-  /etc/auto.direct2
---
/etc/auto.direct:
---
/etc/auto.direct2:

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Make ipa permission-add ask for optional attributes

2011-01-23 Thread Jan Zelený
Rob Crittenden rcrit...@redhat.com wrote:
 Jan Zeleny wrote:
  Either one of type, filter, subtree, targetgroup, attrs or memberof is
  required.
  
  https://fedorahosted.org/freeipa/ticket/819
  
  Jan
 
 Do you think the prompt should be annotated somehow to indicate that the
 optional attributes are optional? I've been wondering about this since I
 added alwaysask for managing permissions, it isn't very clear that you
 don't have to enter something.
 
 I'm not sure how we would do it, a *, or some other indicator?
 
 rob

That's definitely a good idea, but if we will use *, I think it should be 
present for required arguments, otherwise it might be confusing - on the web * 
usually marks required fields. From this point of view square brackets are used 
to indicate something is optional, so about something like [Subtree]:?

Jan

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel