Skip to content

Commit

Permalink
Add the quotas extension to Networking API v2.0, plus clean-up of net…
Browse files Browse the repository at this point in the history
…works, subnets, and ports wadls

Closes-Bug: #1057530

Change-Id: I195a353cbc63896e57ed7726d072ae5fe281994b
author: diane fleming
  • Loading branch information
dian4554 committed Oct 7, 2013
1 parent 6d89b83 commit 2636879
Show file tree
Hide file tree
Showing 23 changed files with 2,636 additions and 361 deletions.
63 changes: 10 additions & 53 deletions api-ref/src/docbkx/api-ref-networking.xml
Expand Up @@ -28,23 +28,7 @@
<para/>
</legalnotice>
</info>
<!-- <preface xml:id="networking_Overview">
<title>OpenStack Networking APIs and Extensions Reference</title>
<para>Use the following OpenStack APIs in your OpenStack
cloud. You must install the packages for each API
separately. After you authenticate through the <link
xlink:href="api-ref-identity.html">Identity Service
API</link>, you can use the other APIs and
extensions.</para>
<para>To get started with the APIs, see the <link
xlink:href="http://docs.openstack.org/api/quick-start/content/"
>OpenStack API Quick Start</link>. For detailed
information, see <link
xlink:href="http://docs.openstack.org/api/openstack-network/2.0/content/"
><citetitle>OpenStack Networking API
Reference</citetitle></link>.</para>
<para>&nbsp;</para>
</preface> -->

<chapter xml:id="netconn-api">
<title>Networking API v2.0</title>
<para>Provides virtual networking services among devices that are
Expand All @@ -57,58 +41,31 @@
IP address.</para>
<section xml:id="networks">
<title>Networks</title>
<para>Lists, creates, deletes, and updates neutron
<para>Lists, shows information for, creates, updates, and deletes
networks.</para>
<wadl:resources href="../wadls/netconn-api/src/os-networks.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="subnets">
<title>Subnets</title>
<para>Lists, creates, removes, and updates subnet
<para>Lists, shows information for, creates, updates, and deletes subnet
resources.</para>
<wadl:resources href="../wadls/netconn-api/src/os-subnets.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
<section xml:id="ports">
<title>Ports</title>
<para>Lists, creates, removes, and updates ports.</para>
<para>Lists, shows information for, creates, updates, and deletes ports.</para>
<wadl:resources href="../wadls/netconn-api/src/os-ports.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
</chapter>
<chapter xml:id="netconn-api-provider-ext">
<title>Networking API v2.0 Extensions</title>
<section xml:id="provider-overview">
<title>Provider Extension for Networks and Ports</title>
<para>The <parameter>provider</parameter> extended attributes
for networks and ports enables administrative users to specify
how network and port objects map to the underlying networking
infrastructure. These extended attributes also appear when
administrative users query networks or ports.</para>
<para>The technology back end of the particular plug-in
determines the semantics of these attributes. To understand
which values to specify for each attribute when you deploy
OpenStack Networking with a particular plug-in, see the
plug-in documentation and the <link
xlink:href="http://docs.openstack.org/grizzly/openstack-network/admin/content/"
><citetitle>OpenStack Networking Administration
Guide</citetitle></link>. The following examples use the
Open vSwitch plug-in.</para>
<note>
<para>The default policy settings enable only administrative
users to specify and view these attributes. If you cannot
see these attributes in a &GET;
<code>/networks/&lt;network-id&gt;</code> or &GET;
<code>/ports/&lt;port-id&gt;</code> operation, you do not
have administrative privileges.</para>
</note>
<para>Use the <parameter>provider</parameter> extended
attributes to get information about, create, and update
networks and ports.</para>
<wadl:resources
href="../wadls/netconn-api/src/os-networks-provider-ext.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
<wadl:resources href="../wadls/netconn-api/src/os-ports-provider-ext.wadl"
<chapter xml:id="netconn-api-ext">
<title>Networking API v2.0 Extensions</title>
<section xml:id="quotas">
<title>Quotas Extension</title>
<para>Lists, shows information for, updates, and resets quotas.</para>
<wadl:resources href="../wadls/netconn-api/src/os-quotas.wadl"
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
</section>
</chapter>
Expand Down
10 changes: 10 additions & 0 deletions api-ref/src/wadls/netconn-api/src/api_samples/quotas-list-res.json
@@ -0,0 +1,10 @@
{
"quotas": [{
"subnet": 10,
"network": 10,
"floatingip": 50,
"tenant_id": "b7445f221cda4f4a8ac7db6b218b1339",
"router": 10,
"port": 30
}]
}
@@ -0,0 +1,9 @@
{
"quota": {
"subnet": 40,
"router": 50,
"network": 10,
"floatingip": 30,
"port": 30
}
}
@@ -0,0 +1,9 @@
{
"quota": {
"subnet": 40,
"router": 50,
"port": 30,
"network": 10,
"floatingip": 30
}
}
@@ -0,0 +1,9 @@
{
"quota": {
"subnet": 10,
"router": 10,
"port": 50,
"network": 10,
"floatingip": 50
}
}
21 changes: 15 additions & 6 deletions api-ref/src/wadls/netconn-api/src/common.ent
@@ -1,10 +1,13 @@
<!--


<!--
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>
Expand All @@ -30,6 +33,7 @@
</response>
<response status="413" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:overLimit"/>

<representation mediaType="application/json"/>
</response>
'>
Expand All @@ -39,7 +43,9 @@
<!ENTITY getFaults
'
<response status="404" xmlns="http://wadl.dev.java.net/2009/02">

<representation mediaType="application/xml" element="csapi:itemNotFound"/>

<representation mediaType="application/json"/>
</response>
'>
Expand All @@ -49,12 +55,14 @@
<!ENTITY postPutFaults
'
<response status="415" xmlns="http://wadl.dev.java.net/2009/02">

<representation mediaType="application/xml" element="csapi:badMediaType"/>
<representation mediaType="application/json"/>
</response>'>
<!ENTITY rebootFaults
'<response status="422" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:HTTPUnprocessableEntity"/>

<representation mediaType="application/json"/>
</response>
'>
Expand All @@ -64,7 +72,9 @@
<!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>
'>
Expand All @@ -75,12 +85,9 @@
<!ENTITY inProgressFault
'
<response status="409" xmlns="http://wadl.dev.java.net/2009/02">
<representation mediaType="application/xml" element="csapi:buildInProgress"/>
<representation mediaType="application/json"/>
</response>
'>

<!-- Image List Parameters -->
<representation mediaType="application/xml" element="osapi:buildInProgress"/>
'>

<!ENTITY networkListParameters
'
Expand Down Expand Up @@ -157,12 +164,14 @@
<param xmlns="http://wadl.dev.java.net/2009/02" name="limit" style="query" required="false" type="xsd:int"><doc><p xmlns="http://www.w3.org/1999/xhtml">Integer value for the limit of values to return.</p></doc></param>
<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>

'>

<!-- Flavor List Parameters -->

<!ENTITY flavorListParameters
'

<param xmlns="http://wadl.dev.java.net/2009/02" name="changes-since" style="query" required="false" type="xsd:dateTime"><doc><p xmlns="http://www.w3.org/1999/xhtml">A time/date stamp for when the flavor last changed.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="minDisk" style="query" required="false" type="xsd:int"><doc><p xmlns="http://www.w3.org/1999/xhtml">Integer value for the minimum disk space in GB so you can filter results.</p></doc></param>
<param xmlns="http://wadl.dev.java.net/2009/02" name="minRam" style="query" required="false" type="xsd:int"><doc><p xmlns="http://www.w3.org/1999/xhtml">Integer value for the minimum RAM so you can filter results.</p></doc></param>
Expand Down
94 changes: 54 additions & 40 deletions api-ref/src/wadls/netconn-api/src/os-networks.wadl
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- (C) 2013 OpenStack Foundation, All Rights Reserved -->

<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
Expand Down Expand Up @@ -29,38 +31,44 @@
<!--*******************************************************-->

<resources base="https://neutron.example.com/">
<resource id="version" type="#VersionDetails" path="v2.0">
<resource id="Networks" type="#NetworkList"
path="networks">
<method href="#listNetworks"/>
<method href="#createNetwork"/>
<resource path="{network_id}">
<param name="network_id" style="template"
type="csapi:UUID">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml"
xml:lang="EN" title="Network ID">
<p>The UUID for the network of interest to
you.</p>
</wadl:doc>
</param>
<method href="#showNetwork"/>
<method href="#updateNetwork"/>
<method href="#deleteNetwork"/>
</resource>

<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="Networks" type="#NetworkList" path="networks">
<method href="#listNetworks" />
<method href="#createNetwork" />
<resource path="{network_id}">
<param name="network_id" style="template" type="csapi:UUID">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Network ID">
<p>The UUID for the network of interest to you.</p></wadl:doc>
</param>
<method href="#showNetwork"/>
<method href="#updateNetwork"/>
<method href="#deleteNetwork"/>
</resource>
</resource>
</resource>
</resource>
</resources>



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

<method name="GET" id="listNetworks">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN"
title="List Networks">
<p xmlns="http://www.w3.org/1999/xhtml"> Lists a summary
of all networks defined in neutron that are accessible
to the tenant who submits the request. </p>
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="List Networks">
<p xmlns="http://www.w3.org/1999/xhtml">
Lists networks to which the specified tenant has access.
</p>
</wadl:doc>
<response status="200"> &networkListParameters;
<representation mediaType="application/json">
Expand All @@ -79,10 +87,11 @@
</method>

<method name="POST" id="createNetwork">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN"
title="Create Network">
<p xmlns="http://www.w3.org/1999/xhtml"> Creates a neutron
network. </p>
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Create Network">
<p xmlns="http://www.w3.org/1999/xhtml">
Creates a network.
</p>

</wadl:doc>
<request> &networkCreateParameters; <representation
mediaType="application/json">
Expand Down Expand Up @@ -115,10 +124,12 @@
</method>

<method name="GET" id="showNetwork">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN"
title="Show Networks">
<p xmlns="http://www.w3.org/1999/xhtml"> Lists detailed
information for the specified network ID. </p>

<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Show Networks">
<p xmlns="http://www.w3.org/1999/xhtml">
Shows information for the specified network.
</p>

</wadl:doc>
<response status="200"> &networkListParameters;
<representation mediaType="application/json">
Expand All @@ -139,11 +150,12 @@
</method>

<method name="PUT" id="updateNetwork">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN"
title="Update Network">
<p xmlns="http://www.w3.org/1999/xhtml"> Updates the name
of the specified network. </p>
</wadl:doc>

<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Update Network">
<p xmlns="http://www.w3.org/1999/xhtml">
Updates the specified network.
</p>
</wadl:doc>
<request> &networkCreateParameters; <representation
mediaType="application/json">
<doc xml:lang="EN">
Expand Down Expand Up @@ -179,10 +191,12 @@
</method>

<method name="DELETE" id="deleteNetwork">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN"
title="Delete Network">
<p xmlns="http://www.w3.org/1999/xhtml"> Deletes the
specified network and associated resources. </p>

<wadl:doc xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" title="Delete Network">
<p xmlns="http://www.w3.org/1999/xhtml">
Deletes the specified network and its associated resources.
</p>

</wadl:doc>
<response status="204"/>
</method>
Expand Down

0 comments on commit 2636879

Please sign in to comment.