Skip to content

Commit d445906

Browse files
author
Jamie Hannaford
committed
add refdoc links for swift
1 parent 2aba9d1 commit d445906

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

doc/services/object-store/v1/account.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ Show account details
77
To work with an Object Store account, you must first retrieve an account object like so:
88

99
.. sample:: object_store/v1/account/get.php
10+
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_getAccount
1011

1112
Get account metadata
1213
--------------------
1314

1415
.. sample:: object_store/v1/account/get_metadata.php
16+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_getMetadata
1517

1618
Replace all metadata with new values
1719
------------------------------------
@@ -42,6 +44,7 @@ the metadata of the account will now be:
4244
To merge metadata, you must run:
4345

4446
.. sample:: object_store/v1/account/reset_metadata.php
47+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_resetMetadata
4548

4649
Merge new metadata values with existing
4750
---------------------------------------
@@ -72,4 +75,5 @@ the metadata of the account will now be:
7275

7376
To reset metadata, you must run:
7477

75-
.. sample:: object_store/v1/account/merge_metadata.php
78+
.. sample:: object_store/v1/account/merge_metadata.php
79+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_mergeMetadata

doc/services/object-store/v1/containers.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Show details for a container
55
----------------------------
66

77
.. sample:: object_store/v1/containers/get.php
8+
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_getContainer
89

910
At this point, the object returned is *empty* because we did not execute a HTTP request to receive the state of the
1011
container from the API. This is in accordance with one of the SDK's general policies of not assuming too much at the
@@ -25,6 +26,7 @@ List containers
2526
---------------
2627

2728
.. sample:: object_store/v1/containers/list.php
29+
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_listContainers
2830

2931
When listing containers, you must be aware that not *all* information about a container is returned in a collection.
3032
Very often only the object count, bytes used and container name will be exposed. If you would like to
@@ -39,10 +41,13 @@ access all of the remote state of a collection item, you can call ``retrieve`` l
3941
If you have a large collection of containers, this will slow things down because you're issuing a HEAD request per
4042
container.
4143

44+
.. include:: /common/generators.rst
45+
4246
Delete container
4347
----------------
4448

4549
.. sample:: object_store/v1/containers/delete.php
50+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_delete
4651

4752
The API will only accept DELETE requests on containers when they are empty. If you have a container with any objects
4853
inside, the operation will fail.
@@ -51,6 +56,7 @@ Get metadata
5156
------------
5257

5358
.. sample:: object_store/v1/containers/get_metadata.php
59+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_getMetadata
5460

5561
The returned value will be a standard associative array, or hash, containing arbitrary key/value pairs. These will
5662
correspond to the values set either when the container was created, or when a previous ``mergeMetadata`` or
@@ -60,6 +66,7 @@ Replace all metadata with new values
6066
------------------------------------
6167

6268
.. sample:: object_store/v1/containers/reset_metadata.php
69+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_resetMetadata
6370

6471
In order to replace all existing metadata with a set of new values, you can use this operation. Any existing metadata
6572
items which not specified in the new set will be removed. For example, say an account has the following metadata
@@ -89,6 +96,7 @@ Merge new metadata values with existing
8996
---------------------------------------
9097

9198
.. sample:: object_store/v1/containers/merge_metadata.php
99+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_mergeMetadata
92100

93101
In order to merge a set of new metadata values with the existing metadata set, you can use this operation. Any existing
94102
metadata items which are not specified in the new set will be preserved. For example, say an account has the following

doc/services/object-store/v1/objects.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Show details for an object
55
--------------------------
66

77
.. sample:: object_store/v1/objects/get.php
8+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_getObject
89

910
At this point, the object returned is *empty* because we did not execute a HTTP request to receive the state of the
1011
container from the API. This is in accordance with one of the SDK's general policies of not assuming too much at the
@@ -26,6 +27,7 @@ Download an object
2627
------------------
2728

2829
.. sample:: object_store/v1/objects/download.php
30+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Object.html#method_download
2931

3032
As you will notice, a Stream_ object is returned by this call. For more information about dealing with streams, please
3133
consult `Guzzle's docs`_.
@@ -37,6 +39,7 @@ List objects
3739
------------
3840

3941
.. sample:: object_store/v1/objects/list.php
42+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_listObjects
4043

4144
When listing objects, you must be aware that not *all* information about a container is returned in a collection.
4245
Very often only the MD5 hash, last modified date, bytes used, content type and object name will be
@@ -51,12 +54,15 @@ returned. If you would like to access all of the remote state of a collection it
5154
5255
If you have a large collection of $object, this will slow things down because you're issuing a HEAD request per object.
5356

57+
.. include:: /common/generators.rst
58+
5459
Create an object
5560
----------------
5661

5762
When creating an object, you can upload its content according to a string representation:
5863

5964
.. sample:: object_store/v1/objects/create.php
65+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_createObject
6066

6167
If that is not optimal or convenient, you can use a stream instead. Any instance of ``\Psr\Http\Message\StreamInterface``
6268
is acceptable. For example, to use a normal Guzzle stream:
@@ -76,21 +82,25 @@ uploading, this is what happens under the hood:
7682
To upload a DLO, you need to call:
7783

7884
.. sample:: object_store/v1/objects/create_large_object.php
85+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_createLargeObject
7986

8087
Copy object
8188
-----------
8289

8390
.. sample:: object_store/v1/objects/copy.php
91+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Object.html#method_copy
8492

8593
Delete object
8694
-------------
8795

8896
.. sample:: object_store/v1/objects/delete.php
97+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Object.html#method_delete
8998

9099
Get metadata
91100
------------
92101

93102
.. sample:: object_store/v1/objects/get_metadata.php
103+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Object.html#method_getMetadata
94104

95105
The returned value will be a standard associative array, or hash, containing arbitrary key/value pairs. These will
96106
correspond to the values set either when the object was created, or when a previous ``mergeMetadata`` or
@@ -100,6 +110,7 @@ Replace all metadata with new values
100110
------------------------------------
101111

102112
.. sample:: object_store/v1/objects/reset_metadata.php
113+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Object.html#method_resetMetadata
103114

104115
In order to replace all existing metadata with a set of new values, you can use this operation. Any existing metadata
105116
items which not specified in the new set will be removed. For example, say an account has the following metadata
@@ -129,6 +140,7 @@ Merge new metadata values with existing
129140
---------------------------------------
130141

131142
.. sample:: object_store/v1/objects/merge_metadata.php
143+
.. refdoc:: OpenStack/ObjectStore/v1/Models/Object.html#method_mergeMetadata
132144

133145
In order to merge a set of new metadata values with the existing metadata set, you can use this operation. Any existing
134146
metadata items which are not specified in the new set will be preserved. For example, say an account has the following

0 commit comments

Comments
 (0)