1a7895e56c
- Fixes #1448049 Subpackage freeipa-server-common has unmet dependencies on Rawhide - Fixes #1430247 FreeIPA server deployment runs ipa-custodia on Python 3, should use Python 2 - Fixes #1446744 python2-ipaclient subpackage does not own %{python_sitelib}/ipaclient/plugins - Fixes #1440525 surplus 'the' in output of `ipa-adtrust-install` - Fixes #1411810 ipa-replica-install fails with 406 Client Error - Fixes #1405814 ipa plugins: ERROR an internal error occured
50 lines
1.7 KiB
Diff
50 lines
1.7 KiB
Diff
From 5536b06c0f289f1408d5ca5525a53494a08337a5 Mon Sep 17 00:00:00 2001
|
|
From: Abhijeet Kasurde <akasurde@redhat.com>
|
|
Date: Thu, 12 Jan 2017 18:38:37 +0530
|
|
Subject: [PATCH] Add fix for ipa plugins command
|
|
|
|
Fix adds count of plugins loaded to return dict
|
|
|
|
Fixes https://fedorahosted.org/freeipa/ticket/6513
|
|
|
|
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
|
|
Reviewed-By: Martin Basti <mbasti@redhat.com>
|
|
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
|
|
---
|
|
ipaserver/plugins/misc.py | 3 ++-
|
|
ipatests/test_cmdline/test_cli.py | 3 +++
|
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ipaserver/plugins/misc.py b/ipaserver/plugins/misc.py
|
|
index 7618e23..fa8224f 100644
|
|
--- a/ipaserver/plugins/misc.py
|
|
+++ b/ipaserver/plugins/misc.py
|
|
@@ -138,8 +138,9 @@ class plugins(LocalOrRemote):
|
|
for plugin in self.api[namespace]():
|
|
cls = type(plugin)
|
|
key = '{}.{}'.format(cls.__module__, cls.__name__)
|
|
- result.setdefault(key, []).append(namespace)
|
|
+ result.setdefault(key, []).append(namespace.decode('utf-8'))
|
|
|
|
return dict(
|
|
result=result,
|
|
+ count=len(result),
|
|
)
|
|
diff --git a/ipatests/test_cmdline/test_cli.py b/ipatests/test_cmdline/test_cli.py
|
|
index 07bab23..4585126 100644
|
|
--- a/ipatests/test_cmdline/test_cli.py
|
|
+++ b/ipatests/test_cmdline/test_cli.py
|
|
@@ -51,6 +51,9 @@ class TestCLIParsing(object):
|
|
def test_ping(self):
|
|
self.check_command('ping', 'ping')
|
|
|
|
+ def test_plugins(self):
|
|
+ self.check_command('plugins', 'plugins')
|
|
+
|
|
def test_user_show(self):
|
|
self.check_command('user-show admin', 'user_show', uid=u'admin')
|
|
|
|
--
|
|
2.9.3
|
|
|