summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-10-05 14:33:27 -0400
committerRob Crittenden <rcritten@redhat.com>2010-10-06 09:20:38 -0400
commitbf053652bc5ae563c626ac39b735e957c7a9e0d3 (patch)
tree6bd51696b516b9fb651344e55a232ba4fca1a7f8 /ipalib/plugins
parentbfd2e383dcb0cd5ce156775982e87d6ac32513a3 (diff)
downloadfreeipa-bf053652bc5ae563c626ac39b735e957c7a9e0d3.tar.gz
freeipa-bf053652bc5ae563c626ac39b735e957c7a9e0d3.tar.xz
freeipa-bf053652bc5ae563c626ac39b735e957c7a9e0d3.zip
Generate additional positional arguments for baseldap commands from takes_args.
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/baseldap.py8
-rw-r--r--ipalib/plugins/pwpolicy.py4
2 files changed, 11 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index f6b98e247..42d9017ff 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -240,6 +240,8 @@ class LDAPCreate(CallbackInterface, crud.Create):
yield key
if self.obj.primary_key:
yield self.obj.primary_key.clone(attribute=True)
+ for arg in super(crud.Create, self).get_args():
+ yield arg
def execute(self, *keys, **options):
ldap = self.obj.backend
@@ -343,6 +345,8 @@ class LDAPQuery(CallbackInterface, crud.PKQuery):
yield key
if self.obj.primary_key:
yield self.obj.primary_key.clone(attribute=True, query=True)
+ for arg in super(crud.PKQuery, self).get_args():
+ yield arg
class LDAPMultiQuery(LDAPQuery):
@@ -356,6 +360,8 @@ class LDAPMultiQuery(LDAPQuery):
yield self.obj.primary_key.clone(
attribute=True, query=True, multivalue=True
)
+ for arg in super(crud.PKQuery, self).get_args():
+ yield arg
class LDAPRetrieve(LDAPQuery):
@@ -881,6 +887,8 @@ class LDAPSearch(CallbackInterface, crud.Search):
for key in self.obj.get_ancestor_primary_keys():
yield key
yield Str('criteria?')
+ for arg in super(crud.Search, self).get_args():
+ yield arg
def get_options(self):
for option in super(LDAPSearch, self).get_options():
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py
index dbbb47135..cbfbf8019 100644
--- a/ipalib/plugins/pwpolicy.py
+++ b/ipalib/plugins/pwpolicy.py
@@ -300,7 +300,9 @@ class pwpolicy_del(LDAPDelete):
Delete a group password policy.
"""
def get_args(self):
- yield self.obj.primary_key.clone(attribute=True, required=True)
+ yield self.obj.primary_key.clone(
+ attribute=True, required=True, multivalue=True
+ )
def post_callback(self, ldap, dn, *keys, **options):
try: