Add os-multiple-create extension to Compute v2.1

Change-Id: Ib69247c37f51782a214530574d0da4451d3ee9b9
Closes-Bug: #1214399
This commit is contained in:
Diane Fleming 2015-04-18 14:57:54 -05:00
parent ad800a6606
commit 9d27148707
25 changed files with 440 additions and 290 deletions

View File

@ -44,7 +44,7 @@
Performs actions on a server. Specify the action in the request body.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-server-actions.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-server-actions-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1server-admin-actions">
@ -62,7 +62,7 @@
a specified IP address.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/server-ips.wadl"
href="../wadls/compute-api/src/v2.1/wadl/server-ips-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1os-create-backup">
@ -71,7 +71,7 @@
Backs up a server instance.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-create-backup.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-create-backup-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1os-admin-password">
@ -83,7 +83,7 @@
same.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-admin-password.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-admin-password-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1agents">
@ -230,14 +230,14 @@
allocated by the floating IPs extension. Requests are
dispatched to a DNS driver selected at startup.</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ip-dns.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ip-dns-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1ext-os-floating-ip-pools">
<title>Floating IP pools (os-floating-ip-pools)</title>
<para>Manages groups of floating IPs.</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ip-pools.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ip-pools-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1ext-os-floating-ips">
@ -245,27 +245,21 @@
<para>Assigns and allocates floating IP addresses to instances
that run in an OpenStack cloud.</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ips.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ips-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1ext-os-floating-ips-bulk">
<title>Floating IPs bulk (os-floating-ips-bulk)</title>
<para>
Bulk-creates, deletes, and lists floating IPs. By default, the pool
is named nova. Use the <code>os-floating-ip- pools</code> extension
is named nova.
</para>
<para>
Use the <literal>os-floating-ip-pools</literal> extension
to view available pools.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ips-bulk.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1os-fping">
<title>Ping instances (os-fping)</title>
<para>
Pings all or specified instances and reports which ones are alive.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-fping-v2.1.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-floating-ips-bulk-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1hosts">
@ -279,7 +273,8 @@
<title>Hypervisors (os-hypervisors)</title>
<para>Displays extra statistical information from the machine that
hosts the hypervisor through the API for the hypervisor (XenAPI
or KVM/libvirt).</para>
or KVM/libvirt).
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-hypervisors-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
@ -288,15 +283,17 @@
<title>Server actions (servers)</title>
<para>Permits all users to list available actions for a specified
server. Permits administrators to get details for a specified
action for a specified server.</para>
action for a specified server.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-instance-actions-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="os-instance-usage-audit-log-v2.1">
<title>Instance usage audit log
(os-instance-usage-audit-log)</title>
<para>Administrator only. Performs task log monitoring.</para>
(os-instance-usage-audit-log)
</title>
<para>Administrator only. Monitors task logs.</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-instance-usage-audit-log-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
@ -305,7 +302,7 @@
<title>Keypairs (keypairs)</title>
<para>Generates, imports, and deletes SSH keys.</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-keypairs.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-keypairs-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1limits">
@ -329,6 +326,17 @@
href="../wadls/compute-api/src/v2.1/wadl/os-multinic-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1-os-multiple-create">
<title>Servers multiple create (servers)</title>
<para>
Creates one or more servers with an optional reservation ID. The
request and response examples show how to create multiple servers with
or without a reservation ID.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-multiple-create-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1quotaclasses">
<title>Quota class (os-quota-class-sets)</title>
<para>Provides quota classes management support.</para>
@ -340,7 +348,8 @@
<title>Quota sets (os-quota-sets)</title>
<para>Permits administrators, depending on policy settings, to
view quotas for a tenant and view and update default
quotas.</para>
quotas.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-quota-sets-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
@ -356,7 +365,7 @@
<title>Server diagnostics (os-server-diagnostics)</title>
<para>Gets the usage data for a server.</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-server-diagnostics.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-server-diagnostics-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="os-server-usage-v2.1">
@ -397,7 +406,7 @@
instance that you no longer need.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-shelve.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-shelve-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1ext-os-server-password">
@ -407,7 +416,7 @@
service.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-server-password.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-server-password-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="v2.1simpletenant">
@ -420,10 +429,10 @@
<section xml:id="v2.1ext-os-virtual-interfaces">
<title>Virtual interfaces (os-virtual-interfaces)</title>
<para>
Lists virtual interfaces specified server instance.
Lists virtual interfaces for a specified server instance.
</para>
<wadl:resources
href="../wadls/compute-api/src/v2.1/wadl/os-virtual-interfaces.wadl"
href="../wadls/compute-api/src/v2.1/wadl/os-virtual-interfaces-v2.1.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
</chapter>

View File

@ -0,0 +1,12 @@
{
"server": {
"name": "new-server-test",
"imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "http://openstack.example.com/openstack/flavors/1",
"metadata": {
"My Server Name": "Apache1"
},
"min_count": "2",
"max_count": "3"
}
}

View File

@ -0,0 +1,16 @@
{
"server": {
"adminPass": "wfksH3GTTseP",
"id": "440cf918-3ee0-4143-b289-f63e1d2000e6",
"links": [
{
"href": "http://openstack.example.com/v3/servers/440cf918-3ee0-4143-b289-f63e1d2000e6",
"rel": "self"
},
{
"href": "http://openstack.example.com/servers/440cf918-3ee0-4143-b289-f63e1d2000e6",
"rel": "bookmark"
}
]
}
}

View File

@ -0,0 +1,13 @@
{
"server": {
"name": "new-server-test",
"imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "http://openstack.example.com/openstack/flavors/1",
"metadata": {
"My Server Name": "Apache1"
},
"return_reservation_id": "True",
"min_count": "2",
"max_count": "3"
}
}

View File

@ -0,0 +1,3 @@
{
"reservation_id": "r-3fhpjulh"
}

View File

@ -152,26 +152,30 @@
'>
<!-- Server Create Parameters -->
<!ENTITY serverCreateParameters
'
<!ENTITY serverCreateParameters '
<param xmlns="http://wadl.dev.java.net/2009/02"
name="security_group" style="query" required="true"
type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN"><para>The name
of the security group. If blank, the server is
created in the "default" security
group.</para></wadl:doc>
xml:lang="EN">
<para>
The name of the security group. If blank, the server is
created in the "default" security group.
</para>
</wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02"
name="user_data" style="query" required="false"
type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN"><para>Configuration information or scripts to use
upon launch. Must be Base64 encoded.</para></wadl:doc>
xml:lang="EN">
<para>
Configuration information or scripts to use upon launch. Must be
Base64 encoded.
</para>
</wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02"
name="availability_zone" style="query"
@ -248,9 +252,7 @@
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>'>
<!-- Server List Parameters -->
<!ENTITY serverListParameters
'

View File

@ -7,7 +7,7 @@
xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0">
<resources base="http://www.example.com" xml:id="flavor-manage-v2.1">
<resource path="//v2.1">
<resource path="//v2.1" id="v2.1">
<resource path="flavors">
<method href="#create-flavors"/>
<resource path="{flavor_id}">

View File

@ -7,7 +7,7 @@
xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0">
<resources base="https://servers.api.openstack.com" xml:id="limits-v2.1">
<resource id="Limits" path="//v2.1">
<resource id="v2.1" path="//v2.1">
<resource id="limits" path="limits">
<method href="#getlimits"/>
</resource>

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2014 OpenStack Foundation, All Rights Reserved -->
<!DOCTYPE application [<!ENTITY % common SYSTEM "../common.ent">
%common;]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0">
<resources base="https://servers.api.openstack.com"
xml:id="os-multiple-create-v2.1">
<resource id="v2.1" path="//v2.1">
<resource id="servers" path="servers">
<!-- &serverCreateParameters; -->
<param name="return_reservation_id" style="plain"
required="false" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
Set to <code>True</code>to generate a reservation
ID for each server. Omit this attribute to create
servers without a reservation ID. This extended
attribute is enabled when the service provider
enables multiple server launch.
</para>
</wadl:doc>
</param>
<param name="min_count" style="plain" required="false"
type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
The minimum number of servers to launch when the
service provider enables multiple server launch.
</para>
</wadl:doc>
</param>
<param name="max_count" style="plain" required="false"
type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>
The maximum number of servers to launch when the
service provider enables multiple server launch.
</para>
</wadl:doc>
</param>
<method href="#createServer"/>
</resource>
</resource>
</resources>
<method name="POST" id="createServer">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Create multiple servers">
<para role="shortdesc">
Creates one or more servers with an optional reservation ID.
</para>
</wadl:doc>
<request>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-multiple-create/multiple-create-no-resv-post-req.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-multiple-create/multiple-create-post-req.json"
/>
</wadl:doc>
</representation>
</request>
<response status="202">
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-multiple-create/multiple-create-no-resv-post-resp.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="../api_samples/os-multiple-create/multiple-create-post-resp.json"
/>
</wadl:doc>
</representation>
</response>
</method>
</application>