From 9392a83fdc4be51b28c8f359d4444c8565eae22b Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 24 Aug 2015 10:00:49 -0400 Subject: [PATCH] Add plugin docs section on configuration options This commit adds a subsubsection to the plugin interface docs to elaborate a bit on how to deal with configuration options. Previously, how to use them in a plugin was implied, but nothing was explicitly stated. This corrects that to make it clear on how to deal with configuration. Change-Id: Id3afc9657c5419cfba61acb3c84ccfea104d1b20 --- doc/source/plugin.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/source/plugin.rst b/doc/source/plugin.rst index 4e97dbec37..f92f63eea5 100644 --- a/doc/source/plugin.rst +++ b/doc/source/plugin.rst @@ -91,6 +91,21 @@ Additionally, when you're creating the plugin you likely want to follow all of the tempest developer and reviewer documentation to ensure that the tests being added in the plugin act and behave like the rest of tempest. +Dealing with configuration options +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Historically Tempest didn't provide external guarantees on its configuration +options. However, with the introduction of the plugin interface this is no +longer the case. An external plugin can rely on using any configuration option +coming from Tempest, there will be at least a full deprecation cycle for any +option before it's removed. However, just the options provided by Tempest +may not be sufficient for the plugin. If you need to add any plugin specific +configuration options you should use the ``register_opts`` and +``get_opt_lists`` methods to pass them to Tempest when the plugin is loaded. +When adding configuration options the ``register_opts`` method gets passed the +CONF object from tempest. This enables the plugin to add options to both +existing sections and also create new configuration sections for new options. + Using Plugins =============