diff --git a/doc/source/admin_guide.rst b/doc/source/admin_guide.rst
index c3f4a10788..d8175e25ce 100644
--- a/doc/source/admin_guide.rst
+++ b/doc/source/admin_guide.rst
@@ -324,14 +324,14 @@ In order to prevent rsync replication to specific drives, firstly
setup ``rsync_module`` per disk in your ``object-replicator``.
Set this in ``object-server.conf``:
-.. code::
+.. code:: cfg
[object-replicator]
rsync_module = {replication_ip}::object_{device}
Set the individual drives in ``rsync.conf``. For example:
-.. code::
+.. code:: cfg
[object_sda]
max connections = 4
@@ -387,7 +387,7 @@ monitoring solution to achieve this. The following is an example script:
For the above script to work, ensure ``/etc/rsync.d/`` conf files are
included, by specifying ``&include`` in your ``rsync.conf`` file:
-.. code::
+.. code:: cfg
&include /etc/rsync.d
@@ -395,7 +395,7 @@ Use this in conjunction with a cron job to periodically run the script, for exam
.. highlight:: none
-.. code::
+.. code:: cfg
# /etc/cron.d/devicecheck
* * * * * root /some/path/to/disable_rsync.py
diff --git a/doc/source/api/discoverability.rst b/doc/source/api/discoverability.rst
index 56912ca652..c086d16f7f 100644
--- a/doc/source/api/discoverability.rst
+++ b/doc/source/api/discoverability.rst
@@ -12,13 +12,13 @@ that does not support the ``/info`` request.
To use the ``/info`` request, send a **GET** request using the ``/info``
path to the Object Store endpoint as shown in this example:
-.. code::
+.. code:: console
# curl https://storage.clouddrive.com/info
This example shows a truncated response body:
-.. code::
+.. code:: console
{
"swift":{
diff --git a/doc/source/api/form_post_middleware.rst b/doc/source/api/form_post_middleware.rst
index 891607a329..97921d41e8 100644
--- a/doc/source/api/form_post_middleware.rst
+++ b/doc/source/api/form_post_middleware.rst
@@ -29,9 +29,8 @@ The format of the form **POST** request is:
**Example 1.14. Form POST format**
-.. code::
+.. code:: xml
-
@@ -44,7 +43,6 @@ The format of the form **POST** request is:
- ]]>
**action="SWIFT_URL"**
@@ -53,14 +51,14 @@ Set to full URL where the objects are to be uploaded. The names of
uploaded files are appended to the specified *SWIFT_URL*. So, you
can upload directly to the root of a container with a URL like:
-.. code::
+.. code:: none
https://swift-cluster.example.com/v1/my_account/container/
Optionally, you can include an object prefix to separate uploads, such
as:
-.. code::
+.. code:: none
https://swift-cluster.example.com/v1/my_account/container/OBJECT_PREFIX
@@ -123,7 +121,7 @@ follow the file attributes are ignored.
Optionally, if you want the uploaded files to be temporary you can set x-delete-at or x-delete-after attributes by adding one of these as a form input:
-.. code::
+.. code:: xml
@@ -169,7 +167,7 @@ The following example code generates a signature for use with form
**Example 1.15. HMAC-SHA1 signature for form POST**
-.. code::
+.. code:: python
import hmac
from hashlib import sha1
@@ -198,13 +196,13 @@ being uploaded is called ``flower.jpg``.
This example uses the **swift-form-signature** script to compute the
``expires`` and ``signature`` values.
-.. code::
+.. code:: console
$ bin/swift-form-signature /v1/my_account/container/photos/ https://example.com/done.html 5373952000 1 200 MYKEY
Expires: 1390825338
Signature: 35129416ebda2f1a21b3c2b8939850dfc63d8f43
-.. code::
+.. code:: console
$ curl -i https://swift-cluster.example.com/v1/my_account/container/photos/ -X POST \
-F max_file_size=5373952000 -F max_file_count=1 -F expires=1390825338 \
diff --git a/doc/source/api/large_objects.rst b/doc/source/api/large_objects.rst
index e417e7467d..f05f72ebd9 100644
--- a/doc/source/api/large_objects.rst
+++ b/doc/source/api/large_objects.rst
@@ -82,7 +82,7 @@ This example shows three segment objects. You can use several containers
and the object names do not have to conform to a specific pattern, in
contrast to dynamic large objects.
-.. code::
+.. code:: json
[
{
@@ -192,7 +192,7 @@ manifest is still available to download the first set of segments.
**Example Upload segment of large object request: HTTP**
-.. code::
+.. code:: none
PUT /{api_version}/{account}/{container}/{object} HTTP/1.1
Host: storage.clouddrive.com
@@ -214,7 +214,7 @@ uploading the manifest.
**Example Upload next segment of large object request: HTTP**
-.. code::
+.. code:: none
PUT /{api_version}/{account}/{container}/{object} HTTP/1.1
Host: storage.clouddrive.com
@@ -232,7 +232,7 @@ subsequent additional segments.
**Example Upload manifest request: HTTP**
-.. code::
+.. code:: none
PUT /{api_version}/{account}/{container}/{object} HTTP/1.1
Host: storage.clouddrive.com
@@ -244,7 +244,7 @@ subsequent additional segments.
**Example Upload manifest response: HTTP**
-.. code::
+.. code:: none
[...]
diff --git a/doc/source/api/object_api_v1_overview.rst b/doc/source/api/object_api_v1_overview.rst
index c44fcc9b29..37fa28e40f 100644
--- a/doc/source/api/object_api_v1_overview.rst
+++ b/doc/source/api/object_api_v1_overview.rst
@@ -97,14 +97,14 @@ interact with the Object Storage API.
Specifically, the resource path reflects this structure and has this
format:
-.. code::
+.. code:: none
/v1/{account}/{container}/{object}
For example, for the ``flowers/rose.jpg`` object in the ``images``
container in the ``12345678912345`` account, the resource path is:
-.. code::
+.. code:: none
/v1/12345678912345/images/flowers/rose.jpg
@@ -133,7 +133,7 @@ parameter ``reverse``, noting that your marker and end_markers should be
switched when applied to a reverse listing. I.e, for a list of objects
``[a, b, c, d, e]`` the non-reversed could be:
-.. code::
+.. code:: none
/v1/{account}/{container}/?marker=a&end_marker=d
b
@@ -141,7 +141,7 @@ switched when applied to a reverse listing. I.e, for a list of objects
However, when reversed marker and end_marker are applied to a reversed list:
-.. code::
+.. code:: none
/v1/{account}/{container}/?marker=d&end_marker=a&reverse=on
c
diff --git a/doc/source/api/object_versioning.rst b/doc/source/api/object_versioning.rst
index a676b73314..b3438a6e49 100644
--- a/doc/source/api/object_versioning.rst
+++ b/doc/source/api/object_versioning.rst
@@ -46,37 +46,37 @@ container, overwriting the current version.
Example Using ``X-Versions-Location``
-------------------------------------
-#. Create the ``current`` container:
+#. Create the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" -H "X-Versions-Location: archive"
+ # curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" -H "X-Versions-Location: archive"
- .. code::
+ .. code:: console
- HTTP/1.1 201 Created
- Content-Length: 0
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: txb91810fb717347d09eec8-0052e18997
- X-Openstack-Request-Id: txb91810fb717347d09eec8-0052e18997
- Date: Thu, 23 Jan 2014 21:28:55 GMT
+ HTTP/1.1 201 Created
+ Content-Length: 0
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: txb91810fb717347d09eec8-0052e18997
+ X-Openstack-Request-Id: txb91810fb717347d09eec8-0052e18997
+ Date: Thu, 23 Jan 2014 21:28:55 GMT
#. Create the first version of an object in the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/current/my_object --data-binary 1 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
+ # curl -i $publicURL/current/my_object --data-binary 1 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 201 Created
- Last-Modified: Thu, 23 Jan 2014 21:31:22 GMT
- Content-Length: 0
- Etag: d41d8cd98f00b204e9800998ecf8427e
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx5992d536a4bd4fec973aa-0052e18a2a
- X-Openstack-Request-Id: tx5992d536a4bd4fec973aa-0052e18a2a
- Date: Thu, 23 Jan 2014 21:31:22 GMT
+ HTTP/1.1 201 Created
+ Last-Modified: Thu, 23 Jan 2014 21:31:22 GMT
+ Content-Length: 0
+ Etag: d41d8cd98f00b204e9800998ecf8427e
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx5992d536a4bd4fec973aa-0052e18a2a
+ X-Openstack-Request-Id: tx5992d536a4bd4fec973aa-0052e18a2a
+ Date: Thu, 23 Jan 2014 21:31:22 GMT
Nothing is written to the non-current version container when you
initially **PUT** an object in the ``current`` container. However,
@@ -85,9 +85,9 @@ Example Using ``X-Versions-Location``
These non-current versions are named as follows:
- .. code::
+ .. code:: none
- /
+ /
Where ``length`` is the 3-character, zero-padded hexadecimal
character length of the object, ```` is the object name,
@@ -96,20 +96,20 @@ Example Using ``X-Versions-Location``
#. Create a second version of the object in the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/current/my_object --data-binary 2 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
+ # curl -i $publicURL/current/my_object --data-binary 2 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 201 Created
- Last-Modified: Thu, 23 Jan 2014 21:41:32 GMT
- Content-Length: 0
- Etag: d41d8cd98f00b204e9800998ecf8427e
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx468287ce4fc94eada96ec-0052e18c8c
- X-Openstack-Request-Id: tx468287ce4fc94eada96ec-0052e18c8c
- Date: Thu, 23 Jan 2014 21:41:32 GMT
+ HTTP/1.1 201 Created
+ Last-Modified: Thu, 23 Jan 2014 21:41:32 GMT
+ Content-Length: 0
+ Etag: d41d8cd98f00b204e9800998ecf8427e
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx468287ce4fc94eada96ec-0052e18c8c
+ X-Openstack-Request-Id: tx468287ce4fc94eada96ec-0052e18c8c
+ Date: Thu, 23 Jan 2014 21:41:32 GMT
#. Issue a **GET** request to a versioned object to get the current
version of the object. You do not have to do any request redirects or
@@ -117,24 +117,24 @@ Example Using ``X-Versions-Location``
List older versions of the object in the ``archive`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
+ # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 200 OK
- Content-Length: 30
- X-Container-Object-Count: 1
- Accept-Ranges: bytes
- X-Timestamp: 1390513280.79684
- X-Container-Bytes-Used: 0
- Content-Type: text/plain; charset=utf-8
- X-Trans-Id: tx9a441884997542d3a5868-0052e18d8e
- X-Openstack-Request-Id: tx9a441884997542d3a5868-0052e18d8e
- Date: Thu, 23 Jan 2014 21:45:50 GMT
+ HTTP/1.1 200 OK
+ Content-Length: 30
+ X-Container-Object-Count: 1
+ Accept-Ranges: bytes
+ X-Timestamp: 1390513280.79684
+ X-Container-Bytes-Used: 0
+ Content-Type: text/plain; charset=utf-8
+ X-Trans-Id: tx9a441884997542d3a5868-0052e18d8e
+ X-Openstack-Request-Id: tx9a441884997542d3a5868-0052e18d8e
+ Date: Thu, 23 Jan 2014 21:45:50 GMT
- 009my_object/1390512682.92052
+ 009my_object/1390512682.92052
.. note::
A **POST** request to a versioned object updates only the metadata
@@ -145,38 +145,38 @@ Example Using ``X-Versions-Location``
current version of the object and replace it with the next-most
current version in the non-current container.
- .. code::
+ .. code:: console
- # curl -i $publicURL/current/my_object -X DELETE -H "X-Auth-Token: $token"
+ # curl -i $publicURL/current/my_object -X DELETE -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 204 No Content
- Content-Length: 0
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx006d944e02494e229b8ee-0052e18edd
- X-Openstack-Request-Id: tx006d944e02494e229b8ee-0052e18edd
- Date: Thu, 23 Jan 2014 21:51:25 GMT
+ HTTP/1.1 204 No Content
+ Content-Length: 0
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx006d944e02494e229b8ee-0052e18edd
+ X-Openstack-Request-Id: tx006d944e02494e229b8ee-0052e18edd
+ Date: Thu, 23 Jan 2014 21:51:25 GMT
List objects in the ``archive`` container to show that the archived
object was moved back to the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
+ # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 204 No Content
- Content-Length: 0
- X-Container-Object-Count: 0
- Accept-Ranges: bytes
- X-Timestamp: 1390513280.79684
- X-Container-Bytes-Used: 0
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx044f2a05f56f4997af737-0052e18eed
- X-Openstack-Request-Id: tx044f2a05f56f4997af737-0052e18eed
- Date: Thu, 23 Jan 2014 21:51:41 GMT
+ HTTP/1.1 204 No Content
+ Content-Length: 0
+ X-Container-Object-Count: 0
+ Accept-Ranges: bytes
+ X-Timestamp: 1390513280.79684
+ X-Container-Bytes-Used: 0
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx044f2a05f56f4997af737-0052e18eed
+ X-Openstack-Request-Id: tx044f2a05f56f4997af737-0052e18eed
+ Date: Thu, 23 Jan 2014 21:51:41 GMT
This next-most current version carries with it any metadata last set
on it. If want to completely remove an object and you have five
@@ -185,37 +185,37 @@ Example Using ``X-Versions-Location``
Example Using ``X-History-Location``
------------------------------------
-#. Create the ``current`` container:
+#. Create the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" -H "X-History-Location: archive"
+ # curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" -H "X-History-Location: archive"
- .. code::
+ .. code:: console
- HTTP/1.1 201 Created
- Content-Length: 0
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: txb91810fb717347d09eec8-0052e18997
- X-Openstack-Request-Id: txb91810fb717347d09eec8-0052e18997
- Date: Thu, 23 Jan 2014 21:28:55 GMT
+ HTTP/1.1 201 Created
+ Content-Length: 0
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: txb91810fb717347d09eec8-0052e18997
+ X-Openstack-Request-Id: txb91810fb717347d09eec8-0052e18997
+ Date: Thu, 23 Jan 2014 21:28:55 GMT
#. Create the first version of an object in the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/current/my_object --data-binary 1 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
+ # curl -i $publicURL/current/my_object --data-binary 1 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 201 Created
- Last-Modified: Thu, 23 Jan 2014 21:31:22 GMT
- Content-Length: 0
- Etag: d41d8cd98f00b204e9800998ecf8427e
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx5992d536a4bd4fec973aa-0052e18a2a
- X-Openstack-Request-Id: tx5992d536a4bd4fec973aa-0052e18a2a
- Date: Thu, 23 Jan 2014 21:31:22 GMT
+ HTTP/1.1 201 Created
+ Last-Modified: Thu, 23 Jan 2014 21:31:22 GMT
+ Content-Length: 0
+ Etag: d41d8cd98f00b204e9800998ecf8427e
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx5992d536a4bd4fec973aa-0052e18a2a
+ X-Openstack-Request-Id: tx5992d536a4bd4fec973aa-0052e18a2a
+ Date: Thu, 23 Jan 2014 21:31:22 GMT
Nothing is written to the non-current version container when you
initially **PUT** an object in the ``current`` container. However,
@@ -224,9 +224,9 @@ Example Using ``X-History-Location``
These non-current versions are named as follows:
- .. code::
+ .. code:: none
- /
+ /
Where ``length`` is the 3-character, zero-padded hexadecimal
character length of the object, ```` is the object name,
@@ -235,20 +235,20 @@ Example Using ``X-History-Location``
#. Create a second version of the object in the ``current`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/current/my_object --data-binary 2 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
+ # curl -i $publicURL/current/my_object --data-binary 2 -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 201 Created
- Last-Modified: Thu, 23 Jan 2014 21:41:32 GMT
- Content-Length: 0
- Etag: d41d8cd98f00b204e9800998ecf8427e
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx468287ce4fc94eada96ec-0052e18c8c
- X-Openstack-Request-Id: tx468287ce4fc94eada96ec-0052e18c8c
- Date: Thu, 23 Jan 2014 21:41:32 GMT
+ HTTP/1.1 201 Created
+ Last-Modified: Thu, 23 Jan 2014 21:41:32 GMT
+ Content-Length: 0
+ Etag: d41d8cd98f00b204e9800998ecf8427e
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx468287ce4fc94eada96ec-0052e18c8c
+ X-Openstack-Request-Id: tx468287ce4fc94eada96ec-0052e18c8c
+ Date: Thu, 23 Jan 2014 21:41:32 GMT
#. Issue a **GET** request to a versioned object to get the current
version of the object. You do not have to do any request redirects or
@@ -256,24 +256,24 @@ Example Using ``X-History-Location``
List older versions of the object in the ``archive`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
+ # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 200 OK
- Content-Length: 30
- X-Container-Object-Count: 1
- Accept-Ranges: bytes
- X-Timestamp: 1390513280.79684
- X-Container-Bytes-Used: 0
- Content-Type: text/plain; charset=utf-8
- X-Trans-Id: tx9a441884997542d3a5868-0052e18d8e
- X-Openstack-Request-Id: tx9a441884997542d3a5868-0052e18d8e
- Date: Thu, 23 Jan 2014 21:45:50 GMT
+ HTTP/1.1 200 OK
+ Content-Length: 30
+ X-Container-Object-Count: 1
+ Accept-Ranges: bytes
+ X-Timestamp: 1390513280.79684
+ X-Container-Bytes-Used: 0
+ Content-Type: text/plain; charset=utf-8
+ X-Trans-Id: tx9a441884997542d3a5868-0052e18d8e
+ X-Openstack-Request-Id: tx9a441884997542d3a5868-0052e18d8e
+ Date: Thu, 23 Jan 2014 21:45:50 GMT
- 009my_object/1390512682.92052
+ 009my_object/1390512682.92052
.. note::
A **POST** request to a versioned object updates only the metadata
@@ -285,41 +285,41 @@ Example Using ``X-History-Location``
the current container. Subsequent **GET** requests to the object in the
current container will return ``404 Not Found``.
- .. code::
+ .. code:: console
- # curl -i $publicURL/current/my_object -X DELETE -H "X-Auth-Token: $token"
+ # curl -i $publicURL/current/my_object -X DELETE -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 204 No Content
- Content-Length: 0
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx006d944e02494e229b8ee-0052e18edd
- X-Openstack-Request-Id: tx006d944e02494e229b8ee-0052e18edd
- Date: Thu, 23 Jan 2014 21:51:25 GMT
+ HTTP/1.1 204 No Content
+ Content-Length: 0
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx006d944e02494e229b8ee-0052e18edd
+ X-Openstack-Request-Id: tx006d944e02494e229b8ee-0052e18edd
+ Date: Thu, 23 Jan 2014 21:51:25 GMT
- List older versions of the object in the ``archive`` container::
+ List older versions of the object in the ``archive`` container:
- .. code::
+ .. code:: console
- # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
+ # curl -i $publicURL/archive?prefix=009my_object -X GET -H "X-Auth-Token: $token"
- .. code::
+ .. code:: console
- HTTP/1.1 200 OK
- Content-Length: 90
- X-Container-Object-Count: 3
- Accept-Ranges: bytes
- X-Timestamp: 1390513280.79684
- X-Container-Bytes-Used: 0
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: tx044f2a05f56f4997af737-0052e18eed
- X-Openstack-Request-Id: tx044f2a05f56f4997af737-0052e18eed
- Date: Thu, 23 Jan 2014 21:51:41 GMT
+ HTTP/1.1 200 OK
+ Content-Length: 90
+ X-Container-Object-Count: 3
+ Accept-Ranges: bytes
+ X-Timestamp: 1390513280.79684
+ X-Container-Bytes-Used: 0
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: tx044f2a05f56f4997af737-0052e18eed
+ X-Openstack-Request-Id: tx044f2a05f56f4997af737-0052e18eed
+ Date: Thu, 23 Jan 2014 21:51:41 GMT
- 009my_object/1390512682.92052
- 009my_object/1390512692.23062
- 009my_object/1390513885.67732
+ 009my_object/1390512682.92052
+ 009my_object/1390512692.23062
+ 009my_object/1390513885.67732
In addition to the two previous versions of the object, the archive
container has a "delete marker" to record when the object was deleted.
@@ -334,18 +334,18 @@ To disable object versioning for the ``current`` container, remove
its ``X-Versions-Location`` metadata header by sending an empty key
value.
-.. code::
+.. code:: console
- # curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" -H "X-Versions-Location: "
+ # curl -i $publicURL/current -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" -H "X-Versions-Location: "
-.. code::
+.. code:: console
- HTTP/1.1 202 Accepted
- Content-Length: 76
- Content-Type: text/html; charset=UTF-8
- X-Trans-Id: txe2476de217134549996d0-0052e19038
- X-Openstack-Request-Id: txe2476de217134549996d0-0052e19038
- Date: Thu, 23 Jan 2014 21:57:12 GMT
+ HTTP/1.1 202 Accepted
+ Content-Length: 76
+ Content-Type: text/html; charset=UTF-8
+ X-Trans-Id: txe2476de217134549996d0-0052e19038
+ X-Openstack-Request-Id: txe2476de217134549996d0-0052e19038
+ Date: Thu, 23 Jan 2014 21:57:12 GMT
-
Accepted
The request is accepted for processing.
+
Accepted
The request is accepted for processing.
diff --git a/doc/source/api/pseudo-hierarchical-folders-directories.rst b/doc/source/api/pseudo-hierarchical-folders-directories.rst
index a46acd576d..c7e764f2db 100644
--- a/doc/source/api/pseudo-hierarchical-folders-directories.rst
+++ b/doc/source/api/pseudo-hierarchical-folders-directories.rst
@@ -34,14 +34,14 @@ the requested list of the objects.
.. code-block:: console
- photos/animals/cats/persian.jpg
- photos/animals/cats/siamese.jpg
- photos/animals/dogs/corgi.jpg
- photos/animals/dogs/poodle.jpg
- photos/animals/dogs/terrier.jpg
- photos/me.jpg
- photos/plants/fern.jpg
- photos/plants/rose.jpg
+ photos/animals/cats/persian.jpg
+ photos/animals/cats/siamese.jpg
+ photos/animals/dogs/corgi.jpg
+ photos/animals/dogs/poodle.jpg
+ photos/animals/dogs/terrier.jpg
+ photos/me.jpg
+ photos/plants/fern.jpg
+ photos/plants/rose.jpg
Use the delimiter parameter to limit the displayed results. To use
``delimiter`` with pseudo-directories, you must use the parameter slash
@@ -63,20 +63,20 @@ For example:
.. code-block:: JSON
- [
- {
- "subdir": "photos/"
- }
- ]
+ [
+ {
+ "subdir": "photos/"
+ }
+ ]
.. code-block:: XML
-
-
-
- photos/
-
-
+
+
+
+ photos/
+
+
Use the ``prefix`` and ``delimiter`` parameters to view the objects
inside a pseudo-directory, including further nested pseudo-directories.
@@ -92,46 +92,46 @@ pseudo-directory.
.. code-block:: console
- photos/animals/
- photos/me.jpg
- photos/plants/
+ photos/animals/
+ photos/me.jpg
+ photos/plants/
.. code-block:: JSON
- [
- {
- "subdir": "photos/animals/"
- },
- {
- "hash": "b249a153f8f38b51e92916bbc6ea57ad",
- "last_modified": "2015-12-03T17:31:28.187370",
- "bytes": 2906,
- "name": "photos/me.jpg",
- "content_type": "image/jpeg"
- },
- {
- "subdir": "photos/plants/"
- }
- ]
+ [
+ {
+ "subdir": "photos/animals/"
+ },
+ {
+ "hash": "b249a153f8f38b51e92916bbc6ea57ad",
+ "last_modified": "2015-12-03T17:31:28.187370",
+ "bytes": 2906,
+ "name": "photos/me.jpg",
+ "content_type": "image/jpeg"
+ },
+ {
+ "subdir": "photos/plants/"
+ }
+ ]
.. code-block:: XML
-
-
-
- photos/animals/
-
-
-
- photos/plants/
-
-
+
+
+
+ photos/animals/
+
+
+
+ photos/plants/
+
+
You can create an unlimited number of nested pseudo-directories. To
navigate through them, use a longer ``prefix`` parameter coupled with
@@ -150,6 +150,6 @@ the objects and pseudo-directories within the nested pseudo-directory.
.. code-block:: console
- photos/animals/dogs/corgi.jpg
- photos/animals/dogs/poodle.jpg
- photos/animals/dogs/terrier.jpg
+ photos/animals/dogs/corgi.jpg
+ photos/animals/dogs/poodle.jpg
+ photos/animals/dogs/terrier.jpg
diff --git a/doc/source/api/serialized-response-formats.rst b/doc/source/api/serialized-response-formats.rst
index b0bc7d728e..8e60c7fcf6 100644
--- a/doc/source/api/serialized-response-formats.rst
+++ b/doc/source/api/serialized-response-formats.rst
@@ -56,18 +56,18 @@ format:
.. code-block:: json
- [
- {
- "count":0,
- "bytes":0,
- "name":"janeausten"
- },
- {
- "count":1,
- "bytes":14,
- "name":"marktwain"
- }
- ]
+ [
+ {
+ "count":0,
+ "bytes":0,
+ "name":"janeausten"
+ },
+ {
+ "count":1,
+ "bytes":14,
+ "name":"marktwain"
+ }
+ ]
Example 2. XML example with Accept header
@@ -100,19 +100,19 @@ format:
.. code-block:: xml
-
-
-
- janeausten
- 2
- 33
-
-
- marktwain
- 1
- 14
-
-
+
+
+
+ janeausten
+ 2
+ 33
+
+
+ marktwain
+ 1
+ 14
+
+
The remainder of the examples in this guide use standard, non-serialized
responses. However, all ``GET`` requests that perform list operations
diff --git a/doc/source/api/temporary_url_middleware.rst b/doc/source/api/temporary_url_middleware.rst
index 7dea043ff5..767b4722aa 100644
--- a/doc/source/api/temporary_url_middleware.rst
+++ b/doc/source/api/temporary_url_middleware.rst
@@ -21,11 +21,10 @@ a common prefix. They are useful for sharing a set of objects.
Ask your cloud administrator to enable the temporary URL feature. For
information, see :ref:`tempurl` in the *Source Documentation*.
-Note
-~~~~
+.. note::
-To use **POST** requests to upload objects to specific Object Storage
-locations, use :doc:`form_post_middleware` instead of temporary URL middleware.
+ To use **POST** requests to upload objects to specific Object Storage
+ locations, use :doc:`form_post_middleware` instead of temporary URL middleware.
Temporary URL format
~~~~~~~~~~~~~~~~~~~~
@@ -35,12 +34,12 @@ parameters:
**Example Temporary URL format**
-.. code::
+.. code:: none
- https://swift-cluster.example.com/v1/my_account/container/object
- ?temp_url_sig=732fcac368abb10c78a4cbe95c3fab7f311584532bf779abd5074e13cbe8b88b
- &temp_url_expires=1323479485
- &filename=My+Test+File.pdf
+ https://swift-cluster.example.com/v1/my_account/container/object
+ ?temp_url_sig=732fcac368abb10c78a4cbe95c3fab7f311584532bf779abd5074e13cbe8b88b
+ &temp_url_expires=1323479485
+ &filename=My+Test+File.pdf
The example shows these elements:
@@ -71,12 +70,12 @@ A prefix-based temporary URL is similar but requires the parameter
``temp_url_prefix``, which must be equal to the common prefix shared
by all object names for which the URL is valid.
-.. code::
+.. code:: none
- https://swift-cluster.example.com/v1/my_account/container/my_prefix/object
- ?temp_url_sig=732fcac368abb10c78a4cbe95c3fab7f311584532bf779abd5074e13cbe8b88b
- &temp_url_expires=2011-12-10T01:11:25Z
- &temp_url_prefix=my_prefix
+ https://swift-cluster.example.com/v1/my_account/container/my_prefix/object
+ ?temp_url_sig=732fcac368abb10c78a4cbe95c3fab7f311584532bf779abd5074e13cbe8b88b
+ &temp_url_expires=2011-12-10T01:11:25Z
+ &temp_url_prefix=my_prefix
.. _secret_keys:
@@ -109,15 +108,14 @@ The arbitrary values serve as the secret keys.
For example, use the **swift post** command to set the secret key to
*``MYKEY``*:
-.. code::
+.. code:: console
- $ swift post -m "Temp-URL-Key:MYKEY"
+ $ swift post -m "Temp-URL-Key:MYKEY"
-Note
-~~~~
+.. note::
-Changing these headers invalidates any previously generated temporary
-URLs within 60 seconds, which is the memcache time for the key.
+ Changing these headers invalidates any previously generated temporary
+ URLs within 60 seconds, which is the memcache time for the key.
HMAC signature for temporary URLs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -145,33 +143,33 @@ temporary URLs:
**Example HMAC-SHA256 signature for object-based temporary URLs**
-.. code::
+.. code:: python
- import hmac
- from hashlib import sha256
- from time import time
- method = 'GET'
- duration_in_seconds = 60*60*24
- expires = int(time() + duration_in_seconds)
- path = '/v1/my_account/container/object'
- key = 'MYKEY'
- hmac_body = '%s\n%s\n%s' % (method, expires, path)
- signature = hmac.new(key, hmac_body, sha256).hexdigest()
+ import hmac
+ from hashlib import sha256
+ from time import time
+ method = 'GET'
+ duration_in_seconds = 60*60*24
+ expires = int(time() + duration_in_seconds)
+ path = '/v1/my_account/container/object'
+ key = 'MYKEY'
+ hmac_body = '%s\n%s\n%s' % (method, expires, path)
+ signature = hmac.new(key, hmac_body, sha256).hexdigest()
**Example HMAC-SHA512 signature for prefix-based temporary URLs**
-.. code::
+.. code:: python
- import hmac
- from hashlib import sha512
- from time import time
- method = 'GET'
- duration_in_seconds = 60*60*24
- expires = int(time() + duration_in_seconds)
- path = 'prefix:/v1/my_account/container/my_prefix'
- key = 'MYKEY'
- hmac_body = '%s\n%s\n%s' % (method, expires, path)
- signature = hmac.new(key, hmac_body, sha512).hexdigest()
+ import hmac
+ from hashlib import sha512
+ from time import time
+ method = 'GET'
+ duration_in_seconds = 60*60*24
+ expires = int(time() + duration_in_seconds)
+ path = 'prefix:/v1/my_account/container/my_prefix'
+ key = 'MYKEY'
+ hmac_body = '%s\n%s\n%s' % (method, expires, path)
+ signature = hmac.new(key, hmac_body, sha512).hexdigest()
Do not URL-encode the path when you generate the HMAC signature.
However, when you make the actual HTTP request, you should properly
@@ -186,10 +184,10 @@ Authentication `__.
If you want to transform a UNIX timestamp into an ISO 8601 UTC timestamp,
you can use following code snippet:
-.. code::
+.. code:: python
- import time
- time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(timestamp))
+ import time
+ time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(timestamp))
Using the ``swift`` tool to generate a Temporary URL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -198,32 +196,32 @@ The ``swift`` tool provides the tempurl_ option that
auto-generates the *``temp_url_sig``* and *``temp_url_expires``* query
parameters. For example, you might run this command:
-.. code::
+.. code:: console
- $ swift tempurl GET 3600 /v1/my_account/container/object MYKEY
+ $ swift tempurl GET 3600 /v1/my_account/container/object MYKEY
.. note::
- The ``swift`` tool is not yet updated and continues to use the
- deprecated cipher SHA1.
+ The ``swift`` tool is not yet updated and continues to use the
+ deprecated cipher SHA1.
This command returns the path:
-.. code::
+.. code:: none
- /v1/my_account/container/object
- ?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91
- &temp_url_expires=1374497657
+ /v1/my_account/container/object
+ ?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91
+ &temp_url_expires=1374497657
To create the temporary URL, prefix this path with the Object Storage
storage host name. For example, prefix the path with
``https://swift-cluster.example.com``, as follows:
-.. code::
+.. code:: none
- https://swift-cluster.example.com/v1/my_account/container/object
- ?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91
- &temp_url_expires=1374497657
+ https://swift-cluster.example.com/v1/my_account/container/object
+ ?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91
+ &temp_url_expires=1374497657
Note that if the above example is copied exactly, and used in a command
shell, then the ampersand is interpreted as an operator and the URL
diff --git a/doc/source/api/use_content-encoding_metadata.rst b/doc/source/api/use_content-encoding_metadata.rst
index 69b3314723..18c94878e6 100644
--- a/doc/source/api/use_content-encoding_metadata.rst
+++ b/doc/source/api/use_content-encoding_metadata.rst
@@ -12,11 +12,11 @@ underlying media type (``Content-Type``) of the file, such as a video.
This example assigns an attachment type to the ``Content-Encoding``
header that indicates how the file is downloaded:
-.. code::
+.. code:: none
- PUT ////