summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2016-07-18 13:18:44 +0200
committerJan Cholasta <jcholast@redhat.com>2016-07-20 13:57:01 +0200
commitf0a61546f552d4df887617167f7dc1378cb95083 (patch)
treee41f1d0bca4d0859ce1fcde1ea1854c89ead0ec1 /ipaserver/plugins
parent90704df59dbe996ef1db58d7a11f826c008d08a3 (diff)
downloadfreeipa-f0a61546f552d4df887617167f7dc1378cb95083.tar.gz
freeipa-f0a61546f552d4df887617167f7dc1378cb95083.tar.xz
freeipa-f0a61546f552d4df887617167f7dc1378cb95083.zip
allow 'value' output param in commands without primary key
`PrimaryKey` output param works only for API objects that have primary keys, otherwise it expects None (nothing is associated with this param). Since the validation of command output was tightened durng thin client effort, some commands not honoring this contract began to fail output validation. A custom output was implemented for them to restore their functionality. It should however be considered as a fix for broken commands and not used further. https://fedorahosted.org/freeipa/ticket/6037 https://fedorahosted.org/freeipa/ticket/6061 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/plugins')
-rw-r--r--ipaserver/plugins/automember.py3
-rw-r--r--ipaserver/plugins/trust.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/ipaserver/plugins/automember.py b/ipaserver/plugins/automember.py
index dfa8498a6..8e9356a9d 100644
--- a/ipaserver/plugins/automember.py
+++ b/ipaserver/plugins/automember.py
@@ -586,6 +586,7 @@ class automember_default_group_set(LDAPUpdate):
),
) + group_type
msg_summary = _('Set default (fallback) group for automember "%(value)s"')
+ has_output = output.simple_entry
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
dn = DN(('cn', options['type']), api.env.container_automember,
@@ -609,6 +610,7 @@ class automember_default_group_remove(LDAPUpdate):
takes_options = group_type
msg_summary = _('Removed default (fallback) group for automember "%(value)s"')
+ has_output = output.simple_entry
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
dn = DN(('cn', options['type']), api.env.container_automember,
@@ -644,6 +646,7 @@ class automember_default_group_show(LDAPRetrieve):
obj_name = 'automember_default_group'
takes_options = group_type
+ has_output = output.simple_entry
def pre_callback(self, ldap, dn, attrs_list, *keys, **options):
dn = DN(('cn', options['type']), api.env.container_automember,
diff --git a/ipaserver/plugins/trust.py b/ipaserver/plugins/trust.py
index 8536202b9..d4676bd57 100644
--- a/ipaserver/plugins/trust.py
+++ b/ipaserver/plugins/trust.py
@@ -1288,6 +1288,7 @@ class trustconfig_mod(LDAPUpdate):
takes_options = LDAPUpdate.takes_options + (_trust_type_option,)
msg_summary = _('Modified "%(value)s" trust configuration')
+ has_output = output.simple_entry
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options):
self.obj._normalize_groupdn(entry_attrs)
@@ -1310,6 +1311,7 @@ class trustconfig_show(LDAPRetrieve):
__doc__ = _('Show global trust configuration.')
takes_options = LDAPRetrieve.takes_options + (_trust_type_option,)
+ has_output = output.simple_entry
def execute(self, *keys, **options):
result = super(trustconfig_show, self).execute(*keys, **options)