Commit Graph

58 Commits

Author SHA1 Message Date
Stephen Finucane 1bcf8cee0d sql: Add support for auto-generation
Add the ability to autogenerate migrations. Because we need to support
different types of migration (expand and contract), this ends up being
significantly more complicated than what was needed in nova and cinder
and more akin to what was done in neutron. The key feature is here is
the use of an alembic hook called 'process_revision_directives', which
is called whenever one calls 'alembic revision --autogenerate'. We
extend this to allow us to hook into the autogeneration process and
ensure we only spit out directives for the relevant phase.

While we're here, we open up the Bobcat DB branch. This is similar to
what Neutron do (e.g. change I13ba740d245a46c41a969ff198e08ddff896eb1a).
Documentation will follow.

Change-Id: I17c9ff9508c5e2bd9521c18973af093d7550ab5a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-02-28 17:47:57 +00:00
niuke eae6adf00b remove unicode prefix from code
Change-Id: I0de3c786fa2617a44094c37827ebd93a8dfcf3b6
2022-08-15 10:53:41 +08:00
Stephen Finucane 503421d3d4 sql: Remove legacy 'migrate_repo' migration repo
This is now folded into the initial migration of the 'expand_repo'
repository. Previously, this was a dummy migration. We simply move
things across and remove any code that was trying to work with the older
repo since it's no longer necessary.

A release note is added, even though it's not really necessary since
nothing will change for users. It's more of a heads up that things are
afoot.

Change-Id: I59882d88fe593ec1ae37415b2157584f7f3c85f8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-01-10 18:31:09 +00:00
Ghanshyam Mann 8d18270863 Temporary exclude the common.sql.core.py from sphinx-apidoc target
With the new release of SQLAlchemy(1.4.27) TypeDecorator used
in common/sql/core.py file started failing (below error). I am not sure
if it is valid issue in SQLAlchemy or in our code base and we need to
blacklist the SQLAlchemy 1.4.27 version in requirements. But to unblock
the gate let's exclude it from sphinx-apidoc target.

Error:

Warning, treated as error:
/opt/stack/keystone/keystone/common/sql/core.py:docstring of keystone.common.sql.core.DateTimeInt.process_bind_param:19:undefined label: types_typedecorator

-https: //zuul.opendev.org/t/openstack/build/b2ee464fa1554cb89dc8873486865151
Change-Id: I7de055c2b266430bf886e200c3d8829a48ae9600
2021-11-19 16:24:23 -06:00
Andreas Jaeger 7820cafffe Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* parallelizing building of documents

Update Sphinx version as well.

openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.

Set openstackdocs_auto_name to use project as name.
Set openstackdocs_pdf_link to link to PDF file.

Remove docs requirements from lower-constraints, they are not installed.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I320a69816b4101bb76b88448881f3177c892ea92
2020-05-21 13:43:22 +00:00
Vishakha Agarwal ce4d065f23 Generate PDF documentation
This patch adds a new tox job/command for building the pdf
version of documentation.

tox -epdf-docs

In addition to adjusting the infra requirement for PDF build
support, the following changes are made to build a PDF doc

- Download link of config_options, sample config and policy
  files are disabled for PDF doc as relative links do not
  make sense.
- Pre-create the doc/build/pdf/_static directory as a
  workaround because sphinx_feature_classification.support_matrix extension
  is operating under the assumption that the _static directory already exist
  and trying to copy support-matrix.css into it. We need to remove
  this workaround once the problem in the support_matrix extension is fixed.
- Use the toctree_only=True workaround to avoid TOC duplicate links.

Change-Id: Ief8df5f6a5a22b8d0530458ac45f344a72cc3e49
2019-09-10 16:36:48 +09:00
Jens Harbott 182aa60791 Update broken link
Seems the user-guide no longer is a thing on its own, link to the
python-openstackclient documentation instead.

Change-Id: I84edd824e4b6a226e383071e9e3de1911f57939e
2019-08-15 09:46:03 +00:00
Zuul a63c9945e5 Merge "Update unified limit documentation" 2019-07-17 07:53:08 +00:00
Zuul 5f93a8be3b Merge "Revert "Exclude constants from autodoc"" 2019-07-05 08:12:41 +00:00
Zuul beccd4956e Merge "Revert "Ignore boilerplate constants in autodoc"" 2019-07-05 08:12:39 +00:00
Zuul 163f4e4a6e Merge "Bump openstackdocstheme to 1.20.0" 2019-07-02 14:59:28 +00:00
翟小君 6fef498ff3 Bump openstackdocstheme to 1.20.0
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: Icca6ef602af26a1d10766fd416011cdcceaa00a1
2019-07-01 23:48:56 +08:00
Lance Bragstad c49a64dd9a Update unified limit documentation
- Fix minor grammatical issues
- Include the `strict_two_level` model in the enforcement model
  section
- Improve readability
- Add enforcement examples in the form of diagrams

Change-Id: I483bf172dfe01f1db5a9673192eac988267996da
2019-06-17 13:24:20 +00:00
Colleen Murphy 10b7708ff8 Revert "Exclude constants from autodoc"
This reverts commit 485a6b2170.

With the release of Sphinx 2.1.1[1] constants are no longer autodoc'd so
we don't have this problem any more.

[1] https://github.com/sphinx-doc/sphinx/issues/6447

Change-Id: I8231f95e13ffad8f57ea6d7ae28216bfa27dc3d3
2019-06-11 11:54:10 -07:00
Colleen Murphy f828bb8721 Revert "Ignore boilerplate constants in autodoc"
This reverts commit 698c20577e.

With the release of Sphinx 2.1.1[1] constants are no longer autodoc'd so
we don't have this problem any more.

[1] https://github.com/sphinx-doc/sphinx/issues/6447

Change-Id: Id9164a0311a59a78cb2b9018c95809d0fccc54f7
2019-06-11 11:54:08 -07:00
Colleen Murphy 698c20577e Ignore boilerplate constants in autodoc
Since the 2.1.0 Sphinx release[1] module constants are now
autodocumented. Documenting the boilerplate CONF and LOG variables adds
unnecessary clutter to the docs, so add those constants to the ignore
list. This also adds a comment to the Sphinx configuration to explain
the situation.

[1] https://github.com/sphinx-doc/sphinx/issues/6447

Change-Id: If995b17feae6579479c796738ff8c290e550ab3f
2019-06-07 11:35:11 -07:00
Colleen Murphy 485a6b2170 Exclude constants from autodoc
Since the 2.1.0 release of Sphinx, the docs fail to build because of the
warnings-treated-as-errors of the now autodoc'd imported external
modules[1]. This change configures sphinx-autodoc to ignore those
constants so that the docs can build and the documentation from the
external modules isn't included in keystone's.

[1] https://github.com/sphinx-doc/sphinx/issues/6447

Change-Id: I7b1c2c740727446d5460dc0025e47e0e9b388d10
2019-06-06 14:05:49 -07:00
Mike Perez 9575937e56 Replace support matrix ext with common library
The code to generate a support matrix has been pulled into a common
library. Using this instead of duplicating code in various projects that
need it.

Change-Id: Ib15c086ceb84029e96be0fc60bd64f2a7a3e41aa
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
2019-04-16 18:09:14 -07:00
Colleen Murphy 4a141fea51 Add introduction section to federation docs
Add an introduction to the federation documentation discussing
background information on identity federation and how it is implemented
in keystone.

This repurposes some of the content in this blog post[1] of which I am
the author.

[1] http://www.gazlene.net/demystifying-keystone-federation.html

Partial-bug: #1793374

Change-Id: I5f3a5e70c7b868762880930ea6277691f44c046a
2018-12-11 15:37:06 +01:00
zhang.lei ac2b2160d6 Update the documentation bug tag
Using "documentation" instead of "doc" as a default tag for documentation
bugs.

Change-Id: I58efb48df9713cc4c9859469cfa07f78437d0702
2018-09-10 03:10:05 +00:00
Nguyen Hai a04a1dc782 Follow the new PTI for document build
- Follow new PTI for docs build
- Add sphinxcontrib.apidoc to replace pbr autodoc

REF:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Depends-On: https://review.openstack.org/#/c/559334/
Change-Id: I1d5f01cf49f36567f5a891c69c7269d3e966b9c5
2018-04-09 01:13:58 +09:00
Monty Taylor ebed5dd4ed
Remove vestigate HUDSON_PUBLISH_DOCS reference
This isn't actually used and is a leftover from a thing we did
seven years ago that survives today through copy-pasta.

Change-Id: I965ea16d39072dbf54a0d8d8718422efe9cff457
2017-09-02 08:46:30 -05:00
Jenkins f6602dc02c Merge "Fill in content in CLI Documentation" 2017-08-08 23:08:50 +00:00
Samriddhi Jain c326ae0417 Fill in content in CLI Documentation
Added keystone-manage documentation from man pages
to the placeholder created for CLI Documentation.

Change-Id: I0e259c76d96c6479a6165c535bc49c032b2f41da
2017-08-08 21:58:50 +05:30
Colleen Murphy e08e7ccad7 Fix man page builds
Since Sphinx 1.6 released, pbr's build_sphinx extension has been broken.
Specifically, pbr's [build_sphinx]/builders option is ignored. Luckily,
sphinx itself ipmlemented the feature but called it just 'builder'[1].
This patch fixes the config setting name and then cleans up a Sphinx
extension inclusion that is now automatically included.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119396.html

Change-Id: I5da6a996ed442524ddb108a890df2d024ee07c4d
2017-08-06 16:05:03 +02:00
Gage Hugo bc18bbbc5f Enable sphinx todo extension
In a previous change [0] when warning-is-error was
added, the sphinx todo extension was causing errors
with duplicate registration.

However with the recent changes between pbr and
sphinx, this extension no longer throws a duplicate
error when using warning-is-error and we can add
it back in.

[0] https://review.openstack.org/#/c/439674/

Change-Id: Ie28d87dfca8ee5cbea28616b32c471d848c50759
2017-07-17 11:03:29 -05:00
Samriddhi Jain 718a046447 Added configuration options using oslo.config
There are auto generated configuration and policy guides which
were earlier manually copied and referenced. Used sphinext
module in oslo_config and oslo_policy to automatically render
those pages.

Change-Id: I2b49eb0083661cce70c5b9457fe5bd32dfe5e5e8
2017-07-10 17:34:21 +05:30
Van Hung Pham 6e631db558 Switch from oslosphinx to openstackdocstheme
As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.

[0]https://review.openstack.org/#/c/472275/

Change-Id: I31543b78a1b2d2df685e295d4d011c5e6e4a165b
2017-06-30 14:07:10 +07:00
Samriddhi f992b1ce42 Updated the keystone docs to follow the docs theme
Changed the existing keystone documenatation html theme to the
new openstackdocstheme. For reference, the same theme is being
used here, https://docs.openstack.org/admin-guide/.

Closes-Bug: #1692031
Change-Id: Ibf1b018e8ed38afa04d02ab033762d6b0ceab89b
2017-06-22 13:26:46 +05:30
Colleen Murphy 4b77186a75 Move policy generator config to config-generator/
etc/ is for config files that should be installed on disk to support a
running keystone. config-generator/ is for files that
oslo-config-generator uses to generate sample config files and are not
needed by keystone in a live deployment.

Change-Id: I0614709ded739d77ec620150bcb6c2f456024b6f
2017-04-21 21:47:32 +00:00
Lance Bragstad ca70982775 Include sample policy file in documentation
Since we're moving all policy into code and documenting it there we
should generate those docs automatically, so they are less likely to
be out-of-date.

Change-Id: If00cd3bcc654a45944c0bc8b3f146c75bd970f9a
partially-implements: blueprint policy-docs
2017-04-21 21:47:09 +00:00
Colleen Murphy c7ab7c5677 Fix doc generation for python 3
1. The html_last_updated_fmt sphinx setting was providing a byte string
   where sphinx expected a str, which produced  warnings (and therefore
   failures):

     WARNING: The config value `html_last_updated_fmt' has type `bytes', expected to ['str'].

   The solution provided is copied from cinder's solution[1].

2. The .keys() method in python 3 returns a dict_keys object rather than
   a list and it does not include a .sort() method. This patch swaps
   .sort() out for the global function sorted() which works in both python
   2 and python 3.

This came up because on some newer distros that don't install python 2
by default, virtualenv defaults to creating a python 3 environment when
none is specified.

[1] https://review.openstack.org/#/c/433081

Change-Id: I68b796fa2e33fd6c3df67b542def31e6ba620944
2017-04-17 07:44:47 +02:00
Gage Hugo 32da690e50 Remove pbr warnerrors in favor of sphinx check
This change removes the unused "warnerrors" setting that
was part of [pbr] which was replaced by "warning-is-error"
in sphinx 1.5 and above[0]. This also fixes any warnings
and errors that came up when running `tox -edocs` using
this new feature:

 - Invalid code example highlighting
 - Redundant loading of todo extension

[0] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113085.html

Change-Id: I9a8789b448ffa199b4539f57e692bac251d75036
2017-03-03 14:04:10 -06:00
Dolph Mathews 927b08bbf7 Add token feature support matrix to documentation
This introduces a feature support matrix to illustrate which of our
various token providers supports which API operations and features. This
is intended to mirror Nova's feature support matrix documentation page,
found here:

  http://docs.openstack.org/developer/nova/support-matrix.html

After running `tox -e docs`, the result is embedded in
`doc/build/html/configuration.html`.

Change-Id: I3dc896a2906e25827a9e01afc7de5a737831c336
2016-07-28 15:44:28 +00:00
dineshbhor d0328e3293 Replace OpenStack LLC with OpenStack Foundation
Change-Id: I08ad2fad6122734cbcc5842c0b6f76c5f680b69c
Closes-Bug: #1214176
2016-07-22 15:10:35 +05:30
Eric Brown 67a50b5bcf Include doc directory in pep8 checks
Currently, flake8 runs against doc related directories such as
releasenotes and api-ref. Might as well remove doc from the
flake8 exclude list.  Each of these directories has only one
python file (conf.py).

Change-Id: I0445ad083d8d9167e0309950c200c9abb766bc1a
2016-06-30 14:14:13 -07:00
ZhiQiang Fan 5cd8356b7c Fix doc build if git is absent
When building packages if git is absent, then we should not set
html_last_updated_fmt. It can still be set via the -D switch
when building with sphinx-build.

Change-Id: Iea0fb01314e1c4a66a55841df07b9bdaf10153a6
Closes-Bug: #1552251
2016-04-28 06:22:19 +08:00
Steve Martinelli ac039414ce Remove eventlet support
Eventlet has been deprecated since the Kilo release and is
being removed in Newton.

A follow on patch will be proposed to remove the [ssl] section
since it is now redundant.

Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>
Partially implements: bp removed-as-of-newton

Change-Id: I963d94bbd188dbb6eba68623a42c5bc3f2289da4
2016-04-18 18:07:28 +00:00
Steve Martinelli 7df7c3c180 fix sample config link that 404s
this link 404s:
  http://docs.openstack.org/developer/keystone/_static/keystone.conf.sample

it can be seen on this page:
  http://docs.openstack.org/developer/keystone/sample_config.html

Change-Id: Ide97caf90659e3bb3511fd629e945c275e522151
2016-03-02 03:22:12 +00:00
Steve Martinelli 15668ded09 include sample config file in docs
leverage oslo.config to rebuild our sample config file in our
docs

Change-Id: I88a2429dd3cacd1d014b5b441b98fbfee7e1e208
2016-02-08 16:40:58 -05:00
Harshada Mangesh Kakad 114f72f286 Replace deprecated library function os.popen() with subprocess
os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.

Change-Id: Id8edeb60aa32f556b58ed0397d27598c39945241
Closes-Bug: #1529836
2016-01-07 09:06:27 -08:00
David Stanek 6f98a9e2bd Removes temporary fix for doc generation
A temporary fix was added to get around a bug in how pbr handles
its autodoc_tree_index_modules setting. Since this bug is fixed we no
longer need the work around.

Change-Id: I6af0fdd6d1efacb47692b89c329e45ac59fef7cb
Closes-Bug: #1260495
2015-05-13 12:01:16 +00:00
Steve Martinelli e412785218 Remove images directory from docs
I can't find a single place these images are used in our docs.
Best I can tell is that middleware docs have a few of them:
http://docs.openstack.org/developer/keystonemiddleware/middlewarearchitecture.html

Change-Id: I6dc36b506452f99488c2a202da5eea518cc51b68
2014-10-02 12:35:27 -04:00
Jamie Lennox 578647cb40 Delete intersphinx mappings
The documenatation does not use intersphinx mappings so remove these so
as not to download them.

Related-Bug: #1353817
Change-Id: I0b0e48fa04d08b1023984b6d2169322060fcee9e
2014-08-07 16:04:53 +10:00
Steve Martinelli 8df04b465b remove static files from docs
Since we are already using oslosphinx, there is no reason to
host our own version of the usual static files.

Change-Id: Id5a88a8bae17a6de3b10961f4db3314728588372
2014-07-24 21:56:21 -04:00
Christian Berendt 298f5814cb remove unneeded definitions of Python Source Code Encoding
I think PEP 0263 (http://legacy.python.org/dev/peps/pep-0263/) is
not used anywhere else and so it should be removed when it's not
needed.

Change-Id: I7bbbf8ab0f47c6f8a3b25e92e4678e76c77f19a1
2014-06-08 16:44:45 +00:00
Dirk Mueller 40898f1bd0 Switch over to oslosphinx
oslosphinx is the new name of oslo.sphinx

Closes-Bug: #1277168
Change-Id: I9c52b7ad5459c51ed3d2a92d9011c34c9de4de5a
2014-02-18 08:10:37 -06:00
liu-sheng 518855b10a correct the document links in man documents
Keystone man documents "SEE ALSO" url shoud be keystone.openstack.org

Change-Id: Ic0ed7ad76903072d7bd1421215277d9dbb9c5775
2014-01-26 16:58:46 +08:00
David Stanek 3f27b309f0 Fixes documentation building
- Adds the ability to build docs using tox
 - Fixes autodoc generation

A Sphinx extension is introduced in the commit to facilitate building
the API documentation. This extension should be removed when
bug 1260495 is fixed.

Change-Id: Ibf5e5403cb7d3e67947c87b2828b64a56a11fc30
2013-12-13 02:47:37 +00:00
Doug Hellmann ad58c0f899 Use oslo.sphinx and remove local copy of doc theme
Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.

blueprint oslo.sphinx

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8
2013-07-08 09:14:37 -04:00