From 7b4d31d4f653611897150333d80a36b53285d78f Mon Sep 17 00:00:00 2001 From: Rick Breidenstein Date: Tue, 14 Mar 2017 12:30:22 -0400 Subject: [PATCH] added steps for loading custom plugin (#725) * added steps for loading custom plugin added steps for loading a custom plugin into Lemur once the files have been put into place (/www/lemur/lemur/plugins/) and the setup.py file (/www/lemur/setup.py) has been modified. * updated __init__.py section except Exception as e: --- docs/developer/plugins/index.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/developer/plugins/index.rst b/docs/developer/plugins/index.rst index 5a94e48f..f2e2e22a 100644 --- a/docs/developer/plugins/index.rst +++ b/docs/developer/plugins/index.rst @@ -25,7 +25,7 @@ if you want to pull the version using pkg_resources (which is what we recommend) try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version - except Exception, e: + except Exception as e: VERSION = 'unknown' Inside of ``plugin.py``, you'll declare your Plugin class:: @@ -70,10 +70,18 @@ at multiple plugins within your package:: }, ) +Once your plugin files are in place and the ``/www/lemur/setup.py`` file has been modified, you can load your plugin into your instance by reinstalling lemur: +:: + + (lemur)$cd /www/lemur + (lemur)$pip install -e . + That's it! Users will be able to install your plugin via ``pip install ``. .. SeeAlso:: For more information about python packages see `Python Packaging `_ +.. SeeAlso:: For an example of a plugin operation outside of Lemur's core, see `lemur-digicert `_ + .. _PluginInterfaces: Plugin Interfaces