Browse Source

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
Tom Barron 2 years ago
parent
commit
58bd5b0179

+ 0
- 116
doc/ext/manila_todo.py View File

@@ -1,116 +0,0 @@
1
-#  Licensed under the Apache License, Version 2.0 (the "License"); you may
2
-#  not use this file except in compliance with the License. You may obtain
3
-#  a copy of the License at
4
-#
5
-#       http://www.apache.org/licenses/LICENSE-2.0
6
-#
7
-#  Unless required by applicable law or agreed to in writing, software
8
-#  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
-#  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
-#  License for the specific language governing permissions and limitations
11
-#  under the License.
12
-
13
-# This is a hack of the builtin todo extension, to make the todo_list
14
-# more user friendly
15
-
16
-from six import moves
17
-from sphinx.ext.todo import *
18
-import re
19
-
20
-
21
-def _(s):
22
-    return s
23
-
24
-
25
-def process_todo_nodes(app, doctree, fromdocname):
26
-    if not app.config['todo_include_todos']:
27
-        for node in doctree.traverse(todo_node):
28
-            node.parent.remove(node)
29
-
30
-    # Replace all todolist nodes with a list of the collected todos.
31
-    # Augment each todo with a backlink to the original location.
32
-    env = app.builder.env
33
-
34
-    if not hasattr(env, 'todo_all_todos'):
35
-        env.todo_all_todos = []
36
-
37
-    # remove the item that was added in the constructor, since I'm tired of
38
-    # reading through docutils for the proper way to construct an empty list
39
-    lists = []
40
-    for i in moves.range(5):
41
-        lists.append(nodes.bullet_list("", nodes.Text('', '')))
42
-        lists[i].remove(lists[i][0])
43
-        lists[i]['classes'].append('todo_list')
44
-
45
-    for node in doctree.traverse(todolist):
46
-        if not app.config['todo_include_todos']:
47
-            node.replace_self([])
48
-            continue
49
-
50
-        for todo_info in env.todo_all_todos:
51
-            para = nodes.paragraph()
52
-            filename = env.doc2path(todo_info['docname'], base=None)
53
-
54
-            # Create a reference
55
-            newnode = nodes.reference('', '')
56
-
57
-            line_info = todo_info['lineno']
58
-            link = _('%(filename)s, line %(line_info)d') % locals()
59
-            innernode = nodes.emphasis(link, link)
60
-            newnode['refdocname'] = todo_info['docname']
61
-
62
-            try:
63
-                newnode['refuri'] = app.builder.get_relative_uri(
64
-                    fromdocname, todo_info['docname'])
65
-                newnode['refuri'] += '#' + todo_info['target']['refid']
66
-            except NoUri:
67
-                # ignore if no URI can be determined, e.g. for LaTeX output
68
-                pass
69
-
70
-            newnode.append(innernode)
71
-            para += newnode
72
-            para['classes'].append('todo_link')
73
-
74
-            todo_entry = todo_info['todo']
75
-
76
-            env.resolve_references(todo_entry, todo_info['docname'],
77
-                                   app.builder)
78
-
79
-            item = nodes.list_item('', para)
80
-            todo_entry[1]['classes'].append('details')
81
-
82
-            comment = todo_entry[1]
83
-
84
-            m = re.match(r"^P(\d)", comment.astext())
85
-            priority = 5
86
-            if m:
87
-                priority = int(m.group(1))
88
-                if priority < 0:
89
-                    priority = 1
90
-                if priority > 5:
91
-                    priority = 5
92
-
93
-            item['classes'].append('todo_p' + str(priority))
94
-            todo_entry['classes'].append('todo_p' + str(priority))
95
-
96
-            item.append(comment)
97
-
98
-            lists[priority - 1].insert(0, item)
99
-
100
-        node.replace_self(lists)
101
-
102
-
103
-def setup(app):
104
-    app.add_config_value('todo_include_todos', False, False)
105
-
106
-    app.add_node(todolist)
107
-    app.add_node(todo_node,
108
-                 html=(visit_todo_node, depart_todo_node),
109
-                 latex=(visit_todo_node, depart_todo_node),
110
-                 text=(visit_todo_node, depart_todo_node))
111
-
112
-    app.add_directive('todo', Todo)
113
-    app.add_directive('todolist', TodoList)
114
-    app.connect('doctree-read', process_todos)
115
-    app.connect('doctree-resolved', process_todo_nodes)
116
-    app.connect('env-purge-doc', purge_todos)

+ 0
- 1
doc/source/conf.py View File

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

+ 0
- 2
doc/source/devref/fakes.rst View File

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

+ 0
- 1
doc/source/devref/index.rst View File

@@ -122,7 +122,6 @@ Share backends
122 122
    hitachi_hnas_driver
123 123
    hpe_3par_driver
124 124
    tegile_driver
125
-   maprfs_native_driver
126 125
 
127 126
 Indices and tables
128 127
 ------------------

+ 0
- 1
doc/source/devref/launchpad.rst View File

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

+ 0
- 10
doc/source/devref/scheduler.rst View File

@@ -163,16 +163,6 @@ The :mod:`manila.scheduler.filters.capacity` Filter
163 163
     :show-inheritance:
164 164
 
165 165
 
166
-The :mod:`manila.scheduler.filters.consistency_group` Filter
167
-------------------------------------------------------------
168
-
169
-.. automodule:: manila.scheduler.filters.consistency_group
170
-    :noindex:
171
-    :members:
172
-    :undoc-members:
173
-    :show-inheritance:
174
-
175
-
176 166
 The :mod:`manila.scheduler.filters.extra_specs_ops` Filter
177 167
 ----------------------------------------------------------
178 168
 

+ 0
- 3
doc/source/devref/share.rst View File

@@ -18,9 +18,6 @@
18 18
 Shared Filesystems
19 19
 ==================
20 20
 
21
-.. todo:: rework
22
-
23
-
24 21
 The :mod:`manila.share.manager` Module
25 22
 --------------------------------------
26 23
 

+ 2
- 0
doc/source/devref/share_migration.rst View File

@@ -332,10 +332,12 @@ Share Migration driver-assisted interfaces:
332 332
 -------------------------------------------
333 333
 
334 334
 .. autoclass:: manila.share.driver.ShareDriver
335
+    :noindex:
335 336
     :members: migration_check_compatibility, migration_start, migration_continue, migration_complete, migration_cancel, migration_get_progress
336 337
 
337 338
 Share Migration host-assisted interfaces:
338 339
 -----------------------------------------
339 340
 
340 341
 .. autoclass:: manila.share.driver.ShareDriver
342
+    :noindex:
341 343
     :members:  connection_get_info

+ 7
- 9
doc/source/devref/unit_tests.rst View File

@@ -4,7 +4,7 @@ Unit Tests
4 4
 Manila contains a suite of unit tests, in the manila/tests directory.
5 5
 
6 6
 Any proposed code change will be automatically rejected by the OpenStack
7
-Jenkins server [#f1]_ if the change causes unit test failures.
7
+Jenkins server if the change causes unit test failures.
8 8
 
9 9
 Running the tests
10 10
 -----------------
@@ -92,7 +92,7 @@ Virtualenv
92 92
 ----------
93 93
 
94 94
 By default, the tests use the Python packages installed inside a
95
-virtualenv [#f2]_. (This is equivalent to using the ``-V, --virtualenv`` flag).
95
+virtualenv [#f1]_. (This is equivalent to using the ``-V, --virtualenv`` flag).
96 96
 If the virtualenv does not exist, it will be created the first time the tests are run.
97 97
 
98 98
 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::
119 119
 Database
120 120
 --------
121 121
 
122
-Some of the unit tests make queries against an sqlite database [#f3]_. By
122
+Some of the unit tests make queries against an sqlite database [#f2]_. By
123 123
 default, the test database (``tests.sqlite``) is deleted and recreated each
124 124
 time ``run_tests.sh`` is invoked (This is equivalent to using the
125 125
 ``-r, --recreate-db`` flag). To reduce testing time if a database already
@@ -137,7 +137,7 @@ Gotchas
137 137
 **Running Tests from Shared Folders**
138 138
 
139 139
 If you are running the unit tests from a shared folder, you may see tests start
140
-to fail or stop completely as a result of Python lockfile issues [#f4]_. You
140
+to fail or stop completely as a result of Python lockfile issues [#f3]_. You
141 141
 can get around this by manually setting or updating the following line in
142 142
 ``manila/tests/conf_fixture.py``::
143 143
 
@@ -148,12 +148,10 @@ a shared folder.
148 148
 
149 149
 .. rubric:: Footnotes
150 150
 
151
-.. [#f1] See :doc:`jenkins`.
152
-
153
-.. [#f2] See :doc:`development.environment` for more details about the use of
151
+.. [#f1] See :doc:`development.environment` for more details about the use of
154 152
    virtualenv.
155 153
 
156
-.. [#f3] There is an effort underway to use a fake DB implementation for the
154
+.. [#f2] There is an effort underway to use a fake DB implementation for the
157 155
    unit tests. See https://lists.launchpad.net/openstack/msg05604.html
158 156
 
159
-.. [#f4] See Vish's comment in this bug report: https://bugs.launchpad.net/manila/+bug/882933
157
+.. [#f3] See Vish's comment in this bug report: https://bugs.launchpad.net/manila/+bug/882933

+ 0
- 5
doc/source/index.rst View File

@@ -66,11 +66,6 @@ Information
66 66
 
67 67
    glossary
68 68
 
69
-Outstanding Documentation Tasks
70
-===============================
71
-
72
-.. todolist::
73
-
74 69
 Indices and tables
75 70
 ==================
76 71
 

+ 5
- 1
manila/scheduler/rpcapi.py View File

@@ -78,12 +78,16 @@ class SchedulerAPI(object):
78 78
         """Casts an rpc to the scheduler to create a share group.
79 79
 
80 80
         Example of 'request_spec' argument value::
81
+
81 82
             {
82
-                'share_group_type_id': ,
83
+
84
+                'share_group_type_id': 'fake_share_group_type_id',
83 85
                 'share_group_id': 'some_fake_uuid',
84 86
                 'share_types': [models.ShareType],
85 87
                 'resource_type': models.ShareGroup,
88
+
86 89
             }
90
+
87 91
         """
88 92
         request_spec_p = jsonutils.to_primitive(request_spec)
89 93
         call_context = self.client.prepare(version='1.8')

+ 14
- 7
manila/share/driver.py View File

@@ -731,17 +731,24 @@ class ShareDriver(object):
731 731
         :param delete_rules: Empty List or List of access rules which should be
732 732
                removed. access_rules doesn't contain these rules.
733 733
         :param share_server: None or Share server model
734
-        :returns: None, or a dictionary of updates in the format:
734
+        :returns: None, or a dictionary of updates in the format::
735 735
 
736 736
             {
737
+
737 738
                 '09960614-8574-4e03-89cf-7cf267b0bd08': {
738
-                        'access_key': 'alice31493e5441b8171d2310d80e37e',
739
-                        'state': 'error',
740
-                    },
739
+
740
+                    'access_key': 'alice31493e5441b8171d2310d80e37e',
741
+                    'state': 'error',
742
+
743
+                },
744
+
741 745
                 '28f6eabb-4342-486a-a7f4-45688f0c0295': {
742
-                        'access_key': 'bob0078aa042d5a7325480fd13228b',
743
-                        'state': 'active',
744
-                    },
746
+
747
+                    'access_key': 'bob0078aa042d5a7325480fd13228b',
748
+                    'state': 'active',
749
+
750
+                },
751
+
745 752
             }
746 753
 
747 754
         The top level keys are 'access_id' fields of the access rules that

+ 84
- 6
manila/share/drivers/hitachi/hnas/driver.py View File

@@ -89,12 +89,15 @@ CONF.register_opts(hitachi_hnas_opts)
89 89
 class HitachiHNASDriver(driver.ShareDriver):
90 90
     """Manila HNAS Driver implementation.
91 91
 
92
-    1.0.0 - Initial Version.
93
-    2.0.0 - Refactoring, bugfixes, implemented Share Shrink and Update Access.
94
-    3.0.0 - New driver location, implemented support for CIFS protocol.
95
-    3.1.0 - Added admin network export location support.
96
-    4.0.0 - Added mountable snapshots, revert-to-snapshot and manage snapshots
97
-            features support.
92
+    Driver versions::
93
+
94
+        1.0.0 - Initial Version.
95
+        2.0.0 - Refactoring, bugfixes, implemented Share Shrink and
96
+                Update Access.
97
+        3.0.0 - New driver location, implemented support for CIFS protocol.
98
+        3.1.0 - Added admin network export location support.
99
+        4.0.0 - Added mountable snapshots, revert-to-snapshot and
100
+                manage snapshots features support.
98 101
     """
99 102
 
100 103
     def __init__(self, *args, **kwargs):
@@ -318,31 +321,45 @@ class HitachiHNASDriver(driver.ShareDriver):
318 321
             Example for NFS::
319 322
 
320 323
             [
324
+
321 325
               {
326
+
322 327
                 'path': '172.24.44.10:/shares/id',
323 328
                 'metadata': {},
324 329
                 'is_admin_only': False
330
+
325 331
               },
332
+
326 333
               {
334
+
327 335
                 'path': '192.168.0.10:/shares/id',
328 336
                 'metadata': {},
329 337
                 'is_admin_only': True
338
+
330 339
               }
340
+
331 341
             ]
332 342
 
333 343
             Example for CIFS::
334 344
 
335 345
             [
346
+
336 347
               {
348
+
337 349
                 'path': '\\172.24.44.10\id',
338 350
                 'metadata': {},
339 351
                 'is_admin_only': False
352
+
340 353
               },
354
+
341 355
               {
356
+
342 357
                 'path': '\\192.168.0.10\id',
343 358
                 'metadata': {},
344 359
                 'is_admin_only': True
360
+
345 361
               }
362
+
346 363
             ]
347 364
 
348 365
         """
@@ -445,31 +462,45 @@ class HitachiHNASDriver(driver.ShareDriver):
445 462
             Example for NFS::
446 463
 
447 464
             [
465
+
448 466
               {
467
+
449 468
                 'path': '172.24.44.10:/shares/id',
450 469
                 'metadata': {},
451 470
                 'is_admin_only': False
471
+
452 472
               },
473
+
453 474
               {
475
+
454 476
                 'path': '192.168.0.10:/shares/id',
455 477
                 'metadata': {},
456 478
                 'is_admin_only': True
479
+
457 480
               }
481
+
458 482
             ]
459 483
 
460 484
             Example for CIFS::
461 485
 
462 486
             [
487
+
463 488
               {
489
+
464 490
                 'path': '\\172.24.44.10\id',
465 491
                 'metadata': {},
466 492
                 'is_admin_only': False
493
+
467 494
               },
495
+
468 496
               {
497
+
469 498
                 'path': '\\192.168.0.10\id',
470 499
                 'metadata': {},
471 500
                 'is_admin_only': True
501
+
472 502
               }
503
+
473 504
             ]
474 505
 
475 506
         """
@@ -501,31 +532,45 @@ class HitachiHNASDriver(driver.ShareDriver):
501 532
             Example for NFS::
502 533
 
503 534
             [
535
+
504 536
               {
537
+
505 538
                 'path': '172.24.44.10:/shares/id',
506 539
                 'metadata': {},
507 540
                 'is_admin_only': False
541
+
508 542
               },
543
+
509 544
               {
545
+
510 546
                 'path': '192.168.0.10:/shares/id',
511 547
                 'metadata': {},
512 548
                 'is_admin_only': True
549
+
513 550
               }
551
+
514 552
             ]
515 553
 
516 554
             Example for CIFS::
517 555
 
518 556
             [
557
+
519 558
               {
559
+
520 560
                 'path': '\\172.24.44.10\id',
521 561
                 'metadata': {},
522 562
                 'is_admin_only': False
563
+
523 564
               },
565
+
524 566
               {
567
+
525 568
                 'path': '\\192.168.0.10\id',
526 569
                 'metadata': {},
527 570
                 'is_admin_only': True
571
+
528 572
               }
573
+
529 574
             ]
530 575
 
531 576
         """
@@ -610,37 +655,55 @@ class HitachiHNASDriver(driver.ShareDriver):
610 655
             Example for NFS::
611 656
 
612 657
             {
658
+
613 659
               'size': 10,
614 660
               'export_locations': [
661
+
615 662
                 {
663
+
616 664
                   'path': '172.24.44.10:/shares/id',
617 665
                   'metadata': {},
618 666
                   'is_admin_only': False
667
+
619 668
                 },
669
+
620 670
                 {
671
+
621 672
                   'path': '192.168.0.10:/shares/id',
622 673
                   'metadata': {},
623 674
                   'is_admin_only': True
675
+
624 676
                 }
677
+
625 678
               ]
679
+
626 680
             }
627 681
 
628 682
             Example for CIFS::
629 683
 
630 684
             {
685
+
631 686
               'size': 10,
632 687
               'export_locations': [
688
+
633 689
                 {
690
+
634 691
                   'path': '\\172.24.44.10\id',
635 692
                   'metadata': {},
636 693
                   'is_admin_only': False
694
+
637 695
                 },
696
+
638 697
                 {
698
+
639 699
                   'path': '\\192.168.0.10\id',
640 700
                   'metadata': {},
641 701
                   'is_admin_only': True
702
+
642 703
                 }
704
+
643 705
               ]
706
+
644 707
             }
645 708
 
646 709
         """
@@ -1171,32 +1234,47 @@ class HitachiHNASDriver(driver.ShareDriver):
1171 1234
             Example for NFS::
1172 1235
 
1173 1236
             [
1237
+
1174 1238
               {
1239
+
1175 1240
                 'path': '172.24.44.10:/snapshots/id',
1176 1241
                 'metadata': {},
1177 1242
                 'is_admin_only': False
1243
+
1178 1244
               },
1245
+
1179 1246
               {
1247
+
1180 1248
                 'path': '192.168.0.10:/snapshots/id',
1181 1249
                 'metadata': {},
1182 1250
                 'is_admin_only': True
1251
+
1183 1252
               }
1253
+
1184 1254
             ]
1185 1255
 
1186 1256
             Example for CIFS::
1187 1257
 
1188 1258
             [
1259
+
1189 1260
               {
1261
+
1190 1262
                 'path': '\\172.24.44.10\id',
1191 1263
                 'metadata': {},
1192 1264
                 'is_admin_only': False
1265
+
1193 1266
               },
1267
+
1194 1268
               {
1269
+
1195 1270
                 'path': '\\192.168.0.10\id',
1196 1271
                 'metadata': {},
1197 1272
                 'is_admin_only': True
1273
+
1198 1274
               }
1275
+
1199 1276
             ]
1277
+
1200 1278
         """
1201 1279
         LOG.debug("Ensuring snapshot in HNAS: %(snap)s.",
1202 1280
                   {'snap': snapshot['id']})

+ 5
- 2
manila/share/drivers/hpe/hpe_3par_driver.py View File

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

+ 1
- 1
manila/share/drivers/huawei/huawei_nas.py View File

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

+ 9
- 3
manila/share/drivers/zfsonlinux/driver.py View File

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

+ 2
- 0
tox.ini View File

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

Loading…
Cancel
Save