netconn-api/v2.0/wadl/os-ports.wadl
Diane Fleming cf63982eaf Update to point to wadls in the api-site repo to correct neutron:type error
Closes-Bug: #1157159

Change-Id: I59e5026878fdacfc41d7938c0f5736dc3d7a1dad
author: diane fleming
2013-12-20 12:37:08 -06:00

247 lines
11 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-ports.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent">
%common;]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:linkend="http://www.w3.org/1999/linkend"
xmlns:xref="http://www.w3.org/1999/xref"
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="Ports" type="#PortList" path="ports">
<method href="#listPorts"/>
<method href="#createPort"/>
<method href="#bulkCreatePorts"/>
<resource path="{port_id}">
<param name="port_id" style="template"
type="csapi:UUID">
<wadl:doc
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Port ID">
<para>The UUID for the port of
interest to you.</para></wadl:doc>
</param>
<method href="#showPort"/>
<method href="#updatePort"/>
<method href="#removePort"/>
</resource>
</resource>
</resource>
</resource>
</resources>
<!--*******************************************************-->
<!-- All Methods -->
<!--*******************************************************-->
<method name="GET" id="listPorts">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="List Ports">
<para role="shortdesc">Lists ports to which the tenant has
access.</para>
<para>Default policy settings return only those subnets
that are owned by the tenant who submits the request,
unless the request is submitted by an user with
administrative rights. Users can control which
attributes are returned by using the fields query
parameter. Additionally, 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"> &portListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/ports-get-resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/ports-get-resp.xml"
/>
</doc>
</representation>
</response> &fault401; </method>
<method name="POST" id="createPort">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Create Port">
<para role="shortdesc">Creates a port on a specified
network.</para>
<para>You must specify the network where the port is to
created in the <code>network_id</code> attribute in
the request body.</para>
</wadl:doc>
<request> &portCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/port-post-create-req.json"/>
</doc>
</representation>
</request>
<response status="201"> &portListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/port_create_or_update_resp.json"
/>
</doc>
</representation>
</response> &fault400; &fault401; &fault403; &fault404;
&fault503macGeneration; &fault503; </method>
<method name="POST" id="bulkCreatePorts">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Bulk Create Ports">
<para role="shortdesc">Creates multiple ports in a single
request. Specify a list of ports in the request
body.</para>
<para>Guarantees the atomic completion of the bulk
operation.</para>
</wadl:doc>
<request> &portCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/ports-post-create-bulk-req.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/ports-post-create-bulk-req.xml"
/>
</doc>
</representation>
</request>
<response status="201"> &portListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/ports-create-bulk-resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/ports-create-bulk-resp.xml"
/>
</doc>
</representation>
</response> &fault400; &fault401; &fault403; &fault404;
&fault409conflict; &fault503macGeneration; </method>
<method name="GET" id="showPort">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Show Port">
<para role="shortdesc">Shows information for a specified
port.</para>
</wadl:doc>
<response status="200"> &portListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/ports-get-resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code href="api_samples/ports-get-resp.xml"
/>
</doc>
</representation>
</response> &fault401; &fault404; </method>
<method name="PUT" id="updatePort">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Update Port">
<para role="shortdesc">Updates a specified port.</para>
<para>You can update information for a port, such as its
symbolic name and associated IPs. When you update IPs
for a port, any previously associated IPs are removed,
returned to the respective subnets allocation pools,
and replaced by the IPs specified in the body for the
update request. Therefore, this operation replaces the
<code>fixed_ip</code> attribute when it is
specified in the request body. If the updated IP
addresses are not valid or are already in use, the
operation fails and the existing IP addresses are not
removed from the port.</para>
<para>When you update security groups for a port and the
operation succeeds, any associated security groups are
removed and replaced by the security groups specified
in the body for the update request. Therefore, this
operation replaces the <code>security_groups</code>
attribute when you specify it in the request body.
However, if the specified security groups are not
valid, the operation fails and the existing security
groups are not removed from the port.</para>
</wadl:doc>
<request> &portCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/port-post-create-req.json"/>
</doc>
</representation>
</request>
<response status="200"> &portListParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/port_create_or_update_resp.json"
/>
</doc>
</representation>
<representation mediaType="application/xml">
<doc xml:lang="EN">
<xsdxt:code
href="api_samples/port_create_or_update_resp.xml"
/>
</doc>
</representation>
</response> &fault400; &fault401; &fault403; &fault404;
&fault409conflict; </method>
<method name="DELETE" id="removePort">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Delete Port">
<para role="shortdesc">Deletes a specified port.</para>
<para>Any IP addresses that are associated with the port
are returned to the respective subnets allocation
pools.</para>
</wadl:doc>
<response status="204"/> &fault401; &fault403; &fault404;
</method>
</application>