summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/automember.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2014-03-27 14:04:00 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-04-18 14:59:20 +0200
commit4314d02fbf9ef1cb9543ecf76a8d22e79d250214 (patch)
tree8c6ac601e881712e8cf7c25fce420026a3762553 /ipalib/plugins/automember.py
parentc644b47492e22370bc71f57e5ac46b50f9b4e247 (diff)
downloadfreeipa-4314d02fbf9ef1cb9543ecf76a8d22e79d250214.tar.gz
freeipa-4314d02fbf9ef1cb9543ecf76a8d22e79d250214.tar.xz
freeipa-4314d02fbf9ef1cb9543ecf76a8d22e79d250214.zip
Allow primary keys to use different type than unicode.
Also return list of primary keys instead of a single unicode CSV value from LDAPDelete-based commands. This introduces a new capability 'primary_key_types' for backward compatibility with old clients. Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib/plugins/automember.py')
-rw-r--r--ipalib/plugins/automember.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index dad35d458..3166c6958 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -297,7 +297,7 @@ class automember_add(LDAPCreate):
def execute(self, *keys, **options):
result = super(automember_add, self).execute(*keys, **options)
- result['value'] = keys[-1]
+ result['value'] = pkey_to_value(keys[-1], options)
return result
@@ -389,7 +389,7 @@ class automember_add_condition(LDAPUpdate):
result = {'result': getattr(context, 'entry_attrs'), 'value': keys[-1]}
result['failed'] = getattr(context, 'failed')
result['completed'] = getattr(context, 'completed')
- result['value'] = keys[-1]
+ result['value'] = pkey_to_value(keys[-1], options)
return result
@@ -476,7 +476,7 @@ class automember_remove_condition(LDAPUpdate):
result = {'result': getattr(context, 'entry_attrs'), 'value': keys[-1]}
result['failed'] = getattr(context, 'failed')
result['completed'] = getattr(context, 'completed')
- result['value'] = keys[-1]
+ result['value'] = pkey_to_value(keys[-1], options)
return result
@@ -491,7 +491,7 @@ class automember_mod(LDAPUpdate):
def execute(self, *keys, **options):
result = super(automember_mod, self).execute(*keys, **options)
- result['value'] = keys[-1]
+ result['value'] = pkey_to_value(keys[-1], options)
return result
@@ -506,7 +506,7 @@ class automember_del(LDAPDelete):
def execute(self, *keys, **options):
result = super(automember_del, self).execute(*keys, **options)
- result['value'] = keys[-1]
+ result['value'] = pkey_to_value([keys[-1]], options)
return result
@@ -540,7 +540,7 @@ class automember_show(LDAPRetrieve):
def execute(self, *keys, **options):
result = super(automember_show, self).execute(*keys, **options)
- result['value'] = keys[-1]
+ result['value'] = pkey_to_value(keys[-1], options)
return result
@@ -568,7 +568,7 @@ class automember_default_group_set(LDAPUpdate):
def execute(self, *keys, **options):
result = super(automember_default_group_set, self).execute(*keys, **options)
- result['value'] = options['type']
+ result['value'] = pkey_to_value(options['type'], options)
return result
@@ -602,7 +602,7 @@ class automember_default_group_remove(LDAPUpdate):
def execute(self, *keys, **options):
result = super(automember_default_group_remove, self).execute(*keys, **options)
- result['value'] = options['type']
+ result['value'] = pkey_to_value(options['type'], options)
return result
@@ -626,7 +626,7 @@ class automember_default_group_show(LDAPRetrieve):
def execute(self, *keys, **options):
result = super(automember_default_group_show, self).execute(*keys, **options)
- result['value'] = options['type']
+ result['value'] = pkey_to_value(options['type'], options)
return result
@@ -777,4 +777,4 @@ class automember_rebuild(Command):
return dict(
result=result,
summary=unicode(summary),
- value=u'')
+ value=pkey_to_value(None, options))