summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_plugins.py
Commit message (Collapse)AuthorAgeFilesLines
* Add optional external configuration to plugins.J08nY2017-08-071-0/+1
| | | | | - Adds an optional 'conriguration' option similar to the one in [mta] which plugins can use to load their specific configs from.
* Add REST-ability to plugins.J08nY2017-08-071-0/+104
- Adds the rest_object method to the IPlugin interface. This method is called by the REST api to route requests to the plugin's REST api. All attributes are proxied, so the object becomes a true REST object in the ObjectRouter hierarchy. For example see the RESTExample and ExamplePlugin classes in mailman.testing.plugin. The plugin might return None from this method, in which case all calls to it's REST api route will return 404 NotFound. - Adds new routes to the REST api. For version >= 3.1: - /3.1/plugins Returns a dictionary with plugin names as keys, and their configs as values. - /3.1/plugins/<plugin_name> Proxies everything to plugin's rest_object, if plugin with such name exists and provides a non-null rest_object, else NotFound.