From 39e40039bfb087912af690b233233293718723f6 Mon Sep 17 00:00:00 2001 From: Joseph Robinson Date: Thu, 3 Apr 2014 18:10:21 +1000 Subject: [PATCH] Clarity and sentences amend two Used correct formatting, improved sentence clarity in Compute API v2 doc backport: none Closes-Bug #1300015 Change-Id: Ib36ccfc15365b72960e5b09ec772d6a9e4f8710b --- .../src/os-compute-devguide.xml | 124 +++++++++--------- 1 file changed, 64 insertions(+), 60 deletions(-) diff --git a/openstack-compute-api-2/src/os-compute-devguide.xml b/openstack-compute-api-2/src/os-compute-devguide.xml index 345295e..12e6739 100755 --- a/openstack-compute-api-2/src/os-compute-devguide.xml +++ b/openstack-compute-api-2/src/os-compute-devguide.xml @@ -202,7 +202,6 @@ - 2011-09-08 @@ -459,8 +458,6 @@ - - Preface @@ -515,7 +512,6 @@ http://docs.openstack.org. - General API information The OpenStack Compute API is defined as a ReSTful HTTP @@ -552,19 +548,18 @@
Request and response types - The OpenStack Compute API supports both JSON and XML - data serialization request and response - formats. + The OpenStack Compute API supports both + JSON and XML data serialization request and response + formats. You specify the request format in the Content-Type header in the request. This header is required for operations that have a request body. The syntax for the - Content-Type header is: - Content-Type: application/format + Content-Type header is: + Content-Type: application/format Where format is either - json or - xml. - You specify the response format by using one of the + json or xml, + you specify the response format by using one of the following methods: @@ -573,8 +568,8 @@ Accept: application/format Where format is either json or - xml. - Default is json. + xml, the default + format is json. Query extension. Add an @@ -583,13 +578,13 @@ request URI. For example, the .xml extension in the following URI request specifies that the - response body is returned in XML - format: - &POST; /v2/010101/servers.xml + response body is returned in + XML format: + &POST; /v2/010101/servers.xml - If you do not specify a response format, JSON is the - default. + If you do not specify a response format, + JSON is the default. If you specify conflicting formats in the Accept header and the query extension, the format specified in the query extension @@ -600,8 +595,8 @@ You can serialize a response in a different format from the request format. and show a - request body in JSON format and a response body in XML - format. + request body in JSON format and a response body + in XML format. JSON request with headers POST /v2/010101/servers HTTP/1.1 @@ -675,30 +670,33 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb For convenience, resources contain links to themselves. This allows a client to easily obtain rather than construct resource URIs. The following - types of link relations are associated with resources: - - A self link contains a - versioned link to the resource. Use these - links when the link will be followed - immediately. - - - A bookmark link provides a - permanent link to a resource that is - appropriate for long term storage. - - - An alternate link can - contain an alternate representation of the - resource. For example, an OpenStack - Compute image might have an alternate - representation in the OpenStack Image - service. - - Note that the type attribute here is - used to provide a hint as to the type of - representation to expect when following the - link. + types of link relations are associated with + resources: + + + A self link contains a + versioned link to the resource. Use these + links when the link will be followed + immediately. + + + A bookmark link provides a + permanent link to a resource that is + appropriate for long term storage. + + + An alternate link can contain + an alternate representation of the resource. + For example, an OpenStack Compute image might + have an alternate representation in the + OpenStack Image service. + + + + The type attribute provides a hint as to the + type of representation to expect when following + the link. + Server with self links: JSON @@ -727,10 +725,10 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb compute provider. To navigate the collection, the parameters limit and marker can be set in the - URI - (e.g.?limit=100&marker=1234). - The marker parameter is the ID - of the last item in the previous list. Items are + URI. For example: + ?limit=100&marker=1234 + The marker parameter is the + ID of the last item in the previous list. Items are sorted by create time in descending order. When a create time is not available they are sorted by ID. The limit parameter sets the @@ -1429,8 +1427,7 @@ Host: servers.api.openstack.org/v2/ - Item Not Found fault: - JSON response + Item Not Found fault: JSON response @@ -1481,7 +1478,8 @@ Host: servers.api.openstack.org/v2/ - Server in error state: JSON response + Server in error state: JSON + response @@ -1929,13 +1927,13 @@ Host: servers.api.openstack.org/v2/ access address. In the example below, an IPv4 address is assigned at creation time. - Create server with access IP: - XML request + Create server with access IP: XML + request - Create server with access IP: - JSON request + Create server with access IP: JSON + request @@ -1948,12 +1946,14 @@ Host: servers.api.openstack.org/v2/ details. - Create server with multiple access IPs: XML request + Create server with multiple access IPs: + XML request - Create server with multiple access IPs: JSON request + Create server with multiple access IPs: + JSON request
@@ -2054,9 +2054,13 @@ Host: servers.api.openstack.org/v2/ + href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/compute-api/src/v2/wadl/os-compute-2.wadl#server_metadata"/> + +