Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_list_ous.py
Show All 30 Lines | def __init__(): | ||||
commands.register('list_ous', execute, description="List organizational units.") | commands.register('list_ous', execute, description="List organizational units.") | ||||
def execute(*args, **kw): | def execute(*args, **kw): | ||||
from pykolab import wap_client | from pykolab import wap_client | ||||
wap_client.authenticate(username=conf.get("ldap", "bind_dn"), password=conf.get("ldap", "bind_pw")) | wap_client.authenticate(username=conf.get("ldap", "bind_dn"), password=conf.get("ldap", "bind_pw")) | ||||
ous = wap_client.ous_list() | ous = wap_client.ous_list() | ||||
print '\n'.join(ous['list'].keys()) | print('\n'.join(ous['list'].keys())) |