Browse Source

doc: Add policy reference

Partially Implements: blueprint neutron-policy-in-code

Change-Id: Iad80250e52e2347b0f6844ebaeb5a51cd314daf0
changes/27/631527/3
Akihiro Motoki 3 years ago
parent
commit
a3a5470538
  1. 1
      .gitignore
  2. 7
      doc/source/conf.py
  3. 30
      doc/source/configuration/index.rst
  4. 17
      doc/source/configuration/policy-sample.rst
  5. 10
      doc/source/configuration/policy.rst
  6. 15
      etc/README.txt

1
.gitignore

@ -7,6 +7,7 @@ covhtml/
dist/
doc/build
doc/source/_static/config_samples/*.sample
doc/source/_static/*.policy.yaml.sample
etc/*.sample
*.DS_Store
*.pyc

7
doc/source/conf.py

@ -25,6 +25,8 @@ extensions = [
'openstackdocstheme',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxext',
'oslo_policy.sphinxpolicygen',
]
# openstackdocstheme options
@ -101,3 +103,8 @@ config_generator_config_file = [
_get_config_generator_config_definition(conf)
for conf in _config_generator_config_files
]
# -- Options for oslo_policy.sphinxpolicygen ---------------------------------
policy_generator_config_file = '../../etc/oslo-policy-generator/policy.conf'
sample_policy_basename = '_static/neutron-dynamic-routing'

30
doc/source/configuration/index.rst

@ -1,24 +1,20 @@
=====================
Configuration Options
=====================
===================
Configuration Guide
===================
Configuration
-------------
This section provides a list of all possible options for each
configuration file.
Configuration Reference
-----------------------
neutron-dynamic-routing uses the following configuration files for its
various services.
.. toctree::
:glob:
:maxdepth: 1
*
Sample Configuration Files
--------------------------
bgp_dragent
The following are sample configuration files for neutron-dynamic-routing.
These are generated from code and reflect the current state of code
@ -29,3 +25,15 @@ in the neutron-dynamic-routing repository.
:maxdepth: 1
samples/*
Policy
------
neutron-dynamic-routing, like most OpenStack projects, uses a policy language
to restrict permissions on REST API actions.
.. toctree::
:maxdepth: 1
Policy Reference <policy>
Sample Policy File <policy-sample>

17
doc/source/configuration/policy-sample.rst

@ -0,0 +1,17 @@
==========================================
Sample neutron-dynamic-routing Policy File
==========================================
The following is a sample neutron-dynamic-routing policy file for adaptation
and use.
The sample policy can also be viewed in :download:`file form
</_static/neutron-dynamic-routing.policy.yaml.sample>`.
.. important::
The sample policy file is auto-generated from neutron-dynamic-routing when
this documentation is built. You must ensure your version of
neutron-dynamic-routing matches the version of this documentation.
.. literalinclude:: /_static/neutron-dynamic-routing.policy.yaml.sample

10
doc/source/configuration/policy.rst

@ -0,0 +1,10 @@
================================
neutron-dynamic-routing policies
================================
The following is an overview of all available policies in
neutron-dynamic-routing. For a sample configuration file,
refer to :doc:`/configuration/policy-sample`.
.. show-policy::
:config-file: etc/oslo-policy-generator/policy.conf

15
etc/README.txt

@ -1,9 +1,12 @@
To generate the sample neutron-dynamic-routing configuration files, run the
following command from the top level of the neutron-dynamic-routing directory:
To generate the sample neutron-dynamic-routing configuration files and the
sample policy file, run the following commands respectively from the top level
of the neutron-dynamic-routing directory:
tox -e genconfig
tox -e genconfig
tox -e genpolicy
If a 'tox' environment is unavailable, then you can run the following script
instead to generate the configuration files:
If a 'tox' environment is unavailable, then you can run the following commands
instead to generate the configuration files and the policy file:
./tools/generate_config_file_samples.sh
./tools/generate_config_file_samples.sh
oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf

Loading…
Cancel
Save