mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Create pkey-only option for find commands
New option --pkey-only is available for all LDAPSearch based classes with primary key visible in the output. This option makes LDAPSearch commands search for primary attribute only. This may be useful when manipulating large data sets. User can at first retrieve all primary keys in a relatively small data package and then run further commands with retrieved primary keys. https://fedorahosted.org/freeipa/ticket/1262
This commit is contained in:
committed by
Endi S. Dewata
parent
52981883ab
commit
a486f49a37
@@ -195,6 +195,26 @@ class test_user(Declarative):
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Search for %r with pkey-only=True' % user1,
|
||||
command=(
|
||||
'user_find', [user1], {'pkey_only': True}
|
||||
),
|
||||
expected=dict(
|
||||
result=[
|
||||
{
|
||||
'dn':lambda x: DN(x) == \
|
||||
DN(('uid',user1),('cn','users'),
|
||||
('cn','accounts'),api.env.basedn),
|
||||
'uid': [user1],
|
||||
},
|
||||
],
|
||||
summary=u'1 user matched',
|
||||
count=1, truncated=False,
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Search for %r with minimal attributes' % user1,
|
||||
command=(
|
||||
|
||||
Reference in New Issue
Block a user