Skip to content

Commit

Permalink
Add os-block-device-mapping-v2-boot extension
Browse files Browse the repository at this point in the history
Made updates to other extensions (saw errors)

Closes-Bug: #1201549

Change-Id: I9a5fb91005ffdff8e4d2e9d12a9f11778b28184c
author: diane fleming
  • Loading branch information
dian4554 committed Oct 31, 2013
1 parent eb7aafb commit 6f37d09
Show file tree
Hide file tree
Showing 9 changed files with 591 additions and 423 deletions.
479 changes: 248 additions & 231 deletions api-ref/src/docbkx/api-ref-compute.xml 100644 → 100755

Large diffs are not rendered by default.

132 changes: 80 additions & 52 deletions api-ref/src/wadls/compute-api/src/common.ent
Expand Up @@ -100,58 +100,62 @@
<!-- Server Create Parameters -->
<!ENTITY serverCreateParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" name="security_group" style="query" required="true" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">The name of the security group. If blank, the server is created in the "default" security group.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="user_data" style="query" required="false" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">Configuration information or scripts to use upon launch. Must be Base64 encoded.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="availability_zone" style="query" required="false" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">The availability zone in which to launch the server.</p></doc></param>
<param name="server" style="plain" required="true"
type="csapi:ServerForCreate" path="/csapi:server">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="server">
<para>server.</para>
</wadl:doc>
</param>
<param name="imageRef" style="plain" required="true"
type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="imageRef">
<para>The
image reference for the desired image for
your server instance.</para>
<para>Specify as an ID or full URL.</para></wadl:doc>
</param>
<param name="flavorRef" style="plain" required="true"
type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="flavorRef">
<para>The
flavor reference for the desired flavor
for your server instance.</para>
<para
>Specify as an ID or full URL.</para></wadl:doc>
</param>
<param name="name" style="plain" required="true"
type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="name">
<para>The
name for your created server.</para></wadl:doc>
</param>
<param name="metadata" style="plain" required="false"
type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="metadata">
<para
>Metadata key and value pairs. The maximum
size of the metadata key and value is 255
bytes each.</para></wadl:doc>
</param>
<param name="personality" style="plain"
required="false" type="csapi:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN" title="personality">
<para>File
path and contents (text only) to inject
into the server at launch. The maximum
size of the file path data is 255 bytes.
The maximum limit refers to the number of
bytes in the decoded data and not the
number of characters in the encoded
data.</para></wadl:doc>
</param>

<param name="server" style="plain" required="true"
type="csapi:ServerForCreate" path="/csapi:server">
<doc xml:lang="EN" title="server">
<p xmlns="http://www.w3.org/1999/xhtml"
>server.</p>
</doc>
</param>
<param name="imageRef" style="plain" required="true"
type="csapi:string">
<doc xml:lang="EN" title="imageRef">
<p xmlns="http://www.w3.org/1999/xhtml">The
image reference for the desired image for
your server instance.</p>
<p xmlns="http://www.w3.org/1999/xhtml"
>Specify as an ID or full URL.</p></doc>
</param>
<param name="flavorRef" style="plain" required="true"
type="csapi:string">
<doc xml:lang="EN" title="flavorRef">
<p xmlns="http://www.w3.org/1999/xhtml">The
flavor reference for the desired flavor
for your server instance.</p>
<p xmlns="http://www.w3.org/1999/xhtml"
>Specify as an ID or full URL.</p></doc>
</param>
<param name="name" style="plain" required="true"
type="csapi:string">
<doc xml:lang="EN" title="name">
<p xmlns="http://www.w3.org/1999/xhtml">The
name for your created server.</p></doc>
</param>
<param name="metadata" style="plain" required="false"
type="csapi:string">
<doc xml:lang="EN" title="metadata">
<p xmlns="http://www.w3.org/1999/xhtml"
>Metadata key and value pairs. The maximum
size of the metadata key and value is 255
bytes each.</p></doc>
</param>
<param name="personality" style="plain"
required="false" type="csapi:string">
<doc xml:lang="EN" title="personality">
<p xmlns="http://www.w3.org/1999/xhtml">File
path and contents (text only) to inject
into the server at launch. The maximum
size of the file path data is 255 bytes.
The maximum limit refers to the number of
bytes in the decoded data and not the
number of characters in the encoded
data.</p></doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="security_group" style="plain" required="false" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">The name of the security group. If blank, the server is created in the "default" security group.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="user_data" style="plain" required="false" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">Use to pass configuration information or scripts upon launch. Must be Base64 encoded.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="availability_zone" style="plain" required="false" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">The availability zone in which to launch the server.</p></doc></param>

'>

<!-- Server List Parameters -->
Expand All @@ -167,6 +171,30 @@
<param xmlns="http://wadl.dev.java.net/2009/02" name="status" style="query" required="false" type="csapi:ServerStatus"><doc><p xmlns="http://www.w3.org/1999/xhtml">Value of the status of the server so that you can filter on "ACTIVE" for example.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="host" style="query" required="false" type="xsd:string"><doc><p xmlns="http://www.w3.org/1999/xhtml">Name of the host as a string.</p></doc></param>
'>

<!ENTITY serverResponseParameters
' <param name="Location" style="header" required="true"
type="xsd:anyURI">
<doc xml:lang="EN" title="Location"><p
xmlns="http://www.w3.org/1999/xhtml">Full URL
to a server created by the service.</p></doc>
</param>
<param name="adminPass" style="plain" required="true"
type="xsd:string">
<doc xml:lang="EN" title="adminPass"><p
xmlns="http://www.w3.org/1999/xhtml">The administrative password.</p></doc>
</param>
<param name="id" style="plain" required="true"
type="csapi:uuid">
<doc xml:lang="EN" title="id"><p
xmlns="http://www.w3.org/1999/xhtml">The server ID.</p></doc>
</param>
<param name="links" style="plain" required="true"
type="xsd:string">
<doc xml:lang="EN" title="id"><p
xmlns="http://www.w3.org/1999/xhtml">Server href and rel links.</p></doc>
</param>
'>

<!-- Flavor List Parameters -->

Expand Down
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2013 OpenStack Foundation, All Rights Reserved -->
<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
<!-- You can resolve the entites with xmllint -->
<!-- -->
<!-- xmllint -noent os-block-device-mapping-v2-boot.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [<!ENTITY % common SYSTEM "../common.ent">
%common;]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:csapi="http://docs.openstack.org/compute/api/v2"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<grammars>
<include href="../xsd/api.xsd"/>
<include href="../xsd/api-common.xsd"/>
</grammars>
<!--*******************************************************-->
<!-- All Resources -->
<!--*******************************************************-->
<resources base="https://servers.api.openstack.com">
<resource id="version" type="#VersionDetails" path="v2/">
<resource id="tenantID" path="{tenant_id}">
<param name="tenant_id" style="template"
type="csapi:UUID">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">The
tenant ID in a multi-tenancy cloud.</p>
</doc>
</param>
<resource id="Servers" type="#ServerList"
path="servers">
<method href="#createServer"/>
</resource>
</resource>
</resource>
</resources>

<!--*******************************************************-->
<!-- Resource Types -->
<!--*******************************************************-->

<resource_type id="VersionDetails">
<method href="#versionDetails"/>
</resource_type>
<resource_type id="ServerList">
<doc xml:lang="EN" title="Server List">
<p xmlns="http://www.w3.org/1999/xhtml">A list of servers.
Each server contains IDs, names, and links. Other
attributes are omitted.</p>
</doc>
<method href="#listServers"/>
</resource_type>

<!--*******************************************************-->
<!-- All Methods -->
<!--*******************************************************-->

<!-- Servers -->
<method name="POST" id="createServer">
<doc xml:lang="EN" title="Create Server">
<p xmlns="http://www.w3.org/1999/xhtml">Creates a server
with a block device mapping. </p>
</doc>

<request> &serverCreateParameters; <param
name="block_device_mapping_v2" style="plain"
required="true" type="csapi:blockDeviceMapping"
path="/csapi:server">
<doc xml:lang="EN" title="block_device_mapping_v2">
<p xmlns="http://www.w3.org/1999/xhtml"
>block_device_mapping_v2.</p>
</doc>
</param>
<param name="device_name" style="plain" type="xsd:string"
required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">A device
name where the volume is attached in the
system at /dev/dev_name. This value is
typically vda.</p>
</doc>
</param>
<param name="source_type" style="plain" type="xsd:string"
required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">Either
snap or any other value, including a blank
string. snap means that the volume was created
from a snapshot.</p>
</doc>
</param>
<param name="destination_type" style="plain"
type="xsd:string" required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">Either
snap or any other value, including a blank
string. snap means that the volume was created
from a snapshot.</p>
</doc>
</param>
<param name="delete_on_termination" style="plain"
type="xsd:bool" required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">Set to
True (or 1) to delete the volume when the
instance is deleted. Set to False (or 0) to
retain the volume when the instance is
deleted.</p>
</doc>
</param>
<param name="guest_format" style="plain" type="xsd:string"
required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">Guest
format.</p>
</doc>
</param>
<param name="uuid" style="plain" type="csapi:uuid"
required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">The device
ID.</p>
</doc>
</param>
<param name="boot_index" style="plain" type="xsd:string"
required="true">
<doc>
<p xmlns="http://www.w3.org/1999/xhtml">The boot
index.</p>
</doc>
</param>
<representation mediaType="application/json">
<doc>
<xsdxt:code
href="../api_samples/os-block-device-mapping-v2-boot/server-post-req.json"
/>
</doc>
</representation>
<representation mediaType="application/xml"
element="csapi:server">
<doc>
<xsdxt:code
href="../api_samples/os-block-device-mapping-v2-boot/server-post-req.xml"
/>
</doc>
</representation>
</request>
<response status="202"> &serverResponseParameters;
<representation mediaType="application/json">
<doc>
<xsdxt:code
href="../api_samples/os-block-device-mapping-v2-boot/server-post-resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml"
element="csapi:server">
<doc>
<xsdxt:code
href="../api_samples/os-block-device-mapping-v2-boot/server-post-resp.xml"
/>
</doc>
</representation>
</response>
<response status="422">
<representation mediaType="application/json"/>
<representation mediaType="application/xml"
element="csapi:UnprocessableEntity"/>
</response>
<!-- All other common faults except build in progess -->
&commonFaults; &getFaults; &postPutFaults; &buildFaults;
</method>
</application>

0 comments on commit 6f37d09

Please sign in to comment.