summaryrefslogtreecommitdiffstats
path: root/ipaserver/advise
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-03-16 11:22:00 +0100
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commit0d62968b6f853246d38b06e8378cb9cae7f9bbb4 (patch)
treec453875c1200991eac44825e4d3237ed55419715 /ipaserver/advise
parent3f5091b55abed3a2d3f4b6b940fdb6bacabbf4fe (diff)
downloadfreeipa-0d62968b6f853246d38b06e8378cb9cae7f9bbb4.tar.gz
freeipa-0d62968b6f853246d38b06e8378cb9cae7f9bbb4.tar.xz
freeipa-0d62968b6f853246d38b06e8378cb9cae7f9bbb4.zip
plugable: replace API.import_plugins with new API.add_package
Replace API.import_plugins with a new method API.add_package which allows loading plugin packages into an API object from a package object. This makes loading of plugin packages loading consistent with loading of plugin modules and classes. Rename API.modules to API.packages and use package objects where implemented to reflect the change. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/advise')
-rw-r--r--ipaserver/advise/base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipaserver/advise/base.py b/ipaserver/advise/base.py
index f7f2ad821..c80a13b6c 100644
--- a/ipaserver/advise/base.py
+++ b/ipaserver/advise/base.py
@@ -127,7 +127,11 @@ class Advice(Plugin):
class AdviseAPI(API):
bases = (Advice,)
- modules = ('ipaserver.advise.plugins.*',)
+
+ @property
+ def packages(self):
+ import ipaserver.advise.plugins
+ return (ipaserver.advise.plugins,)
advise_api = AdviseAPI()