From 22ab1b62b311f238e91c48253b2c8fa9ad9fa328 Mon Sep 17 00:00:00 2001 From: chenxing Date: Fri, 15 Dec 2017 15:23:09 +0800 Subject: [PATCH] Fix the incorrect description and sample This patch fixes the following: * The description says, "Here, a subset of metadata items are presented within the image." This is a server sample, not an image. * The sample itself has the wrong id in the "self" link and there are no metadata_links with a server object (probably a carry over from an image docs sample). Change-Id: Idb1e5243d6d072e020e1532bec603e5cd219702e Closes-Bug: #1737854 --- api-guide/source/paginated_collections.rst | 35 ++-------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/api-guide/source/paginated_collections.rst b/api-guide/source/paginated_collections.rst index f1945ee9e591..52203ecdcb0d 100644 --- a/api-guide/source/paginated_collections.rst +++ b/api-guide/source/paginated_collections.rst @@ -23,7 +23,7 @@ For convenience, collections should contain atom ``next`` links. They may optionally also contain ``previous`` links but the current implementation does not contain ``previous`` links. The last page in the list does not contain a link to "next" page. The following examples -illustrate three pages in a collection of images. The first page was +illustrate three pages in a collection of servers. The first page was retrieved through a **GET** to ``http://servers.api.openstack.org/v2.1/servers?limit=1``. In these examples, the *``limit``* parameter sets the page size to a single item. @@ -70,35 +70,4 @@ in an array with the name of the entity an underscore (\_) and ``links``. The combination of the objects and arrays that start with the name of the collection and an underscore represent the collection in JSON. The approach allows for extensibility of paginated collections by -allowing them to be associated with arbitrary properties. It also allows -collections to be embedded in other objects as illustrated below. Here, -a subset of metadata items are presented within the image. Clients must -keep following the ``next`` link to retrieve the full set of metadata. - - -**Example: Paginated metadata: JSON** - -.. code:: - - { - "server": { - "id": "52415800-8b69-11e0-9b19-734f6f006e54", - "name": "Elastic", - "metadata": { - "Version": "1.3", - "ServiceType": "Bronze" - }, - "metadata_links": [ - { - "rel": "next", - "href": "https://servers.api.openstack.org/v2.1/servers/fc55acf4-3398-447b-8ef9-72a42086d775/meta?marker=ServiceType" - } - ], - "links": [ - { - "rel": "self", - "href": "https://servers.api.openstack.org/v2.1/servers/fc55acf4-3398-447b-8ef9-72a42086d775" - } - ] - } - } +allowing them to be associated with arbitrary properties.