Unblock gate failure on docs build

Our form of todo extension does not work with sphinx 1.5.2.

Remove it to unblock gate: we can add todos back in later with
more current methods.  Also clean up some dangling cross-references
in the doc.

Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>
Change-Id: If74b9e32ad2b5d8d70da60895d85588ff993797e
This commit is contained in:
Tom Barron 2017-03-03 09:38:22 -05:00 committed by vponomaryov
parent e79cf7bf33
commit 58bd5b0179
17 changed files with 129 additions and 168 deletions

View File

@ -1,116 +0,0 @@
# 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.
# This is a hack of the builtin todo extension, to make the todo_list
# more user friendly
from six import moves
from sphinx.ext.todo import *
import re
def _(s):
return s
def process_todo_nodes(app, doctree, fromdocname):
if not app.config['todo_include_todos']:
for node in doctree.traverse(todo_node):
node.parent.remove(node)
# Replace all todolist nodes with a list of the collected todos.
# Augment each todo with a backlink to the original location.
env = app.builder.env
if not hasattr(env, 'todo_all_todos'):
env.todo_all_todos = []
# remove the item that was added in the constructor, since I'm tired of
# reading through docutils for the proper way to construct an empty list
lists = []
for i in moves.range(5):
lists.append(nodes.bullet_list("", nodes.Text('', '')))
lists[i].remove(lists[i][0])
lists[i]['classes'].append('todo_list')
for node in doctree.traverse(todolist):
if not app.config['todo_include_todos']:
node.replace_self([])
continue
for todo_info in env.todo_all_todos:
para = nodes.paragraph()
filename = env.doc2path(todo_info['docname'], base=None)
# Create a reference
newnode = nodes.reference('', '')
line_info = todo_info['lineno']
link = _('%(filename)s, line %(line_info)d') % locals()
innernode = nodes.emphasis(link, link)
newnode['refdocname'] = todo_info['docname']
try:
newnode['refuri'] = app.builder.get_relative_uri(
fromdocname, todo_info['docname'])
newnode['refuri'] += '#' + todo_info['target']['refid']
except NoUri:
# ignore if no URI can be determined, e.g. for LaTeX output
pass
newnode.append(innernode)
para += newnode
para['classes'].append('todo_link')
todo_entry = todo_info['todo']
env.resolve_references(todo_entry, todo_info['docname'],
app.builder)
item = nodes.list_item('', para)
todo_entry[1]['classes'].append('details')
comment = todo_entry[1]
m = re.match(r"^P(\d)", comment.astext())
priority = 5
if m:
priority = int(m.group(1))
if priority < 0:
priority = 1
if priority > 5:
priority = 5
item['classes'].append('todo_p' + str(priority))
todo_entry['classes'].append('todo_p' + str(priority))
item.append(comment)
lists[priority - 1].insert(0, item)
node.replace_self(lists)
def setup(app):
app.add_config_value('todo_include_todos', False, False)
app.add_node(todolist)
app.add_node(todo_node,
html=(visit_todo_node, depart_todo_node),
latex=(visit_todo_node, depart_todo_node),
text=(visit_todo_node, depart_todo_node))
app.add_directive('todo', Todo)
app.add_directive('todolist', TodoList)
app.connect('doctree-read', process_todos)
app.connect('doctree-resolved', process_todo_nodes)
app.connect('env-purge-doc', purge_todos)

View File

@ -43,7 +43,6 @@ sys.path.insert(0, os.path.abspath('./'))
# or your custom ones.
extensions = ['sphinx.ext.autodoc',
'ext.manila_todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',

View File

@ -18,8 +18,6 @@
Fake Drivers
============
.. todo:: document general info about fakes
When the real thing isn't available and you have some development to do these
fake implementations of various drivers let you get on with your day.

View File

@ -122,7 +122,6 @@ Share backends
hitachi_hnas_driver
hpe_3par_driver
tegile_driver
maprfs_native_driver
Indices and tables
------------------

View File

@ -13,7 +13,6 @@ OpenStack-related sites. These sites include:
* `Wiki`_
* Gerrit (see :doc:`gerrit`)
* Jenkins (see :doc:`jenkins`)
Mailing list
------------

View File

@ -163,16 +163,6 @@ The :mod:`manila.scheduler.filters.capacity` Filter
:show-inheritance:
The :mod:`manila.scheduler.filters.consistency_group` Filter
------------------------------------------------------------
.. automodule:: manila.scheduler.filters.consistency_group
:noindex:
:members:
:undoc-members:
:show-inheritance:
The :mod:`manila.scheduler.filters.extra_specs_ops` Filter
----------------------------------------------------------

View File

@ -18,9 +18,6 @@
Shared Filesystems
==================
.. todo:: rework
The :mod:`manila.share.manager` Module
--------------------------------------

View File

@ -332,10 +332,12 @@ Share Migration driver-assisted interfaces:
-------------------------------------------
.. autoclass:: manila.share.driver.ShareDriver
:noindex:
:members: migration_check_compatibility, migration_start, migration_continue, migration_complete, migration_cancel, migration_get_progress
Share Migration host-assisted interfaces:
-----------------------------------------
.. autoclass:: manila.share.driver.ShareDriver
:noindex:
:members: connection_get_info

View File

@ -4,7 +4,7 @@ Unit Tests
Manila contains a suite of unit tests, in the manila/tests directory.
Any proposed code change will be automatically rejected by the OpenStack
Jenkins server [#f1]_ if the change causes unit test failures.
Jenkins server if the change causes unit test failures.
Running the tests
-----------------
@ -92,7 +92,7 @@ Virtualenv
----------
By default, the tests use the Python packages installed inside a
virtualenv [#f2]_. (This is equivalent to using the ``-V, --virtualenv`` flag).
virtualenv [#f1]_. (This is equivalent to using the ``-V, --virtualenv`` flag).
If the virtualenv does not exist, it will be created the first time the tests are run.
If you wish to recreate the virtualenv, call ``run_tests.sh`` with the flag::
@ -119,7 +119,7 @@ If you do not wish to use a virtualenv at all, use the flag::
Database
--------
Some of the unit tests make queries against an sqlite database [#f3]_. By
Some of the unit tests make queries against an sqlite database [#f2]_. By
default, the test database (``tests.sqlite``) is deleted and recreated each
time ``run_tests.sh`` is invoked (This is equivalent to using the
``-r, --recreate-db`` flag). To reduce testing time if a database already
@ -137,7 +137,7 @@ Gotchas
**Running Tests from Shared Folders**
If you are running the unit tests from a shared folder, you may see tests start
to fail or stop completely as a result of Python lockfile issues [#f4]_. You
to fail or stop completely as a result of Python lockfile issues [#f3]_. You
can get around this by manually setting or updating the following line in
``manila/tests/conf_fixture.py``::
@ -148,12 +148,10 @@ a shared folder.
.. rubric:: Footnotes
.. [#f1] See :doc:`jenkins`.
.. [#f2] See :doc:`development.environment` for more details about the use of
.. [#f1] See :doc:`development.environment` for more details about the use of
virtualenv.
.. [#f3] There is an effort underway to use a fake DB implementation for the
.. [#f2] There is an effort underway to use a fake DB implementation for the
unit tests. See https://lists.launchpad.net/openstack/msg05604.html
.. [#f4] See Vish's comment in this bug report: https://bugs.launchpad.net/manila/+bug/882933
.. [#f3] See Vish's comment in this bug report: https://bugs.launchpad.net/manila/+bug/882933

View File

@ -66,11 +66,6 @@ Information
glossary
Outstanding Documentation Tasks
===============================
.. todolist::
Indices and tables
==================

View File

@ -78,12 +78,16 @@ class SchedulerAPI(object):
"""Casts an rpc to the scheduler to create a share group.
Example of 'request_spec' argument value::
{
'share_group_type_id': ,
'share_group_type_id': 'fake_share_group_type_id',
'share_group_id': 'some_fake_uuid',
'share_types': [models.ShareType],
'resource_type': models.ShareGroup,
}
"""
request_spec_p = jsonutils.to_primitive(request_spec)
call_context = self.client.prepare(version='1.8')

View File

@ -731,17 +731,24 @@ class ShareDriver(object):
:param delete_rules: Empty List or List of access rules which should be
removed. access_rules doesn't contain these rules.
:param share_server: None or Share server model
:returns: None, or a dictionary of updates in the format:
:returns: None, or a dictionary of updates in the format::
{
'09960614-8574-4e03-89cf-7cf267b0bd08': {
'access_key': 'alice31493e5441b8171d2310d80e37e',
'state': 'error',
},
'access_key': 'alice31493e5441b8171d2310d80e37e',
'state': 'error',
},
'28f6eabb-4342-486a-a7f4-45688f0c0295': {
'access_key': 'bob0078aa042d5a7325480fd13228b',
'state': 'active',
},
'access_key': 'bob0078aa042d5a7325480fd13228b',
'state': 'active',
},
}
The top level keys are 'access_id' fields of the access rules that

View File

@ -89,12 +89,15 @@ CONF.register_opts(hitachi_hnas_opts)
class HitachiHNASDriver(driver.ShareDriver):
"""Manila HNAS Driver implementation.
1.0.0 - Initial Version.
2.0.0 - Refactoring, bugfixes, implemented Share Shrink and Update Access.
3.0.0 - New driver location, implemented support for CIFS protocol.
3.1.0 - Added admin network export location support.
4.0.0 - Added mountable snapshots, revert-to-snapshot and manage snapshots
features support.
Driver versions::
1.0.0 - Initial Version.
2.0.0 - Refactoring, bugfixes, implemented Share Shrink and
Update Access.
3.0.0 - New driver location, implemented support for CIFS protocol.
3.1.0 - Added admin network export location support.
4.0.0 - Added mountable snapshots, revert-to-snapshot and
manage snapshots features support.
"""
def __init__(self, *args, **kwargs):
@ -318,31 +321,45 @@ class HitachiHNASDriver(driver.ShareDriver):
Example for NFS::
[
{
'path': '172.24.44.10:/shares/id',
'metadata': {},
'is_admin_only': False
},
{
'path': '192.168.0.10:/shares/id',
'metadata': {},
'is_admin_only': True
}
]
Example for CIFS::
[
{
'path': '\\172.24.44.10\id',
'metadata': {},
'is_admin_only': False
},
{
'path': '\\192.168.0.10\id',
'metadata': {},
'is_admin_only': True
}
]
"""
@ -445,31 +462,45 @@ class HitachiHNASDriver(driver.ShareDriver):
Example for NFS::
[
{
'path': '172.24.44.10:/shares/id',
'metadata': {},
'is_admin_only': False
},
{
'path': '192.168.0.10:/shares/id',
'metadata': {},
'is_admin_only': True
}
]
Example for CIFS::
[
{
'path': '\\172.24.44.10\id',
'metadata': {},
'is_admin_only': False
},
{
'path': '\\192.168.0.10\id',
'metadata': {},
'is_admin_only': True
}
]
"""
@ -501,31 +532,45 @@ class HitachiHNASDriver(driver.ShareDriver):
Example for NFS::
[
{
'path': '172.24.44.10:/shares/id',
'metadata': {},
'is_admin_only': False
},
{
'path': '192.168.0.10:/shares/id',
'metadata': {},
'is_admin_only': True
}
]
Example for CIFS::
[
{
'path': '\\172.24.44.10\id',
'metadata': {},
'is_admin_only': False
},
{
'path': '\\192.168.0.10\id',
'metadata': {},
'is_admin_only': True
}
]
"""
@ -610,37 +655,55 @@ class HitachiHNASDriver(driver.ShareDriver):
Example for NFS::
{
'size': 10,
'export_locations': [
{
'path': '172.24.44.10:/shares/id',
'metadata': {},
'is_admin_only': False
},
{
'path': '192.168.0.10:/shares/id',
'metadata': {},
'is_admin_only': True
}
]
}
Example for CIFS::
{
'size': 10,
'export_locations': [
{
'path': '\\172.24.44.10\id',
'metadata': {},
'is_admin_only': False
},
{
'path': '\\192.168.0.10\id',
'metadata': {},
'is_admin_only': True
}
]
}
"""
@ -1171,32 +1234,47 @@ class HitachiHNASDriver(driver.ShareDriver):
Example for NFS::
[
{
'path': '172.24.44.10:/snapshots/id',
'metadata': {},
'is_admin_only': False
},
{
'path': '192.168.0.10:/snapshots/id',
'metadata': {},
'is_admin_only': True
}
]
Example for CIFS::
[
{
'path': '\\172.24.44.10\id',
'metadata': {},
'is_admin_only': False
},
{
'path': '\\192.168.0.10\id',
'metadata': {},
'is_admin_only': True
}
]
"""
LOG.debug("Ensuring snapshot in HNAS: %(snap)s.",
{'snap': snapshot['id']})

View File

@ -42,8 +42,10 @@ class FPG(types.String, types.IPAddress):
Used to represent multiple pools per backend values.
Converts configuration value to an FPGs value.
FPGs value format:
FPGs value format::
FPG name, IP address 1, IP address 2, ..., IP address 4
where FPG name is a string value,
IP address is of type types.IPAddress
@ -199,7 +201,8 @@ class HPE3ParShareDriver(driver.ShareDriver):
Supports NFS and CIFS protocols on arrays with File Persona.
Version history:
Version history::
1.0.0 - Begin Liberty development (post-Kilo)
1.0.1 - Report thin/dedup/hp_flash_cache capabilities
1.0.2 - Add share server/share network support

View File

@ -43,7 +43,7 @@ class HuaweiNasDriver(driver.ShareDriver):
"""Huawei Share Driver.
Executes commands relating to Shares.
Driver version history:
Driver version history::
1.0 - Initial version.
1.1 - Add shrink share.

View File

@ -787,9 +787,15 @@ class ZFSonLinuxShareDriver(zfs_utils.ExecuteMixin, driver.ShareDriver):
:param snapshot_instance: SnapshotInstance data
:param driver_options: expects only one optional key 'size'.
:return: dict with share snapshot instance fields for update, example:
{'size': 1,
'provider_location': 'path/to/some/dataset@some_snapshot_tag'}
:return: dict with share snapshot instance fields for update, example::
{
'size': 1,
'provider_location': 'path/to/some/dataset@some_snapshot_tag',
}
"""
snapshot_size = int(driver_options.get("size", 0))
old_provider_location = snapshot_instance.get("provider_location")

View File

@ -63,7 +63,9 @@ commands =
commands = {posargs}
[testenv:docs]
whitelist_externals = rm
commands =
rm -rf doc/build
python setup.py build_sphinx
doc8 --ignore D001 --ignore-path .tox --ignore-path doc/build --ignore-path manila.egg-info -e txt -e rst