summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 7dafd440..e6b5c1ac 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -254,24 +254,19 @@ class Plugin(ReadOnly):
__api = None
def __init__(self):
+ cls = self.__class__
+ self.name = cls.__name__
+ self.module = cls.__module__
+ self.fullname = '%s.%s' % (self.module, self.name)
+ self.doc = inspect.getdoc(cls)
+ if self.doc is None:
+ self.summary = '<%s>' % self.fullname
+ else:
+ self.summary = self.doc.split('\n\n', 1)[0]
log = logging.getLogger('ipa')
for name in ('debug', 'info', 'warning', 'error', 'critical'):
setattr(self, name, getattr(log, name))
- def __get_name(self):
- """
- Convenience property to return the class name.
- """
- return self.__class__.__name__
- name = property(__get_name)
-
- def __get_doc(self):
- """
- Convenience property to return the class docstring.
- """
- return self.__class__.__doc__
- doc = property(__get_doc)
-
def __get_api(self):
"""
Return `API` instance passed to `finalize()`.