Use stevedore directive to document plugins.

Add directives to the documentation to bring in docstrings from the
plugins used by glance.

Change-Id: I06df808446c749588b719001e172721db6d43660
This commit is contained in:
Cory Benfield 2015-08-27 11:18:32 +01:00
parent e0243b434d
commit b45bd50265
8 changed files with 105 additions and 0 deletions

@ -0,0 +1,21 @@
..
Copyright 2015 OpenStack Foundation
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Glance Artifact Types
=====================
.. list-plugins:: glance.artifacts.types
:detailed:

@ -47,6 +47,7 @@ extensions = ['sphinx.ext.coverage',
'sphinx.ext.pngmath',
'sphinx.ext.graphviz',
'oslosphinx',
'stevedore.sphinxext',
]
# Add any paths that contain templates here, relative to this directory.

@ -188,3 +188,19 @@ of an *Image* object.
:alt: Glance images DB schema
.. centered:: Image 1. Glance images DB schema
Glance Database Backends
~~~~~~~~~~~~~~~~~~~~~~~~
Migration Backends
------------------
.. list-plugins:: glance.database.migration_backend
:detailed:
Metadata Backends
-----------------
.. list-plugins:: glance.database.metadata_backend
:detailed:

30
doc/source/flows.rst Normal file

@ -0,0 +1,30 @@
..
Copyright 2015 OpenStack Foundation
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Glance Flow Plugins
===================
Flows
-----
.. list-plugins:: glance.flows
:detailed:
Import Flows
------------
.. list-plugins:: glance.flows.import
:detailed:

@ -0,0 +1,21 @@
..
Copyright 2015 OpenStack Foundation
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Image Location Strategy Modules
===============================
.. list-plugins:: glance.common.image_location_strategy.modules
:detailed:

@ -68,6 +68,9 @@ Installing/Configuring Glance
configuring
authentication
policies
image-location-strategy-modules
artifact-types
flows
Operating Glance
================

@ -100,6 +100,12 @@ class _Convert(task.Task):
def get_flow(**kwargs):
"""Return task flow for converting images to different formats.
:param task_id: Task ID.
:param task_type: Type of the task.
:param image_repo: Image repository used.
"""
task_id = kwargs.get('task_id')
task_type = kwargs.get('task_type')
image_repo = kwargs.get('image_repo')

@ -76,6 +76,13 @@ class _Introspect(utils.OptionalTask):
def get_flow(**kwargs):
"""Return task flow for introspecting images to obtain metadata about the
image.
:param task_id: Task ID
:param task_type: Type of the task.
:param image_repo: Image repository used.
"""
task_id = kwargs.get('task_id')
task_type = kwargs.get('task_type')
image_repo = kwargs.get('image_repo')