Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/wap/cmd_user_types_list.py
Show All 31 Lines | def execute(*args, **kw): | ||||
from pykolab import wap_client | from pykolab import wap_client | ||||
# Create the authentication object. | # Create the authentication object. | ||||
# TODO: Binds with superuser credentials! | # TODO: Binds with superuser credentials! | ||||
wap_client.authenticate() | wap_client.authenticate() | ||||
user_types = wap_client.user_types_list() | user_types = wap_client.user_types_list() | ||||
for user_type in user_types['list']: | for user_type in user_types['list']: | ||||
type = user_types['list'][user_type] | type = user_types['list'][user_type] | ||||
print "%-15s - %s" % (type['key'], type['description']) | print("%-15s - %s" % (type['key'], type['description'])) |