Add WADLs for layer3 router and floating IPs for Networking

Closes-Bug: #1276265

Change-Id: I62b6f7144cc40e51580ef5428e8a66b4a985c511
author: diane fleming
This commit is contained in:
Diane Fleming 2014-02-06 08:41:11 -06:00
parent 9097e3a1ec
commit ccdea9252e
21 changed files with 1143 additions and 191 deletions

View File

@ -45,4 +45,44 @@
href="../wadls/netconn-api/src/security-groups.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="layer3">
<title>Layer-3 networking</title>
<para>The Layer-3 networking extension enables you to route
packets between subnets, forward packets from internal
networks to external ones, and access instances from
external networks through floating IPs.</para>
<para>This extension introduces these resources:</para>
<itemizedlist>
<listitem>
<para><emphasis role="bold">router</emphasis>. A
logical entity for forwarding packets across
internal subnets and NATting them on external
networks through an appropriate external
gateway.</para>
</listitem>
<listitem>
<para><emphasis role="bold">floatingip</emphasis>. An
external IP address that is mapped to a port that
is attached to an internal network.</para>
</listitem>
</itemizedlist>
<section xml:id="router-operations">
<title>Router operations</title>
<wadl:resources
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<wadl:resource
href="../wadls/netconn-api/src/os-layer3-ext.wadl#Routers"
/>
</wadl:resources>
</section>
<section xml:id="floating-ips">
<title>Floating IP operations</title>
<wadl:resources
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<wadl:resource
href="../wadls/netconn-api/src/os-layer3-ext.wadl#FloatingIps"
/>
</wadl:resources>
</section>
</section>
</chapter>

View File

@ -0,0 +1,22 @@
{
"floatingips":[
{
"router_id":"d23abc8d-2991-4a55-ba98-2aaea84cc72f",
"tenant_id":"4969c491a3c74ee4af974e6d800c62de",
"floating_network_id":"376da547-b977-4cfe-9cba-275c80debf57",
"fixed_ip_address":"10.0.0.3",
"floating_ip_address":"172.24.4.228",
"port_id":"ce705c24-c1ef-408a-bda3-7bbd946164ab",
"id":"2f245a7b-796b-4f26-9cf9-9e82d248fda7"
},
{
"router_id":null,
"tenant_id":"4969c491a3c74ee4af974e6d800c62de",
"floating_network_id":"376da547-b977-4cfe-9cba-275c80debf57",
"fixed_ip_address":null,
"floating_ip_address":"172.24.4.227",
"port_id":null,
"id":"61cea855-49cb-4846-997d-801b70c71bdd"
}
]
}

View File

@ -0,0 +1,6 @@
{
"floatingip":{
"fixed_ip_address":"10.0.0.3",
"floating_ip_address":"172.24.4.228"
}
}

View File

@ -0,0 +1,6 @@
{
"floatingip":{
"floating_network_id":"376da547-b977-4cfe-9cba-275c80debf57",
"port_id":"ce705c24-c1ef-408a-bda3-7bbd946164ab"
}
}

View File

@ -0,0 +1,11 @@
{
"floatingip":{
"router_id":"d23abc8d-2991-4a55-ba98-2aaea84cc72f",
"tenant_id":"4969c491a3c74ee4af974e6d800c62de",
"floating_network_id":"376da547-b977-4cfe-9cba-275c80debf57",
"fixed_ip_address":"10.0.0.3",
"floating_ip_address":"172.24.4.228",
"port_id":"ce705c24-c1ef-408a-bda3-7bbd946164ab",
"id":"2f245a7b-796b-4f26-9cf9-9e82d248fda7"
}
}

View File

@ -0,0 +1,11 @@
{
"floatingip":{
"router_id":"d23abc8d-2991-4a55-ba98-2aaea84cc72f",
"tenant_id":"4969c491a3c74ee4af974e6d800c62de",
"floating_network_id":"376da547-b977-4cfe-9cba-275c80debf57",
"fixed_ip_address":null,
"floating_ip_address":"172.24.4.228",
"port_id":null,
"id":"2f245a7b-796b-4f26-9cf9-9e82d248fda7"
}
}

View File

@ -0,0 +1,5 @@
{
"floatingip":{
"port_id":null
}
}

View File

@ -0,0 +1,11 @@
{
"floatingip":{
"router_id":"d23abc8d-2991-4a55-ba98-2aaea84cc72f",
"tenant_id":"4969c491a3c74ee4af974e6d800c62de",
"floating_network_id":"376da547-b977-4cfe-9cba-275c80debf57",
"fixed_ip_address":"10.0.0.4",
"floating_ip_address":"172.24.4.228",
"port_id":"fc861431-0e6c-4842-a0ed-e2363f9bc3a8",
"id":"2f245a7b-796b-4f26-9cf9-9e82d248fda7"
}
}

View File

@ -0,0 +1,5 @@
{
"floatingip":{
"port_id":"fc861431-0e6c-4842-a0ed-e2363f9bc3a8"
}
}

View File

@ -0,0 +1,4 @@
{
"subnet_id":"a2f1f29d-571b-4533-907f-5803ab96ead1",
"port_id":"3a44f4e5-1694-493a-a1fb-393881c673a4"
}

View File

@ -0,0 +1,3 @@
{
"subnet_id":"a2f1f29d-571b-4533-907f-5803ab96ead1"
}

View File

@ -0,0 +1,6 @@
{
"router":{
"name":"another_router",
"admin_state_up":true
}
}

View File

@ -0,0 +1,10 @@
{
"router":{
"status":"ACTIVE",
"external_gateway_info":null,
"name":"another_router",
"admin_state_up":true,
"tenant_id":"6b96ff0cb17a4b859e1e575d221683d3",
"id":"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
}
}

View File

@ -0,0 +1,12 @@
{
"router":{
"status":"ACTIVE",
"external_gateway_info":{
"network_id":"8ca37218-28ff-41cb-9b10-039601ea7e6b"
},
"name":"another_router",
"admin_state_up":true,
"tenant_id":"6b96ff0cb17a4b859e1e575d221683d3",
"id":"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
}
}

View File

@ -0,0 +1,7 @@
{
"router":{
"external_gateway_info":{
"network_id":"8ca37218-28ff-41cb-9b10-039601ea7e6b"
}
}
}

View File

@ -0,0 +1,3 @@
{
"subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1"
}

View File

@ -0,0 +1,6 @@
{
"id":"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e",
"tenant_id":"2f245a7b-796b-4f26-9cf9-9e82d248fda7",
"port_id":"3a44f4e5-1694-493a-a1fb-393881c673a4",
"subnet_id":"a2f1f29d-571b-4533-907f-5803ab96ead1"
}

View File

@ -0,0 +1,14 @@
{
"routers":[
{
"status":"ACTIVE",
"external_gateway_info":{
"network_id":"3c5bcddd-6af9-4e6b-9c3e-c153e521cab8"
},
"name":"router1",
"admin_state_up":true,
"tenant_id":"33a40233088643acb66ff6eb0ebea679",
"id":"a9254bdb-2613-4a13-ac4c-adc581fba50d"
}
]
}

View File

@ -0,0 +1,22 @@
{
"routers":[
{
"status":"ACTIVE",
"external_gateway_info":null,
"name":"second_routers",
"admin_state_up":true,
"tenant_id":"6b96ff0cb17a4b859e1e575d221683d3",
"id":"7177abc4-5ae9-4bb7-b0d4-89e94a4abf3b"
},
{
"status":"ACTIVE",
"external_gateway_info":{
"network_id":"3c5bcddd-6af9-4e6b-9c3e-c153e521cab8"
},
"name":"router1",
"admin_state_up":true,
"tenant_id":"33a40233088643acb66ff6eb0ebea679",
"id":"a9254bdb-2613-4a13-ac4c-adc581fba50d"
}
]
}

View File

@ -2,133 +2,97 @@
A collection of common faults, these are pretty much expected
in every request.
-->
<!ENTITY commonFaults
'
<response xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:computeFault"/>
<representation mediaType="application/json"/>
</response> '>
<!ENTITY fault503
'
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:serviceUnavailable"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault503macGeneration
'
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:macGenerationFailure"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault400
'
<response status="400" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:badRequest"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault401
'
<response status="401" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:unauthorized"/>
<representation mediaType="application/json"/>
</response> '>
<!ENTITY fault403
' <response status="403" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:forbidden"/>
<representation mediaType="application/json"/>
</response> '>
<!ENTITY fault404
'
<response status="404" xmlns="http://wadl.dev.java.net/2009/02">
<!ENTITY commonFaults '
<response xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:computeFault"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault503 '
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:serviceUnavailable"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault503macGeneration '
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:macGenerationFailure"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault400 '
<response status="400" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:badRequest"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault401 '
<response status="401" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:unauthorized"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault403 '
<response status="403" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:forbidden"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault404 '<response status="404" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:itemNotFound"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault405
' <response status="405" xmlns="http://wadl.dev.java.net/2009/02">
</response>'>
<!ENTITY fault405 '<response status="405" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:badMethod"/>
<representation mediaType="application/json"/>
</response> '>
<!ENTITY fault409
'
<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="osapi:buildInProgress"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault409networkInUse
'
<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
</response> '>
<!ENTITY fault409 '<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml"
element="csapi:conflict"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault409networkInUse '<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:networkInUse"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault409conflict
'
<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
</response>'>
<!ENTITY fault409conflict '<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:conflict"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault413
' <response status="413" xmlns="http://wadl.dev.java.net/2009/02">
</response>'>
<!ENTITY fault413
' <response status="413" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:overLimit"/>
<representation mediaType="application/json"/>
</response>
'>
<!ENTITY fault415
'
<response status="415" xmlns="http://wadl.dev.java.net/2009/02">
'>
<!ENTITY fault415 '<response status="415" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:badMediaType"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY fault422
'<response status="422" xmlns="http://wadl.dev.java.net/2009/02">
<!ENTITY fault422 '<response status="422" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:HTTPUnprocessableEntity"/>
<representation mediaType="application/json"/>
</response>
'>
</response>'>
<!--
Faults that can occur when we are building servers or images.
-->
<!ENTITY buildFaults
'
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<!ENTITY buildFaults '<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:serverCapacityUnavailable"/>
<representation mediaType="application/json"/>
</response>
'>
</response>'>
<!--
Holds build in progress which occurs when an operation fails
because the server is in the process of being built.
-->
<!ENTITY networkListParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
<!ENTITY networkListParameters
'<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="admin_state_up" style="plain" type="xsd:bool">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The administrative state of the network.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="id" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
@ -164,12 +128,10 @@
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The tenant ID.</para></wadl:doc>
</param>
'>
<!-- Network Create Parameters -->
<!ENTITY networkCreateParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
</param>'>
<!-- Network Create Parameters -->
<!ENTITY networkCreateParameters
'<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="admin_state_up" style="plain" type="xsd:bool">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
@ -182,21 +144,23 @@
<para>The network name.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="shared" style="plain" type="xsd:bool">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Admin-only. Indicates whether this network is shared across all tenants.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="tenant_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The ID of the tenant that owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.</para></wadl:doc>
</param>
'>
<!-- Network Provider Parameters -->
<!ENTITY networkProviderParameters
'
name="shared" style="plain" type="xsd:bool">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Admin-only. Indicates whether this network is shared
across all tenants.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="tenant_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The ID of the tenant that owns the network. Only
administrative users can specify a tenant ID other than
their own. You cannot change this value through
authorization policies.</para></wadl:doc>
</param>'>
<!-- Network Provider Parameters -->
<!ENTITY networkProviderParameters '<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="provider:physical_network" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.</para></wadl:doc>
@ -210,12 +174,9 @@
name="provider:segmentation_id" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if network_type is vlan, this ID is a vlan identifier. If network_type is gre, this ID is a gre key.</para></wadl:doc>
</param>
'>
<!ENTITY portListParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
</param>'>
<!ENTITY portListParameters
'<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="status" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The port status. Value is UP or DOWN.</para></wadl:doc>
@ -284,12 +245,10 @@
name="security_groups" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The IDs of any attached security groups.</para></wadl:doc>
</param>
'>
</param>'>
<!-- Port Create Parameters -->
<!ENTITY portCreateParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
<!ENTITY portCreateParameters
'<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="status" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The status of the port.</para></wadl:doc>
@ -328,40 +287,45 @@
name="network_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The ID of the The network ID.</para></wadl:doc>
</param>
'>
<!-- Port binding Parameters -->
<!ENTITY portBindingParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:vif_type" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Read-only. The The vif type for the specified port.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:host_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:profile" style="plain" type="xsd:dict">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>A dictionary the enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:capabilities" style="plain" type="xsd:dict">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Read-only. A dictionary that enables the application to pass information about functions that the Networking API povides. Specify the following value: port_filter : Boolean to define whether port filtering features such as security group and anti-MAC/IP spoofing are provided.</para></wadl:doc>
</param>
'>
</param> '>
<!-- Port binding Parameters -->
<!ENTITY portBindingParameters '
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:vif_type" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Read-only. The vif type for the specified
port.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:host_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The ID of the host where the port is allocated. In some
cases, different implementations can run on different
hosts.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:profile" style="plain" type="xsd:dict">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>A dictionary the enables the application running on the
specified host to pass and receive vif port-specific
information to the plug-in.</para></wadl:doc>
</param>
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="binding:capabilities" style="plain" type="xsd:dict">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Read-only. A dictionary that enables the application to
pass information about functions that the Networking API
provides. To enable or disable port filtering features such as
security group and anti-MAC/IP spoofing, specify <code>port_filter:
True|False</code>.</para></wadl:doc>
</param>'>
<!-- Subnet Parameters -->
<!ENTITY subnetListParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
<!ENTITY subnetListParameters
'<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="name" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The subnet name.</para></wadl:doc>
@ -407,11 +371,8 @@
<para>Set to true if DHCP is enabled and false if DHCP is disabled.</para></wadl:doc>
</param>
'>
<!-- Subnet Create Parameters -->
<!ENTITY subnetCreateParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
<!ENTITY subnetCreateParameters '<param xmlns="http://wadl.dev.java.net/2009/02" required="false"
name="name" style="plain" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>The subnet name.</para></wadl:doc>
@ -455,14 +416,10 @@
name="enable_dhcp" style="plain" type="xsd:boolean">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Set to true if DHCP is enabled and false if DHCP is disabled.</para></wadl:doc>
</param>
'>
<!-- Server List Parameters -->
<!ENTITY serverListParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02"
</param>'>
<!-- Server List Parameters -->
<!ENTITY serverListParameters '
<param xmlns="http://wadl.dev.java.net/2009/02"
name="changes-since" style="query" required="false" type="xsd:dateTime">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>A time/date stamp for when the server last changed status.</para></wadl:doc>
@ -501,15 +458,9 @@
name="host" style"query" required="false" type="xsd:string">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Name of the host as a string.</para></wadl:doc>
</param>
'>
<!-- Flavor List Parameters -->
<!ENTITY flavorListParameters
'
<param xmlns="http://wadl.dev.java.net/2009/02"
</param>'>
<!-- Flavor List Parameters -->
<!ENTITY flavorListParameters '<param xmlns="http://wadl.dev.java.net/2009/02"
name="changes-since" style="query" required="false" type="xsd:dateTime">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>A time/date stamp for when the flavor last changed.</para></wadl:doc>
@ -533,12 +484,8 @@
name="limit" style="query" required="false" type="xsd:int">
<wadl:doc xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
<para>Integer value for the limit of values to return.</para></wadl:doc>
</param>
'>
<!ENTITY securityGroupRule
'
<param xmlns="http://wadl.dev.java.net/2009/02" name="security_group_rules"
</param> '>
<!ENTITY securityGroupRule '<param xmlns="http://wadl.dev.java.net/2009/02" name="security_group_rules"
type="xsd:string" required="true">
<wadl:doc xml:lang="EN" xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook">
@ -610,9 +557,195 @@
xmlns="http://docbook.org/ns/docbook">
<para>The tenant ID.</para></wadl:doc>
</param>'>
<!--! router parameters -->
<!ENTITY routerParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="router" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>A <code>router</code> object.</para>
</wadl:doc>
</param>'>
<!ENTITY nameParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="name" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The router name.</para>
</wadl:doc>
</param>'>
<!ENTITY admin-state-upParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="admin_state_up" style="plain" type="xsd:bool">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The administrative state of the router.</para>
</wadl:doc>
</param>'>
<!ENTITY statusParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="status" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The router status.</para>
</wadl:doc>
</param>'>
<!ENTITY external-gateway-infoParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="external_gateway_info" style="plain" type="xsd:dict">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The <code>network_id</code>, for the external
gateway.</para>
</wadl:doc>
</param>'>
<!ENTITY tenant-idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="tenant_id" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The tenant ID.</para>
</wadl:doc>
</param>'>
<!ENTITY idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="id" style="plain" type="csapi:uuid">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The router ID.</para>
</wadl:doc>
</param>'>
<!ENTITY routersParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="routers" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>A <code>routers</code> object.</para>
</wadl:doc>
</param>'>
<!ENTITY portParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="port" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>A <code>port</code> object.</para>
</wadl:doc>
</param>'>
<!ENTITY network-idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="network_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The network ID.</para>
</wadl:doc>
</param>'>
<!ENTITY device-idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="device_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The device ID.</para>
</wadl:doc>
</param>'>
<!ENTITY ip-addressParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="ip_address" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The IP address.</para>
</wadl:doc>
</param>'>
<!ENTITY subnet-idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="subnet_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The subnet ID.</para>
</wadl:doc>
</param>'>
<!ENTITY device-ownerParameter '
<param required="true" xmlns="http://wadl.dev.java.net/2009/02"
name="device_owner" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The device owner.</para>
</wadl:doc>
</param>'>
<!ENTITY fixed-ipsParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="fixed_ips" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>A <code>fixed_ips</code> object.</para>
</wadl:doc>
</param>'>
<!ENTITY mac-addressParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="mac_address" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The MAC address.</para>
</wadl:doc>
</param>'>
<!ENTITY port-idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="port_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02">
<para>The port ID.</para>
</wadl:doc>
</param>'>
<!--! floating IP parameters -->
<!ENTITY floating-ip-addressParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="floating_ip_address" style="plain" 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 floating IP address.</para>
</wadl:doc>
</param>'>
<!ENTITY floating-ipsParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="floatingip" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>A <code>floatingips</code> object.</para>
</wadl:doc>
</param>'>
<!ENTITY floating-ipParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="floatingip" style="plain" type="xsd:string">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>A <code>floatingip</code> object.</para>
</wadl:doc>
</param>'>
<!ENTITY router-idParameter ''>
<!ENTITY floating-network-idParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="floating_network_id" style="plain" type="csapi:uuid">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xml:lang="EN">
<para>The ID of the network associated with the floating
IP.</para>
</wadl:doc>
</param>'>
<!ENTITY fixed-ip-addressParameter '
<param xmlns="http://wadl.dev.java.net/2009/02" required="true"
name="fixed_ip_address" style="plain" 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 fixed IP address associated with the floating
IP.</para>
</wadl:doc>
</param>'>
<!-- Useful for describing APIs -->
<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>
<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
<!ENTITY POST '<command xmlns="http://docbook.org/ns/docbook">POST</command>'>
<!ENTITY DELETE '<command xmlns="http://docbook.org/ns/docbook">DELETE</command>'>

View File

@ -0,0 +1,615 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2013-2014 OpenStack Foundation, All Rights Reserved -->
<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
<!-- You can resolve the entites with xmllint -->
<!-- -->
<!-- xmllint -noent os-layer3-ext.wadl -->
<!--*******************************************************-->
<!DOCTYPE application [<!ENTITY % common SYSTEM "common.ent">
%common;]>
<application xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:linkend="http://www.w3.org/1999/linkend"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
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/"
xml:id="os-layer3-ext-v2.0">
<resource id="version" path="v2.0/">
<resource id="Routers" type="#RouterList" path="routers">
<method href="#createRouter"/>
<resource path="{router_id}" id="router_id">
<param xmlns="http://wadl.dev.java.net/2009/02"
name="router_id" style="template"
type="csapi:UUID">
<wadl:doc
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Router ID">The UUID
of the router.</wadl:doc>
</param>
<method href="#showRouter"/>
<method href="#updateRouter"/>
<method href="#deleteRouter"/>
<resource id="add_router_interface"
path="add_router_interface">
<method href="#addRouterInterface"/>
</resource>
</resource>
<resource id="remove_router_interface"
path="remove_router_interface">
<method href="#removeRouterInterface"/>
</resource>
</resource>
</resource>
<resource id="FloatingIps" type="#FloatingIpList"
path="floatingips">
<method href="#createFloatingIp"/>
<resource path="{floatingip_id}" id="floatingip_id">
<param xmlns="http://wadl.dev.java.net/2009/02"
name="floatingip_id" style="template"
type="csapi:UUID">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN" title="Floating IP ID">The UUID
of the floating IP.</wadl:doc>
</param>
<method href="#showFloatingIp"/>
<method href="#updateFloatingIp"/>
<method href="#deleteFloatingIp"/>
</resource>
</resource>
</resources>
<resource_type id="RouterList">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Router list">
<para>A list of routers.</para>
</wadl:doc>
<method href="#listRouters"/>
</resource_type>
<!--*******************************************************-->
<!-- All Methods -->
<!--*******************************************************-->
<method name="GET" id="listRouters">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="List routers">
<para role="shortdesc">Lists logical routers that are
accessible to the tenant who submits the
request.</para>
<para>Default policy settings return only those routers
that are owned by the tenant who submits the request,
unless an admin user submits the request.</para>
<para>This example request lists routers in JSON
format:</para>
<programlisting>GET /v2.0/routers
Accept: application/json</programlisting>
<para>Use the <code>fields</code> query parameter to
control which fields are returned in the response
body. 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"> &statusParameter;
&external-gateway-infoParameter; &nameParameter;
&admin-state-upParameter; &tenant-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/routers-get-resp.json"/>
</wadl:doc>
</representation>
</response> &fault401; </method>
<method name="POST" id="createRouter">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Create router">
<para role="shortdesc">Creates a logical router.</para>
<para>This operation creates a new logical router. When it
is created, a logical router does not have any
internal interface; it is not associated to any
subnet. You can optionally specify an external gateway
for a router at create time. The external gateway for
the router must be plugged into an external network.
An external network has its extended field
<code>router:external</code> set to true. To
specify an external gateway, the identifier of the
external network must be passed in the
<code>external_gateway_info</code> attribute in
the request body, as follows:</para>
<programlisting language="json">"external_gateway_info" :
{
"network_id": &lt;external_network_uuid&gt;
}</programlisting>
</wadl:doc>
<request> &routerParameter; &nameParameter;
&admin-state-upParameter; <representation
mediaType="application/json" element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-post-req.json"/>
</wadl:doc>
</representation>
</request>
<response status="201"> &routerParameter; &statusParameter;
&external-gateway-infoParameter; &nameParameter;
&admin-state-upParameter; &tenant-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-post-resp.json"/>
</wadl:doc>
</representation>
</response> &fault400; &fault401; </method>
<method name="GET" id="showRouter">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Show router details">
<para role="shortdesc">Shows details for a specified
router.</para>
<para>This example request shows details for a router in
JSON format:</para>
<programlisting>GET /v2.0/routers/{router_id}
Accept: application/json</programlisting>
<para>Use the <code>fields</code> query parameter to
control which fields are returned in the response
body. 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"> &routersParameter; &statusParameter;
&external-gateway-infoParameter; &nameParameter;
&admin-state-upParameter; &tenant-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/routers-get-detail-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault401; &fault403; &fault404; </method>
<method name="PUT" id="updateRouter">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Update router">
<para role="shortdesc">Updates a logical router.</para>
<para>You can update the name, administrative state, and
the external gateway. For more information about how
to set the external gateway for a router, see the
create router operation. This operation does not
enable the update of router interfaces. To update a
router, use the add router interface and remove router
interface operations.</para>
<para>This example updates the external gateway
information for a router:</para>
<programlisting>PUT /v2.0/routers/{router_id}
Accept: application/json</programlisting>
</wadl:doc>
<request> &routersParameter; &statusParameter;
&external-gateway-infoParameter; &nameParameter;
&admin-state-upParameter; &tenant-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-put-update.req.json"
/>
</wadl:doc>
</representation>
</request>
<response status="200"> &routerParameter; &statusParameter;
&external-gateway-infoParameter; &nameParameter;
&admin-state-upParameter; &tenant-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-put-update-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault400; &fault401; &fault404; </method>
<method name="DELETE" id="deleteRouter">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Delete router">
<para role="shortdesc">Deletes a logical router and, if
present, its external gateway interface.</para>
<para>This operation fails if the router has attached
interfaces.</para>
<para>Use the remove router interface operation to remove
all router interfaces before you delete the
router.</para>
<para>This example deletes a router:</para>
<programlisting>DELETE /v2.0/routers/{router_id}
Accept: application/json</programlisting></wadl:doc>
<response status="204"/> &fault401; &fault404;
&fault409conflict; </method>
<method name="PUT" id="addRouterInterface">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Add interface to router">
<para role="shortdesc">Adds an internal interface to a
logical router.</para>
<para>This operation attaches a subnet to an internal
router interface. You must specify either a subnet or
port ID in the request body. If you specify both IDs,
the operation returns a <code>400 Bad Request</code>
error.</para>
<para>If you specify a subnet ID in the request body, the
gateway IP address for the subnet is used to create
the router interface.</para>
<para>If you specify a port ID in the request body, the IP
address associated with the port is used to create the
router interface.</para>
<para>The operation returns a <code>400 Bad Request</code>
error if several IP addresses are associated with the
specified port, or if no IP address is associated with
the port.</para><para>The operation returns a
<code>409 Conflict</code> error if the port is
already used.</para>
<para>The port ID that is returned by this operation can
either be the same ID passed in the request body or
the ID of a new port created by this operation to
attach the specified subnet to the router. After you
run this operation, the device ID of this port is set
to the router ID, and the <code>device_owner</code>
attribute is set to
<code>network:router_interface</code>, as shown in
this example:</para>
<programlisting language="json">{
"port":{
"status":"ACTIVE",
"name":"",
"admin_state_up":true,
"network_id":"5307648b-e836-4658-8f1a-ff7536870c64",
"tenant_id":"6b96ff0cb17a4b859e1e575d221683d3",
"device_owner":"network:router_interface",
"mac_address":"fa:16:3e:f7:d1:9c",
"fixed_ips":[
{
"subnet_id":"a2f1f29d-571b-4533-907f-5803ab96ead1",
"ip_address":"10.1.1.1"
}
],
"id":"3a44f4e5-1694-493a-a1fb-393881c673a4",
"device_id":"7177abc4-5ae9-4bb7-b0d4-89e94a4abf3b"
}</programlisting>
</wadl:doc>
<request> &routerParameter; &nameParameter;
&admin-state-upParameter; <representation
mediaType="application/json" element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-add-interface.req.json"
/>
</wadl:doc>
</representation>
</request>
<response status="200"> &subnet-idParameter;
&port-idParameter; <representation
mediaType="application/json" element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-add-interface-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault400; &fault401; &fault404;
&fault409;</method>
<method name="PUT" id="removeRouterInterface">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Remove interface from router">
<para role="shortdesc">Removes an internal interface from
a logical router.</para>
<para>This operation removes an internal router interface,
which detaches a subnet from the router. You must
specify either a subnet ID or port ID in the request
body; this value is used to identify the router
interface to remove.</para>
<para>You can also specify both a subnet ID and port ID.
If you specify both IDs, the subnet ID must correspond
to the subnet ID of the first IP address on the port
specified by the port ID. Otherwise, the operation
returns a <code>409 Conflict</code> error. The
response contains information about the affected
router and interface.</para>
<para>The operation returns a <code>404 Not Found</code>
if the router or the subnet and port do not exist or
are not visible to you. As a consequence of this
operation, the port connecting the router with the
subnet is removed from the subnet for the
network.</para>
<para>This example removes an interface from a
router:</para>
<programlisting>PUT /v2.0/routers/{router_id}/remove_router_interface
Accept: application/json</programlisting>
</wadl:doc>
<request> &subnet-idParameter; &port-idParameter;
<representation mediaType="application/json"
element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-remove-interface-req.json"
/>
</wadl:doc>
</representation>
</request>
<response status="200"> &idParameter; &tenant-idParameter;
&port-idParameter; &subnet-idParameter; <representation
mediaType="application/json" element="csapi:router">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/router-remove-interface-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault400; &fault401; &fault404; &fault409; </method>
<method name="GET" id="listFloatingIps">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="List floating IPs">
<para role="shortdesc">Lists floating IPs that are
accessible to the tenant who submits the
request.</para>
<para>Default policy settings return only those floating
IPs that are owned by the tenant who submits the
request, unless an admin user submits the
request.</para>
<para>This example request lists floating IPs in JSON
format:</para>
<programlisting>GET /v2.0/floatingips
Accept: application/json</programlisting>
<para>Use the <code>fields</code> query parameter to
control which fields are returned in the response
body. 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"> &floating-ipsParameter;
&router-idParameter; &tenant-idParameter;
&floating-network-idParameter; &fixed-ip-addressParameter;
&floating-ip-addressParameter; &port-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/floating-ips-get-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault401; </method>
<method name="POST" id="createFloatingIp">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Create floating IP">
<para role="shortdesc">Creates a floating IP, and, if you
specify port information, associates the floating IP
with an internal port.</para>
<para>If you do not specify port information in the
request, you can issue an &PUT; request.</para>
<para>You can create floating IPs on external networks
only. If you specify a network that is not external,
such as <code>router:external=False</code>, the
operation returns a <code>400</code> error.</para>
<para>If you do not specify a floating IP address in the
request, the operation automatically allocates an
address for the floating IP. If the requested floating
IP address does not fall in the subnet range for the
external network, the operation returns a
<code>400</code> error. If the requested floating
IP address is already in use, the operation returns a
<code>409</code> error code.</para>
<para>You can associate the floating IP with an internal
port by using the port ID attribute in the request
body. If you specify a port ID that is not valid, the
operation returns a <code>404</code> error
code.</para>
<para>You must configure an IP address with the internal
OpenStack Networking port associated with the floating
IP or the operation returns a <code>400</code> error
code. Because an OpenStack Networking port might be
associated with multiple IP addresses, you can use the
<code>fixed_ip_address</code> attribute in the
request body to associate a particular IP address with
the floating IP.</para>
<para>By default, this operation associates the floating
IP with a single IP address that is configured on a
port. Therefore, if a port has multiple IP addresses,
you must specify the <code>fixed_ip_address</code>
attribute.</para>
<para>If you specify an IP address that is not valid in
the <code>fixed_ip_address</code> attribute, the
operation returns a <code>400</code> error code. If
the internal OpenStack Networking port and specified
IP address are already associated with another
floating IP, the operation returns a <code>409</code>
error code.</para>
</wadl:doc>
<request> &floating-ipParameter; &router-idParameter;
&tenant-idParameter; &floating-network-idParameter;
&fixed-ip-addressParameter; &floating-ip-addressParameter;
&port-idParameter; &idParameter; <representation
mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/floatingip-post-req.json"/>
</wadl:doc>
</representation>
</request>
<response status="200"> &floating-ipParameter;
&router-idParameter; &tenant-idParameter;
&floating-network-idParameter; &fixed-ip-addressParameter;
&floating-ip-addressParameter; &port-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/floatingip-post-resp.json"/>
</wadl:doc>
</representation>
</response> &fault400; &fault401; &fault409; </method>
<method name="GET" id="showFloatingIp">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Show floating IP details">
<para role="shortdesc">Shows details for a specified
floating IP.</para>
<para>Use the <code>fields</code> query parameter to
control which fields are returned in the response
body. 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>
<para>This example request shows details for a floating IP
in JSON format. This example also filters the result
by the <code>fixed_ip_address</code> and
<code>floating_ip_address</code> fields.</para>
<programlisting>GET /v2.0/floatingips/{floatingip_id}?fields=fixed_ip_address&amp;fields=floating_ip_address
Accept: application/json</programlisting>
</wadl:doc>
<response status="200"> &floating-ipParameter;
&router-idParameter; &tenant-idParameter;
&floating-network-idParameter; &fixed-ip-addressParameter;
&floating-ip-addressParameter; &port-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/floatingip-get-detail-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault401; &fault403; &fault404; </method>
<method name="PUT" id="updateFloatingIp">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Update floating IP">
<para role="shortdesc">Updates a floating IP and its
association with an internal port.</para>
<para>The association process is the same as the process
for the create floating IP operation.</para>
<para>To disassociate a floating IP from a port, set the
<code>port_id</code> attribute to null or omit it
from the request body.</para>
<para>This example updates a floating IP:</para>
<programlisting>PUT /v2.0/floatingips/{floatingip_id}
Accept: application/json</programlisting>
<para>Depending on the request body that you submit, this
request associates a port with or disassociates a port
from a floating IP.</para>
</wadl:doc>
<request> &port-idParameter; <representation
mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN"
title="Update floating IP (associate port): JSON">
<xsdxt:code
href="api_samples/floatingip-put-update.req.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN"
title="Update floating IP (disassociate port): JSON">
<xsdxt:code
href="api_samples/floatingip-put-disassociate-update.req.json"
/>
</wadl:doc>
</representation>
</request>
<response status="200"> &floating-ipParameter;
&router-idParameter; &tenant-idParameter;
&floating-network-idParameter; &fixed-ip-addressParameter;
&floating-ip-addressParameter; &port-idParameter;
&idParameter; <representation mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN"
title="Update floating IP (associate port): JSON">
<xsdxt:code
href="api_samples/floatingip-put-update-resp.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/json"
element="csapi:floatingip">
<wadl:doc
xmlns:wadl="http://wadl.dev.java.net/2009/02"
xmlns="http://docbook.org/ns/docbook"
xml:lang="EN"
title="Update floating IP (disassociate port): JSON">
<xsdxt:code
href="api_samples/floatingip-put-disassociate-update-resp.json"
/>
</wadl:doc>
</representation>
</response> &fault400; &fault401; &fault404; &fault409; </method>
<method name="DELETE" id="deleteFloatingIp">
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
title="Delete floating IP">
<para role="shortdesc">Deletes a floating IP and, if
present, its associated port.</para>
<para>This example deletes a floating IP:</para>
<programlisting>DELETE /v2.0/floatingips/{floatingip_id}
Accept: application/json</programlisting></wadl:doc>
<response status="204"/> &fault401; &fault404; </method>
</application>