netconn-api/v2.0/wadl/os-subnets.wadl
2013-12-30 19:56:50 +00:00

285 lines
13 KiB
XML

<?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-subnets.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [<!ENTITY % common SYSTEM "../common.ent">
%common;]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:linkend="http://www.w3.org/1999/linkend"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns:csapi="http://docs.openstack.org/compute/api/v1.1">
<!--*******************************************************-->
<!-- All Resources -->
<!--*******************************************************-->
<resources base="https://neutron.example.com/">
<resource id="version" type="#VersionDetails" path="v2/">
<resource id="tenantID" path="{tenant_id}">
<param name="tenant_id" style="template"
type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<para>The tenant ID in a multi-tenancy
cloud.</para>
</wadl:doc>
</param>
<resource id="Subnets" type="#SubnetList"
path="subnets">
<method href="#listSubnets"/>
<method href="#createSubnet"/>
<method href="#bulkCreateSubnet"/>
<resource path="{subnet_id}">
<param name="subnet_id" style="template"
type="csapi:UUID">
<wadl:doc
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Subnet ID">
<para>The UUID for the subnet of
interest to you.</para>
</wadl:doc>
</param>
<method href="#showSubnet"/>
<method href="#updateSubnet"/>
<method href="#removeSubnet"/>
</resource>
</resource>
</resource>
</resource>
</resources>
<!--*******************************************************-->
<!-- All Methods -->
<!--*******************************************************-->
<method name="GET" id="listSubnets">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="List Subnets">
<para role="shortdesc">Lists subnets to which the
specified tenant has access.</para>
<para>Default policy settings returns exclusively subnets
owned by the tenant submitting the request, unless the
request is submitted by an user with administrative
rights. You can control which attributes are returned
by using the fields query parameter. You can filter
results by using query string parameters. For
information, see <link
xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html"
>Filtering and Column Selection</link> in the
<citetitle>OpenStack Networking API v2.0
Reference</citetitle>.</para>
</wadl:doc>
<response status="200">
<representation mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-get-res.json"/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/subnets-get-res.xml"
/>
</doc>
</representation>
</response>
&fault401;
</method>
<method name="POST" id="createSubnet">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Create Subnet">
<para role="shortdesc">Creates a subnet on a specified
network.</para>
<para>By default, OpenStack Networking creates IP v4
subnets. To create an IP v6 subnet, you must specify
the value 6 for the <code>ip_version</code> attribute
in the request body. OpenStack Networking does not try
to derive the correct IP version from the provided
CIDR. If the parameter for the gateway address,
<code>gateway_ip</code>, is not specified,
OpenStack Networking allocates an address from the
cidr for the gateway for the subnet.</para>
<para>To specify a subnet without a gateway, specify the
value null for the <code>gateway_ip</code> attribute
in the request body. If allocation pools attribute,
<code>allocation_pools</code>, is not specified,
OpenStack Networking automatically allocates pools for
covering all IP addresses in the CIDR, excluding the
address reserved for the subnet gateway. Otherwise,
you can explicitly specify allocation pools as shown
in the following example.</para>
<para>When <code>allocation_pools</code> and
<code>gateway_ip</code> are both specified, it is
up to the user to ensure that the gateway IP does not
overlap with the specified allocation pools; otherwise
a 409 Conflict error occurs.</para>
</wadl:doc>
<request> &subnetCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-post-create-bulk-req.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-post-create-bulk-req.xml"
/>
</doc>
</representation>
</request>
<response status="201"> &subnetListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-create-bulk-resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-create-bulk-resp.xml"
/>
</doc>
</representation>
</response>
&fault400; &fault401; &fault403; &fault404; &fault409conflict;
</method>
<method name="POST" id="bulkCreateSubnet">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Create Subnet">
<para role="shortdesc">Creates multiple subnets in a
single request. Specify a list of subnets in the
request body.</para>
<para>The bulk create operation is always atomic. Either
all or no subnets in the request body are
created.</para>
</wadl:doc>
<request> &subnetCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-post-create-bulk-req.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-post-create-bulk-req.xml"
/>
</doc>
</representation>
</request>
<response status="201"> &subnetListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-create-bulk-resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-create-bulk-resp.xml"
/>
</doc>
</representation>
</response>
&fault400; &fault401; &fault403; &fault404; &fault409conflict;
</method>
<method name="GET" id="showSubnet">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Show Subnet">
<para role="shortdesc">Shows information for a specified
subnet.</para>
<para>You can control which attributes are returned by
using the fields query parameter. For information, see
<link
xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/filtering.html"
>Filtering and Column Selection</link> in the
<citetitle>OpenStack Networking API v2.0
Reference</citetitle>.</para>
</wadl:doc>
<response status="201"> &subnetListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/subnet-get-res.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/subnet-get-res.xml"
/>
</doc>
</representation>
</response>
&fault401; &fault404;
</method>
<method name="PUT" id="updateSubnet">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Update Subnet">
<para role="shortdesc">Updates a specified subnet.</para>
<para>Some attributes, such as IP version (ip_version),
CIDR (cidr), and IP allocation pools
(allocation_pools) cannot be updated. Attempting to
update these attributes results in a 400 Bad Request
error.</para>
</wadl:doc>
<request> &subnetCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnet-post-req.json"/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/subnet-post-req.xml"
/>
</doc>
</representation>
</request>
<response status="201"> &subnetListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/subnet-post-res.json"/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/subnet-post-res.xml"
/>
</doc>
</representation>
</response>
&fault400; &fault401; &fault403; &fault404;
</method>
<method name="DELETE" id="removeSubnet">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Delete Subnet">
<para role="shortdesc">Deletes a specified subnet.</para>
<para>The operation fails if subnet IP addresses are still
allocated.</para>
</wadl:doc>
<response status="204"/>
&fault401; &fault404; &fault409conflict;
</method>
</application>