doc: document override_defaults phase

override_defaults phase was added to devstack in [1]
but documentation was pending. This patch adds the
same. For history around override_defaults, one can
refer to the mail thread [2]

Also fixes a small typo

[1]: https://review.openstack.org/#/c/167933/
[2]: http://lists.openstack.org/pipermail/openstack-dev/2015-March/059621.html

Change-Id: I1b58ca0ce0e4b85a1dbd710b4c426606fd4dcf45
This commit is contained in:
Deepak C Shetty 2015-11-18 12:29:33 +05:30
parent 585501a250
commit 93e2499ee1
2 changed files with 17 additions and 5 deletions

View File

@ -19,7 +19,16 @@ DevStack supports a standard mechanism for including plugins from
external repositories. The plugin interface assumes the following: external repositories. The plugin interface assumes the following:
An external git repository that includes a ``devstack/`` top level 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 - ``settings`` - a file containing global variables that will be
sourced very early in the process. This is helpful if other plugins 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 - ``plugin.sh`` - the actual plugin. It is executed by devstack at
well defined points during a ``stack.sh`` run. The plugin.sh 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 Plugins are registered by adding the following to the localrc section

View File

@ -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 entire `stack.sh` variable space is available. The scripts are
sourced with one or more arguments, the first of which defines the hook phase: 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 override_defaults: always called first in any of the scripts, used to
initial defaults in a lib/* script or similar 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 stack: called by stack.sh. There are four possible values for
the second arg to distinguish the phase stack.sh is in: the second arg to distinguish the phase stack.sh is in: