revise example extension directory structure
- used the syntax employed by the 'tree' tool, which is not so heavy on whitespace, and should render much better as a literal example on the web - merged the 'backends' example into the general example, since having at least one backend is common - flushed out an example 'migrate_repo' directory Change-Id: Idba9555f93caf2142e0d1becdc1afb0af50b94de
This commit is contained in:
parent
258da7273d
commit
2314d4dc9d
@ -23,25 +23,25 @@ Extension code base in the ``keystone/contrib/example`` folder.
|
|||||||
|
|
||||||
- All Extensions must be created in the ``keystone/contrib`` folder.
|
- All Extensions must be created in the ``keystone/contrib`` folder.
|
||||||
- The new Extension code must be contained in a new folder under ``contrib``.
|
- The new Extension code must be contained in a new folder under ``contrib``.
|
||||||
- Whenever possible an Extension should follow the following structure
|
- Whenever possible an Extension should follow the following directory
|
||||||
convention::
|
structure convention::
|
||||||
|
|
||||||
keystone
|
keystone/contrib/
|
||||||
\\\ contrib
|
└── my_extension
|
||||||
\\\ my_extension
|
├── backends (optional)
|
||||||
\\\ backends (optional)
|
│ ├── __init__.py (mandatory)
|
||||||
|
│ └── sql.py (optional)
|
||||||
\\\ migrate_repo (optional)
|
│ └── kvs.py (optional)
|
||||||
|
├── migrate_repo (optional)
|
||||||
\\\ __init__.py (mandatory)
|
│ ├── __init__.py (mandatory)
|
||||||
|
│ ├── migrate.cfg (mandatory)
|
||||||
\\\ configuration.rst (mandatory)
|
│ └── versions (mandatory)
|
||||||
|
│ ├── 001_create_tables.py (mandatory)
|
||||||
\\\ core.py (mandatory)
|
│ └── __init__.py (mandatory)
|
||||||
|
├── __init__.py (mandatory)
|
||||||
\\\ controllers.py (mandatory for API Extension)
|
├── core.py (mandatory)
|
||||||
|
├── controllers.py (mandatory for API Extension)
|
||||||
\\\ routers.py (mandatory for API Extension)
|
└── routers.py (mandatory for API Extension)
|
||||||
|
|
||||||
- If the Extension implements an API Extension the ``controllers.py`` and
|
- If the Extension implements an API Extension the ``controllers.py`` and
|
||||||
``routers.py`` must be present and correctly handle the API Extension
|
``routers.py`` must be present and correctly handle the API Extension
|
||||||
@ -187,18 +187,8 @@ Backends
|
|||||||
========
|
========
|
||||||
|
|
||||||
The ``backends`` folder provides the model implementations for the different
|
The ``backends`` folder provides the model implementations for the different
|
||||||
backends supported by the Extension. The folder structure must be the
|
backends supported by the Extension. See General above for an example directory
|
||||||
following::
|
structure.
|
||||||
|
|
||||||
keystone
|
|
||||||
\\\ contrib
|
|
||||||
\\\ my_extension
|
|
||||||
\\\ backends
|
|
||||||
\\\ __init__.py (required)
|
|
||||||
|
|
||||||
\\\ sql.py (optional)
|
|
||||||
|
|
||||||
\\\ kvs.py (optional)
|
|
||||||
|
|
||||||
If a SQL backend is provided, in the ``sql.py`` backend implementation it is
|
If a SQL backend is provided, in the ``sql.py`` backend implementation it is
|
||||||
mandatory to define the new table(s) that the Extension introduces and the
|
mandatory to define the new table(s) that the Extension introduces and the
|
||||||
|
Loading…
Reference in New Issue
Block a user