Merge "Change Examples from headings to topics"

This commit is contained in:
Jenkins 2016-09-05 18:55:01 +00:00 committed by Gerrit Code Review
commit 0feb83a00c

View File

@ -371,11 +371,10 @@ operation was not successful, and will include the keys below:
'error_timestamp': <timestamp> 'error_timestamp': <timestamp>
} }
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``stat`` to retrieve the headers for a The code below demonstrates the use of ``stat`` to retrieve the headers for
given list of objects in a container using 20 threads. The code creates a a given list of objects in a container using 20 threads. The code creates a
mapping from object name to headers which is then pretty printed to the log. mapping from object name to headers which is then pretty printed to the log.
.. literalinclude:: ../../examples/stat.py .. literalinclude:: ../../examples/stat.py
@ -438,8 +437,7 @@ dictionary as described below:
'error_timestamp': <timestamp> 'error_timestamp': <timestamp>
} }
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``list`` to list all items in a The code below demonstrates the use of ``list`` to list all items in a
container that are over 10MiB in size: container that are over 10MiB in size:
@ -484,11 +482,10 @@ described below:
that each time user metadata is updated, the complete set of desired that each time user metadata is updated, the complete set of desired
key-value pairs must be specified. key-value pairs must be specified.
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``post`` to set an archive folder in a The code below demonstrates the use of ``post`` to set an archive folder in
given container to expire after a 24 hour delay: a given container to expire after a 24 hour delay:
.. literalinclude:: ../../examples/post.py .. literalinclude:: ../../examples/post.py
:language: python :language: python
@ -552,11 +549,10 @@ below:
'response_dict': <HTTP response details> 'response_dict': <HTTP response details>
} }
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``download`` to download all PNG images The code below demonstrates the use of ``download`` to download all PNG
from a dated archive folder in a given container: images from a dated archive folder in a given container:
.. literalinclude:: ../../examples/download.py .. literalinclude:: ../../examples/download.py
:language: python :language: python
@ -646,8 +642,7 @@ below:
'attempts': <attempt count> 'attempts': <attempt count>
} }
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``upload`` to upload all files and The code below demonstrates the use of ``upload`` to upload all files and
folders in a given directory, and rename each object by replacing the root folders in a given directory, and rename each object by replacing the root
@ -744,14 +739,13 @@ below:
'response_dict': <HTTP response details> 'response_dict': <HTTP response details>
} }
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``delete`` to remove a given list of The code below demonstrates the use of ``delete`` to remove a given list of
objects from a specified container. As the objects are deleted the transaction objects from a specified container. As the objects are deleted the
ID of the relevant request is printed along with the object name and number transaction ID of the relevant request is printed along with the object name
of attempts required. By printing the transaction ID, the printed operations and number of attempts required. By printing the transaction ID, the printed
can be easily linked to events in the swift server logs: operations can be easily linked to events in the swift server logs:
.. literalinclude:: ../../examples/delete.py .. literalinclude:: ../../examples/delete.py
:language: python :language: python
@ -810,8 +804,7 @@ below:
'error_timestamp': <timestamp> 'error_timestamp': <timestamp>
} }
Example .. topic:: Example
-------
The code below demonstrates the use of ``copy`` to add new user metadata for The code below demonstrates the use of ``copy`` to add new user metadata for
objects a and b, and to copy object c to d (with added metadata). objects a and b, and to copy object c to d (with added metadata).
@ -894,12 +887,11 @@ dictionary is given below:
} }
} }
Example .. topic:: Example
^^^^^^^
The code below demonstrates the use of ``capabilities`` to determine if the The code below demonstrates the use of ``capabilities`` to determine if the
Swift cluster supports static large objects, and if so, the maximum number of Swift cluster supports static large objects, and if so, the maximum number
segments that can be described in a single manifest file, along with the of segments that can be described in a single manifest file, along with the
size restrictions on those objects: size restrictions on those objects:
.. literalinclude:: ../../examples/capabilities.py .. literalinclude:: ../../examples/capabilities.py