mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-02 12:16:56 -06:00
Remove optional arguments from the XML-RPC interface
This commit is contained in:
parent
74d0fba899
commit
5025e990e9
@ -331,7 +331,7 @@ class IPAServer:
|
|||||||
|
|
||||||
# Higher-level API
|
# Higher-level API
|
||||||
|
|
||||||
def get_aci_entry(self, sattrs=None, opts=None):
|
def get_aci_entry(self, sattrs, opts=None):
|
||||||
"""Returns the entry containing access control ACIs."""
|
"""Returns the entry containing access control ACIs."""
|
||||||
|
|
||||||
dn="%s,%s" % (ACIContainer, self.basedn)
|
dn="%s,%s" % (ACIContainer, self.basedn)
|
||||||
@ -339,7 +339,7 @@ class IPAServer:
|
|||||||
|
|
||||||
# General searches
|
# General searches
|
||||||
|
|
||||||
def get_entry_by_dn (self, dn, sattrs=None, opts=None):
|
def get_entry_by_dn (self, dn, sattrs, opts=None):
|
||||||
"""Get a specific entry. Return as a dict of values.
|
"""Get a specific entry. Return as a dict of values.
|
||||||
Multi-valued fields are represented as lists.
|
Multi-valued fields are represented as lists.
|
||||||
"""
|
"""
|
||||||
@ -347,7 +347,7 @@ class IPAServer:
|
|||||||
filter = "(objectClass=*)"
|
filter = "(objectClass=*)"
|
||||||
return self.__get_base_entry(dn, filter, sattrs, opts)
|
return self.__get_base_entry(dn, filter, sattrs, opts)
|
||||||
|
|
||||||
def get_entry_by_cn (self, cn, sattrs=None, opts=None):
|
def get_entry_by_cn (self, cn, sattrs, opts=None):
|
||||||
"""Get a specific entry by cn. Return as a dict of values.
|
"""Get a specific entry by cn. Return as a dict of values.
|
||||||
Multi-valued fields are represented as lists.
|
Multi-valued fields are represented as lists.
|
||||||
"""
|
"""
|
||||||
@ -373,7 +373,7 @@ class IPAServer:
|
|||||||
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def get_user_by_uid (self, uid, sattrs=None, opts=None):
|
def get_user_by_uid (self, uid, sattrs, opts=None):
|
||||||
"""Get a specific user's entry. Return as a dict of values.
|
"""Get a specific user's entry. Return as a dict of values.
|
||||||
Multi-valued fields are represented as lists.
|
Multi-valued fields are represented as lists.
|
||||||
"""
|
"""
|
||||||
@ -382,7 +382,7 @@ class IPAServer:
|
|||||||
filter = "(uid=" + uid + ")"
|
filter = "(uid=" + uid + ")"
|
||||||
return self.__get_sub_entry(self.basedn, filter, sattrs, opts)
|
return self.__get_sub_entry(self.basedn, filter, sattrs, opts)
|
||||||
|
|
||||||
def get_user_by_principal(self, principal, sattrs=None, opts=None):
|
def get_user_by_principal(self, principal, sattrs, opts=None):
|
||||||
"""Get a user entry searching by Kerberos Principal Name.
|
"""Get a user entry searching by Kerberos Principal Name.
|
||||||
Return as a dict of values. Multi-valued fields are
|
Return as a dict of values. Multi-valued fields are
|
||||||
represented as lists.
|
represented as lists.
|
||||||
@ -391,7 +391,7 @@ class IPAServer:
|
|||||||
filter = "(krbPrincipalName="+self.__safe_filter(principal)+")"
|
filter = "(krbPrincipalName="+self.__safe_filter(principal)+")"
|
||||||
return self.__get_sub_entry(self.basedn, filter, sattrs, opts)
|
return self.__get_sub_entry(self.basedn, filter, sattrs, opts)
|
||||||
|
|
||||||
def get_user_by_email (self, email, sattrs=None, opts=None):
|
def get_user_by_email (self, email, sattrs, opts=None):
|
||||||
"""Get a specific user's entry. Return as a dict of values.
|
"""Get a specific user's entry. Return as a dict of values.
|
||||||
Multi-valued fields are represented as lists.
|
Multi-valued fields are represented as lists.
|
||||||
"""
|
"""
|
||||||
@ -400,7 +400,7 @@ class IPAServer:
|
|||||||
filter = "(mail=" + email + ")"
|
filter = "(mail=" + email + ")"
|
||||||
return self.__get_sub_entry(self.basedn, filter, sattrs, opts)
|
return self.__get_sub_entry(self.basedn, filter, sattrs, opts)
|
||||||
|
|
||||||
def get_users_by_manager (self, manager_dn, sattrs=None, opts=None):
|
def get_users_by_manager (self, manager_dn, sattrs, opts=None):
|
||||||
"""Gets the users that report to a particular manager.
|
"""Gets the users that report to a particular manager.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -412,12 +412,12 @@ class IPAServer:
|
|||||||
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def add_user (self, user, user_container=None, opts=None):
|
def add_user (self, user, user_container, opts=None):
|
||||||
"""Add a user in LDAP. Takes as input a dict where the key is the
|
"""Add a user in LDAP. Takes as input a dict where the key is the
|
||||||
attribute name and the value is either a string or in the case
|
attribute name and the value is either a string or in the case
|
||||||
of a multi-valued field a list of values. user_container sets
|
of a multi-valued field a list of values. user_container sets
|
||||||
where in the tree the user is placed."""
|
where in the tree the user is placed."""
|
||||||
if user_container is None:
|
if not user_container:
|
||||||
user_container = DefaultUserContainer
|
user_container = DefaultUserContainer
|
||||||
|
|
||||||
if self.__is_user_unique(user['uid'], opts) == 0:
|
if self.__is_user_unique(user['uid'], opts) == 0:
|
||||||
@ -543,7 +543,7 @@ class IPAServer:
|
|||||||
|
|
||||||
return self.update_entry(config, new_config, opts)
|
return self.update_entry(config, new_config, opts)
|
||||||
|
|
||||||
def get_all_users (self, args=None, opts=None):
|
def get_all_users (self, opts=None):
|
||||||
"""Return a list containing a User object for each
|
"""Return a list containing a User object for each
|
||||||
existing user.
|
existing user.
|
||||||
"""
|
"""
|
||||||
@ -561,7 +561,7 @@ class IPAServer:
|
|||||||
|
|
||||||
return users
|
return users
|
||||||
|
|
||||||
def find_users (self, criteria, sattrs=None, searchlimit=-1, timelimit=-1,
|
def find_users (self, criteria, sattrs, searchlimit=-1, timelimit=-1,
|
||||||
opts=None):
|
opts=None):
|
||||||
"""Returns a list: counter followed by the results.
|
"""Returns a list: counter followed by the results.
|
||||||
If the results are truncated, counter will be set to -1."""
|
If the results are truncated, counter will be set to -1."""
|
||||||
@ -807,7 +807,7 @@ class IPAServer:
|
|||||||
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def get_groups_by_member (self, member_dn, sattrs=None, opts=None):
|
def get_groups_by_member (self, member_dn, sattrs, opts=None):
|
||||||
"""Get a specific group's entry. Return as a dict of values.
|
"""Get a specific group's entry. Return as a dict of values.
|
||||||
Multi-valued fields are represented as lists.
|
Multi-valued fields are represented as lists.
|
||||||
"""
|
"""
|
||||||
@ -820,12 +820,12 @@ class IPAServer:
|
|||||||
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def add_group (self, group, group_container=None, opts=None):
|
def add_group (self, group, group_container, opts=None):
|
||||||
"""Add a group in LDAP. Takes as input a dict where the key is the
|
"""Add a group in LDAP. Takes as input a dict where the key is the
|
||||||
attribute name and the value is either a string or in the case
|
attribute name and the value is either a string or in the case
|
||||||
of a multi-valued field a list of values. group_container sets
|
of a multi-valued field a list of values. group_container sets
|
||||||
where in the tree the group is placed."""
|
where in the tree the group is placed."""
|
||||||
if group_container is None:
|
if not group_container:
|
||||||
group_container = DefaultGroupContainer
|
group_container = DefaultGroupContainer
|
||||||
|
|
||||||
if self.__is_group_unique(group['cn'], opts) == 0:
|
if self.__is_group_unique(group['cn'], opts) == 0:
|
||||||
@ -852,7 +852,7 @@ class IPAServer:
|
|||||||
finally:
|
finally:
|
||||||
self.releaseConnection(conn)
|
self.releaseConnection(conn)
|
||||||
|
|
||||||
def find_groups (self, criteria, sattrs=None, searchlimit=-1, timelimit=-1,
|
def find_groups (self, criteria, sattrs, searchlimit=-1, timelimit=-1,
|
||||||
opts=None):
|
opts=None):
|
||||||
"""Return a list containing a User object for each
|
"""Return a list containing a User object for each
|
||||||
existing group that matches the criteria.
|
existing group that matches the criteria.
|
||||||
|
Loading…
Reference in New Issue
Block a user