docs: build modindex, add plugins

Change-Id: I2b5bae0e5b836dfcdf929e5ad56a810b127033a0
This commit is contained in:
Yuval Brik 2017-01-30 13:27:32 +02:00
parent 7c191bffab
commit 668b5dc8e1
19 changed files with 114 additions and 16 deletions

1
.gitignore vendored
View File

@ -39,6 +39,7 @@ output/*/index.html
# Sphinx
doc/build
doc/source/api
# pbr generates these
AUTHORS

View File

@ -0,0 +1,9 @@
Bank Plugins
------------
Swift
"""""
.. autoclass:: karbor.services.protection.bank_plugins.swift_bank_plugin.SwiftBankPlugin
:members:
:show-inheritance:

View File

@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
# 'sphinx.ext.intersphinx',
'oslosphinx',
'reno.sphinxext'
]
@ -29,6 +29,17 @@ extensions = [
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
modindex_common_prefix = [
'karbor.',
'karbor.services.',
]
exclude_patterns = [
'api/karbor.tests.*',
'api/karbor.wsgi.*',
'api/karbor.services.protection.bank_plugins.*',
'api/karbor.services.protection.protectable_plugins.*',
'api/karbor.services.protection.protection_plugins.*',
]
# The suffix of source filenames.
source_suffix = '.rst'

View File

@ -26,6 +26,15 @@ Using Karbor
contributing
releasenotes
Available Plugins
=================
.. toctree::
:maxdepth: 2
bank_plugins
protectable_plugins
protection_plugins
Karbor Specs
===========
.. toctree::
@ -37,5 +46,6 @@ Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -0,0 +1,32 @@
Protectable Plugins
-------------------
Project
^^^^^^^
.. autoclass:: karbor.services.protection.protectable_plugins.project.ProjectProtectablePlugin()
:members:
:show-inheritance:
Server
^^^^^^
.. autoclass:: karbor.services.protection.protectable_plugins.server.ServerProtectablePlugin()
:members:
:show-inheritance:
Volume
^^^^^^
.. autoclass:: karbor.services.protection.protectable_plugins.volume.VolumeProtectablePlugin()
:members:
:show-inheritance:
Image
^^^^^
.. autoclass:: karbor.services.protection.protectable_plugins.image.ImageProtectablePlugin()
:members:
:show-inheritance:

View File

@ -0,0 +1,38 @@
Protection Plugins
------------------
Project
^^^^^^^
Server
^^^^^^
Server to Bank
""""""""""""""
.. autoclass:: karbor.services.protection.protection_plugins.server.nova_protection_plugin.NovaProtectionPlugin()
:members:
:show-inheritance:
Volume
^^^^^^
Cinder Backup
"""""""""""""
.. autoclass:: karbor.services.protection.protection_plugins.volume.cinder_protection_plugin.CinderBackupProtectionPlugin()
:members:
:show-inheritance:
Image
^^^^^
Image to Bank
"""""""""""""
.. autoclass:: karbor.services.protection.protection_plugins.image.image_protection_plugin.GlanceProtectionPlugin()
:members:
:show-inheritance:

View File

@ -12,11 +12,6 @@ Karbor is an OpenStack project that provides a pluggable framework for
protecting and restoring Data and Metadata that comprises an OpenStack-deployed
application - Application Data Protection as a Service.
.. image:: https://raw.githubusercontent.com/openstack/karbor/master/doc/images/Karbor.png
:alt: Karbor
:align: center
:height: 150px
Mission Statement
~~~~~~~~~~~~~~~~~
@ -288,7 +283,6 @@ Communication and Meetings
and on **odd** Tuesday at 0900 UTC in
#openstack-meeting at freenode: \
https://wiki.openstack.org/wiki/Meetings/karbor
- Karbor Trello Board: \ https://trello.com/b/Sudr4fKT/karbor
Additional references
=====================

View File

@ -10,14 +10,14 @@ Contents:
:maxdepth: 3
api-service
bank-plugin-lease
pluggable_protection_provider
Spec Template
--------------
.. toctree::
:maxdepth: 3
bank-plugin-lease
pluggable_protection_provider
skeleton
template

View File

@ -10,7 +10,6 @@ This example will show protecting volume.
the default bank plugin. The admin also needs to configure the basic Swift
client account configuration::
cat providers.d/openstack-infra.conf
[provider]
name = OS Infra Provider
description = This provider uses OpenStack's own services (swift, cinder) as storage

View File

@ -25,6 +25,7 @@ from oslo_service import loopingcall
from oslo_utils import uuidutils
from swiftclient import ClientException
swift_bank_plugin_opts = [
cfg.StrOpt('bank_swift_object_container',
default='karbor',
@ -50,6 +51,7 @@ class SwiftConnectionFailed(exception.KarborException):
class SwiftBankPlugin(BankPlugin, LeasePlugin):
"""Swift bank plugin"""
def __init__(self, config, context=None):
super(SwiftBankPlugin, self).__init__(config)
self._config.register_opts(swift_bank_plugin_opts,

View File

@ -24,6 +24,7 @@ LOG = logging.getLogger(__name__)
class ImageProtectablePlugin(protectable_plugin.ProtectablePlugin):
"""Glance image protectable plugin"""
_SUPPORT_RESOURCE_TYPE = constants.IMAGE_RESOURCE_TYPE
def _glance_client(self, context):

View File

@ -17,6 +17,7 @@ from karbor.services.protection import protectable_plugin
class ProjectProtectablePlugin(protectable_plugin.ProtectablePlugin):
"""Keystone project protectable plugin"""
_SUPPORT_RESOURCE_TYPE = constants.PROJECT_RESOURCE_TYPE
def get_resource_type(self):

View File

@ -24,9 +24,7 @@ LOG = logging.getLogger(__name__)
class ServerProtectablePlugin(protectable_plugin.ProtectablePlugin):
"""Protectable plugin implementation for server from nova.
"""
"""Nova server protectable plugin"""
_SUPPORT_RESOURCE_TYPE = constants.SERVER_RESOURCE_TYPE

View File

@ -24,9 +24,7 @@ LOG = logging.getLogger(__name__)
class VolumeProtectablePlugin(protectable_plugin.ProtectablePlugin):
"""Protectable plugin implementation for volume from cinder.
"""
"""Cinder volume protectable plugin"""
_SUPPORT_RESOURCE_TYPE = constants.VOLUME_RESOURCE_TYPE

View File

@ -78,3 +78,7 @@ input_file = karbor/locale/karbor.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = karbor/locale/karbor.pot
[pbr]
autodoc_index_modules = true
warnerrors = true