mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Generate additional positional arguments for baseldap commands from takes_args.
This commit is contained in:
parent
bfd2e383dc
commit
bf053652bc
@ -240,6 +240,8 @@ class LDAPCreate(CallbackInterface, crud.Create):
|
|||||||
yield key
|
yield key
|
||||||
if self.obj.primary_key:
|
if self.obj.primary_key:
|
||||||
yield self.obj.primary_key.clone(attribute=True)
|
yield self.obj.primary_key.clone(attribute=True)
|
||||||
|
for arg in super(crud.Create, self).get_args():
|
||||||
|
yield arg
|
||||||
|
|
||||||
def execute(self, *keys, **options):
|
def execute(self, *keys, **options):
|
||||||
ldap = self.obj.backend
|
ldap = self.obj.backend
|
||||||
@ -343,6 +345,8 @@ class LDAPQuery(CallbackInterface, crud.PKQuery):
|
|||||||
yield key
|
yield key
|
||||||
if self.obj.primary_key:
|
if self.obj.primary_key:
|
||||||
yield self.obj.primary_key.clone(attribute=True, query=True)
|
yield self.obj.primary_key.clone(attribute=True, query=True)
|
||||||
|
for arg in super(crud.PKQuery, self).get_args():
|
||||||
|
yield arg
|
||||||
|
|
||||||
|
|
||||||
class LDAPMultiQuery(LDAPQuery):
|
class LDAPMultiQuery(LDAPQuery):
|
||||||
@ -356,6 +360,8 @@ class LDAPMultiQuery(LDAPQuery):
|
|||||||
yield self.obj.primary_key.clone(
|
yield self.obj.primary_key.clone(
|
||||||
attribute=True, query=True, multivalue=True
|
attribute=True, query=True, multivalue=True
|
||||||
)
|
)
|
||||||
|
for arg in super(crud.PKQuery, self).get_args():
|
||||||
|
yield arg
|
||||||
|
|
||||||
|
|
||||||
class LDAPRetrieve(LDAPQuery):
|
class LDAPRetrieve(LDAPQuery):
|
||||||
@ -881,6 +887,8 @@ class LDAPSearch(CallbackInterface, crud.Search):
|
|||||||
for key in self.obj.get_ancestor_primary_keys():
|
for key in self.obj.get_ancestor_primary_keys():
|
||||||
yield key
|
yield key
|
||||||
yield Str('criteria?')
|
yield Str('criteria?')
|
||||||
|
for arg in super(crud.Search, self).get_args():
|
||||||
|
yield arg
|
||||||
|
|
||||||
def get_options(self):
|
def get_options(self):
|
||||||
for option in super(LDAPSearch, self).get_options():
|
for option in super(LDAPSearch, self).get_options():
|
||||||
|
@ -300,7 +300,9 @@ class pwpolicy_del(LDAPDelete):
|
|||||||
Delete a group password policy.
|
Delete a group password policy.
|
||||||
"""
|
"""
|
||||||
def get_args(self):
|
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):
|
def post_callback(self, ldap, dn, *keys, **options):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user