Clarity and sentences amend two

Used correct formatting, improved sentence clarity in Compute API v2 doc

backport: none
Closes-Bug #1300015

Change-Id: Ib36ccfc15365b72960e5b09ec772d6a9e4f8710b
This commit is contained in:
Joseph Robinson 2014-04-03 18:10:21 +10:00
parent 1680667e17
commit 39e40039bf

View File

@ -202,7 +202,6 @@
</itemizedlist>
</revdescription>
</revision>
<revision>
<date>2011-09-08</date>
<revdescription>
@ -459,8 +458,6 @@
</revdescription>
</revision>
</revhistory>
</info>
<preface xml:id="preface">
<title>Preface</title>
@ -515,7 +512,6 @@
http://docs.openstack.org</link>.</para>
</section>
</preface>
<chapter xml:id="General_API_Information-d1e436">
<title>General API information</title>
<para>The OpenStack Compute API is defined as a ReSTful HTTP
@ -552,19 +548,18 @@
</section>
<section xml:id="Request_Response_Types-d1e459">
<title>Request and response types</title>
<para>The OpenStack Compute API supports both JSON and XML
data serialization request and response
formats.</para>
<para>The OpenStack Compute API supports both
JSON and XML data serialization request and response
formats.</para>
<para>You specify the request format in the
<code>Content-Type</code> header in the request.
This header is required for operations that have a
request body. The syntax for the
<code>Content-Type</code> header is:
<programlisting>Content-Type: application/<parameter>format</parameter></programlisting></para>
<code>Content-Type</code> header is:</para>
<programlisting>Content-Type: application/<parameter>format</parameter></programlisting>
<para>Where <parameter>format</parameter> is either
<literal>json</literal> or
<literal>xml</literal>.</para>
<para>You specify the response format by using one of the
<literal>json</literal> or <literal>xml</literal>,
you specify the response format by using one of the
following methods:</para>
<itemizedlist>
<listitem>
@ -573,8 +568,8 @@
<programlisting>Accept: application/<parameter>format</parameter></programlisting></para>
<para>Where <parameter>format</parameter> is
either <constant>json</constant> or
<constant>xml</constant>.</para>
<para>Default is <literal>json</literal>.</para>
<constant>xml</constant>, the default
format is <literal>json</literal>.</para>
</listitem>
<listitem>
<para>Query extension. Add an
@ -583,13 +578,13 @@
request URI. For example, the
<literal>.xml</literal> extension in the
following URI request specifies that the
response body is returned in XML
format:</para>
<literallayout role="monospace">&POST; /v2/010101/servers.xml</literallayout>
response body is returned in
XML format:
<literallayout role="monospace">&POST; /v2/010101/servers.xml</literallayout></para>
</listitem>
</itemizedlist>
<para>If you do not specify a response format, JSON is the
default.</para>
<para>If you do not specify a response format,
JSON is the default.</para>
<para>If you specify conflicting formats in the
<code>Accept</code> header and the query
extension, the format specified in the query extension
@ -600,8 +595,8 @@
<para>You can serialize a response in a different format
from the request format. <xref linkend="JSON_req"/>
and <xref linkend="ImageCreateFullResponse"/> show a
request body in JSON format and a response body in XML
format.</para>
request body in JSON format and a response body
in XML format.</para>
<example xml:id="JSON_req">
<title>JSON request with headers</title>
<literallayout role="monospace"><?db-font-size 70%?>POST /v2/010101/servers HTTP/1.1
@ -675,30 +670,33 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb</literallayout>
<para>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: <itemizedlist>
<listitem>
<para>A <code>self</code> link contains a
versioned link to the resource. Use these
links when the link will be followed
immediately.</para>
</listitem>
<listitem>
<para>A <code>bookmark</code> link provides a
permanent link to a resource that is
appropriate for long term storage.</para>
</listitem>
<listitem>
<para>An <code>alternate</code> 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.</para>
</listitem>
</itemizedlist>Note that the type attribute here is
used to provide a hint as to the type of
representation to expect when following the
link.</para>
types of link relations are associated with
resources:</para>
<itemizedlist>
<listitem>
<para>A <code>self</code> link contains a
versioned link to the resource. Use these
links when the link will be followed
immediately.</para>
</listitem>
<listitem>
<para>A <code>bookmark</code> link provides a
permanent link to a resource that is
appropriate for long term storage.</para>
</listitem>
<listitem>
<para>An <code>alternate</code> 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.</para>
</listitem>
</itemizedlist>
<note>
<para>The type attribute provides a hint as to the
type of representation to expect when following
the link.</para>
</note>
<?hard-pagebreak?>
<example>
<title>Server with self links: JSON</title>
@ -727,10 +725,10 @@ X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb</literallayout>
compute provider. To navigate the collection, the
parameters <parameter>limit</parameter> and
<parameter>marker</parameter> can be set in the
URI
(e.g.?<parameter>limit</parameter>=100&amp;<parameter>marker</parameter>=1234).
The <parameter>marker</parameter> parameter is the ID
of the last item in the previous list. Items are
URI. For example:</para>
<programlisting>?<parameter>limit</parameter>=100&amp;<parameter>marker</parameter>=1234</programlisting>
<para>The <parameter>marker</parameter> 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 <parameter>limit</parameter> parameter sets the
@ -1429,8 +1427,7 @@ Host: servers.api.openstack.org/v2/</literallayout>
</tbody>
</table>
<example>
<title>Item Not Found fault:
JSON response</title>
<title>Item Not Found fault: JSON response</title>
<programlisting language="json"><xi:include href="samples/notfound.json" parse="text"/></programlisting>
</example>
<example>
@ -1481,7 +1478,8 @@ Host: servers.api.openstack.org/v2/</literallayout>
</example>
<?hard-pagebreak?>
<example>
<title>Server in error state: JSON response</title>
<title>Server in error state: JSON
response</title>
<programlisting language="json"><xi:include href="samples/server-fault.json" parse="text"/></programlisting>
</example>
<?hard-pagebreak?>
@ -1929,13 +1927,13 @@ Host: servers.api.openstack.org/v2/</literallayout>
access address. In the example below, an IPv4
address is assigned at creation time.</para>
<example>
<title>Create server with access IP:
XML request</title>
<title>Create server with access IP: XML
request</title>
<programlisting language="xml"><xi:include href="samples/server-post-req-pip.xml" parse="text"/></programlisting>
</example>
<example>
<title>Create server with access IP:
JSON request</title>
<title>Create server with access IP: JSON
request</title>
<programlisting language="json"><xi:include href="samples/server-post-req-pip.json" parse="text"/></programlisting>
</example>
<note>
@ -1948,12 +1946,14 @@ Host: servers.api.openstack.org/v2/</literallayout>
details.</para>
</note>
<example>
<title>Create server with multiple access IPs: XML request</title>
<title>Create server with multiple access IPs:
XML request</title>
<programlisting language="xml"><xi:include href="samples/server-post-req-pip2.xml" parse="text"/></programlisting>
</example>
<?hard-pagebreak?>
<example>
<title>Create server with multiple access IPs: JSON request</title>
<title>Create server with multiple access IPs:
JSON request</title>
<programlisting language="json"><xi:include href="samples/server-post-req-pip2.json" parse="text"/></programlisting>
</example>
</section>
@ -2054,9 +2054,13 @@ Host: servers.api.openstack.org/v2/</literallayout>
<wadl:resources
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<wadl:resource
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/compute-api/src/v2/wadl/os-compute-2.wadl#metadata"/>
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"/>
<wadl:resource
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/compute-api/src/v2/wadl/os-compute-2.wadl#ServerMetadataKey"
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/compute-api/src/v2/wadl/os-compute-2.wadl#ServerMetadataKey"/>
<wadl:resource
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/compute-api/src/v2/wadl/os-compute-2.wadl#image_metadata"/>
<wadl:resource
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/compute-api/src/v2/wadl/os-compute-2.wadl#imageMetadataKey"
/>
</wadl:resources>
</section>