Skip to content

Commit

Permalink
ldap_connection: Update docstrings for usage in ual_grouper_base, ual…
Browse files Browse the repository at this point in the history
…_ldap_query, ual_ldap_queries, ldap_search (iss #6)
  • Loading branch information
astrochun committed Feb 5, 2020
1 parent ae5160f commit 4e1af3d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/ldap_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LDAPConnection(object):
Usage:
Quick how to:
from DataRepository_patrons.tests import ldap_connection, query
from DataRepository_patrons.tests import ldap_connection
eds_hostname = 'eds.arizona.edu'
ldap_base_dn = 'dc=eds,dc=arizona,dc=edu'
ldc = ldap_connection.LDAPConnection(eds_hostname, ldap_base_dn,
Expand Down Expand Up @@ -61,6 +61,11 @@ def ual_grouper_base(basename):
Note that this only returns a string, it is not RFC 4512
compatible. See ual_ldap_query()
Usage:
grouper_base = ldap_connection.ual_grouper_base('ual-faculty')
:param basename: string containing Grouper group name basename.
Options are:
ual-dcc, ual-faculty, ual-hsl, ual-staff, ual-students,
Expand All @@ -79,6 +84,11 @@ def ual_ldap_query(org_code):
Library privileges within an organization specified by the org_code
input
Usage:
ldap_query = ldap_connection.ual_ldap_query('0212')
:param org_code: A string of the org code (e.g., '0212')
:return ldap_query: list containing the str
Expand All @@ -100,6 +110,11 @@ def ual_ldap_queries(org_codes):
those with UA Library privileges within multiple organizations
specified by the org_codes input
Usage:
ldap_queries = ldap_connection.ual_ldap_queries(['0212','0213','0214'])
:param org_codes: A list of strings containining org codes
(e.g., ['0212','0213','0214'])
Expand All @@ -116,6 +131,11 @@ def ldap_search(ldapconnection, ldap_query):
Purpose:
Function that queries a define LDAP connection and retrieve members
Usage (see description in LDAPConnection:
members = ldap_connection.ldap_search(ldc, ldap_query)
:param ldapconnection: An ldap3 Connection from LDAPConnection(),
ldapconnection = LDAPConnection(**)
Expand Down

0 comments on commit 4e1af3d

Please sign in to comment.