]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
task: reformat the docstring for sphinx 1250/head
authorKefu Chai <kchai@redhat.com>
Mon, 21 Jan 2019 04:20:33 +0000 (12:20 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 21 Jan 2019 04:20:35 +0000 (12:20 +0800)
the code block should start with `::`, and should be indented.

Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/provision/cloud/util.py
teuthology/task/background_exec.py
teuthology/task/clock.py
teuthology/task/full_sequential.py
teuthology/task/lockfile.py
teuthology/task/loop.py
teuthology/task/parallel.py
teuthology/task/sequential.py
teuthology/task/tasktest.py
teuthology/task/tests/__init__.py
teuthology/task/timer.py

index e9afa22b4a2881ca28ac9b3155ab936bdeb35c5f..aaf255a0ff6c838ce2db954db860011f75be28fd 100644 (file)
@@ -38,7 +38,7 @@ def selective_update(a, b, func):
     pairs in the second dict and merges them into the first dict if func()
     returns a "Truthy" value.
 
-    Example:
+    Example::
 
         >>> a = dict(x=0, y=1, z=3)
         >>> b = dict(x=1, y=2, z=0)
index ffe36efa9333d21693e1077803c6ae45418e1101..76d58bd40d6e2fb52bebe221464d0b84d1bcfc0e 100644 (file)
@@ -25,7 +25,7 @@ def task(ctx, config):
 
     If the command a list, we simply join it with ;'s.
 
-    Example:
+    Example::
 
        tasks:
        - install:
index cf3fe1784d98366d86f8dfbf639375d1873b0733..53a349c8660e4cffbb20d62d5791c6ddd7eb79dc 100644 (file)
@@ -17,12 +17,12 @@ def task(ctx, config):
     This will initially sync the clocks.  Eventually it should let us also
     skew by some number of seconds.
 
-    example:
+    example::
 
-    tasks:
-    - clock:
-    - ceph:
-    - interactive:
+        tasks:
+        - clock:
+        - ceph:
+        - interactive:
 
     to sync.
 
index 197a55496824f3d2fa948cb7eb587f8f831fab81..4114d92da22fdb0622d164dde282b7b9a1759d33 100644 (file)
@@ -14,10 +14,10 @@ def task(ctx, config):
     Run a set of tasks to completion in order.  __exit__ is called on a task
     before __enter__ on the next
 
-    example:
-    - full_sequential:
-       - tasktest:
-       - tasktest:
+    example::
+        - full_sequential:
+           - tasktest:
+           - tasktest:
 
     :param ctx: Context
     :param config: Configuration
index 8c18d46164f5db841dbda58833a98ae229db21c1..a1980c2103882f1e1109eea53d70bc1caa36547d 100644 (file)
@@ -25,17 +25,19 @@ def task(ctx, config):
     Optional entries are the "offset" and "length" of the lock. You can also specify a
     "maxwait" timeout period which fails if the executable takes longer
     to complete, and an "expectfail".
-    An example:
-    tasks:
-    - ceph:
-    - ceph-fuse: [client.0, client.1]
-    - lockfile:
-      [{client:client.0, file:testfile, holdtime:10},
-      {client:client.1, file:testfile, holdtime:0, maxwait:0, expectfail:true},
-      {client:client.1, file:testfile, holdtime:0, maxwait:15, expectfail:false},
-      10,
-      {client: client.1, lockfile: testfile, holdtime: 5},
-      {client: client.2, lockfile: testfile, holdtime: 5, maxwait: 1, expectfail: True}]
+
+    An example::
+
+        tasks:
+        - ceph:
+        - ceph-fuse: [client.0, client.1]
+        - lockfile:
+          [{client:client.0, file:testfile, holdtime:10},
+          {client:client.1, file:testfile, holdtime:0, maxwait:0, expectfail:true},
+          {client:client.1, file:testfile, holdtime:0, maxwait:15, expectfail:false},
+          10,
+          {client: client.1, lockfile: testfile, holdtime: 5},
+          {client: client.2, lockfile: testfile, holdtime: 5, maxwait: 1, expectfail: True}]
 
 
     In the past this test would have failed; there was a bug where waitlocks weren't
index 598f561a54157de3c110cfdd62b923a0a806dccc..1fa0152a0eeec1c4220f0f7d97d8bbafc0840886 100644 (file)
@@ -12,12 +12,13 @@ def task(ctx, config):
     """
     Loop a sequential group of tasks
 
-    example:
-    - loop:
-       count: 10
-       body:
-         - tasktest:
-         - tasktest:
+    example::
+
+        - loop:
+           count: 10
+           body:
+             - tasktest:
+             - tasktest:
 
     :param ctx: Context
     :param config: Configuration
index c5ea85a55aab8b5593111edebb42b1e7e5c2f176..d96391a5e0026dd983f1314b64eb8e7671e0ee48 100644 (file)
@@ -14,28 +14,29 @@ def task(ctx, config):
     """
     Run a group of tasks in parallel.
 
-    example:
-    - parallel:
-       - tasktest:
-       - tasktest:
+    example::
+
+        - parallel:
+           - tasktest:
+           - tasktest:
 
     You can also define tasks in a top-level section outside of
     'tasks:', and reference them here.
 
     The referenced section must contain a list of tasks to run
     sequentially, or a single task as a dict. The latter is only
-    available for backwards compatibility with existing suites:
+    available for backwards compatibility with existing suites::
 
-    tasks:
-    - parallel:
-      - tasktest: # task inline
-      - foo       # reference to top-level 'foo' section
-      - bar       # reference to top-level 'bar' section
-    foo:
-    - tasktest1:
-    - tasktest2:
-    bar:
-      tasktest: # note the list syntax from 'foo' is preferred
+        tasks:
+        - parallel:
+          - tasktest: # task inline
+          - foo       # reference to top-level 'foo' section
+          - bar       # reference to top-level 'bar' section
+        foo:
+        - tasktest1:
+        - tasktest2:
+        bar:
+          tasktest: # note the list syntax from 'foo' is preferred
 
     That is, if the entry is not a dict, we will look it up in the top-level
     config.
index 690d60f11851448162de5830ad317c81c15c4ffe..ad37108d01844e106af3bac29f7783bce0e12b46 100644 (file)
@@ -13,20 +13,21 @@ def task(ctx, config):
     """
     Sequentialize a group of tasks into one executable block
 
-    example:
-    - sequential:
-       - tasktest:
-       - tasktest:
-
-    You can also reference the job from elsewhere:
-
-    foo:
-      tasktest:
-    tasks:
-    - sequential:
-      - tasktest:
-      - foo
-      - tasktest:
+    example::
+
+        - sequential:
+           - tasktest:
+           - tasktest:
+
+    You can also reference the job from elsewhere::
+
+        foo:
+          tasktest:
+        tasks:
+        - sequential:
+          - tasktest:
+          - foo
+          - tasktest:
 
     That is, if the entry is not a dict, we will look it up in the top-level
     config.
index 74a12c2f8f7ebd9eb0a1ffe438f55c8e2a9fd8d3..40926c569c4bd04717590bec85dddfd93bff5358 100644 (file)
@@ -15,16 +15,16 @@ def task(ctx, config):
     destroyed/cleaned up.  This task was used to test parallel and
     sequential task options.
 
-    example:
+    example::
 
-    tasks:
-    - sequential:
+        tasks:
+        - sequential:
+            - tasktest:
+                - id: 'foo'
+            - tasktest:
+                - id: 'bar'
+                - delay:5
         - tasktest:
-            - id: 'foo'
-        - tasktest:
-            - id: 'bar'
-            - delay:5
-    - tasktest:
 
     The above yaml will sequentially start a test task named foo and a test
     task named bar.  Bar will take 5 seconds to complete.  After foo and bar
index 8769710b105e5af725c904dfc7c4d786434976c7..136ae049bc6943d481d079f83b4fd7805fd56e07 100644 (file)
@@ -5,10 +5,10 @@ the current directory.  Each test that is discovered will be passed the
 teuthology ctx and config args that each teuthology task usually gets.
 This allows the tests to operate against the cluster.
 
-An example:
+An example::
 
-tasks
-  - tests:
+    tasks
+      - tests:
 
 """
 import logging
index d47830f44e53106ff45d63463590754e93259eec..2abf188275f45de3f8993c83729cef736dea0b9f 100644 (file)
@@ -15,13 +15,13 @@ def task(ctx, config):
     Measure the time that this set of tasks takes and save that value in the summary file.
     Config is a description of what we are timing.
 
-    example:
+    example::
 
-    tasks:
-    - ceph:
-    - foo:
-    - timer: "fsx run"
-    - fsx:
+        tasks:
+        - ceph:
+        - foo:
+        - timer: "fsx run"
+        - fsx:
 
     """
     start = datetime.datetime.now()