diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst index 8bd3797cd2..b8da7e1237 100644 --- a/doc/source/plugins.rst +++ b/doc/source/plugins.rst @@ -19,7 +19,16 @@ DevStack supports a standard mechanism for including plugins from external repositories. The plugin interface assumes the following: An external git repository that includes a ``devstack/`` top level -directory. Inside this directory there can be 2 files. +directory. Inside this directory there can be 3 files. + +- ``override_defaults`` - a file containing global variables that + will be sourced before the lib/* files. This allows the plugin + to override the defaults that are otherwise set in the lib/* + files. + + For example, override_defaults may export CINDER_ENABLED_BACKENDS + to include the plugin-specific storage backend and thus be able + to override the default lvm only storage backend for Cinder. - ``settings`` - a file containing global variables that will be sourced very early in the process. This is helpful if other plugins @@ -38,7 +47,7 @@ directory. Inside this directory there can be 2 files. - ``plugin.sh`` - the actual plugin. It is executed by devstack at well defined points during a ``stack.sh`` run. The plugin.sh - internal structure is discussed bellow. + internal structure is discussed below. Plugins are registered by adding the following to the localrc section diff --git a/extras.d/README.md b/extras.d/README.md index 7c2e4fe970..4cec14b4e7 100644 --- a/extras.d/README.md +++ b/extras.d/README.md @@ -14,10 +14,13 @@ The scripts are sourced at the beginning of each script that calls them. The entire `stack.sh` variable space is available. The scripts are sourced with one or more arguments, the first of which defines the hook phase: - source | stack | unstack | clean + override_defaults | source | stack | unstack | clean - source: always called first in any of the scripts, used to set the - initial defaults in a lib/* script or similar + override_defaults: always called first in any of the scripts, used to + override defaults (if need be) that are otherwise set in lib/* scripts + + source: called by stack.sh. Used to set the initial defaults in a lib/* + script or similar stack: called by stack.sh. There are four possible values for the second arg to distinguish the phase stack.sh is in: