Add provider multi extension

Closes-Bug: #1226279

Change-Id: I21462e521d56e50fc1761e416cddd5c7e223bbe8
author: diane fleming
This commit is contained in:
Diane Fleming 2014-04-15 22:31:22 -04:00
parent 49a00ab385
commit 9accdede20
3 changed files with 77 additions and 281 deletions

View File

@ -58,6 +58,7 @@
the source code tree.</para> the source code tree.</para>
<xi:include href="section_neutron_list-extensions.xml"/> <xi:include href="section_neutron_list-extensions.xml"/>
<xi:include href="section_neutron-provider-ext.xml"/> <xi:include href="section_neutron-provider-ext.xml"/>
<xi:include href="section_neutron-multi-provider-ext.xml"/>
<xi:include href="section_neutron_binding_ext_ports.xml"/> <xi:include href="section_neutron_binding_ext_ports.xml"/>
<xi:include href="section_neutron-l3-ext.xml"/> <xi:include href="section_neutron-l3-ext.xml"/>
<xi:include href="section_neutron-extgwmodes-ext.xml"/> <xi:include href="section_neutron-extgwmodes-ext.xml"/>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section [
]>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="provider_multi_ext_ops">
<title>Network API operations with multiple provider
extension</title>
<para>Set and retrieve the multiple provider networks extension
attributes for network objects.</para>
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
<wadl:resource
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks-multi-provider-ext.wadl#Networks">
<wadl:method href="#createNetwork"/>
</wadl:resource>
<wadl:resource
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks-multi-provider-ext.wadl#network_id">
<wadl:method href="#showNetwork"/>
</wadl:resource>
</wadl:resources>
</section>

View File

@ -1,39 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book[ <!DOCTYPE section [
<!-- Some useful entities borrowed from HTML -->
<!ENTITY ndash "&#x2013;">
<!ENTITY mdash "&#x2014;">
<!ENTITY hellip "&#x2026;">
<!ENTITY plusmn "&#xB1;">
<!-- 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 CHECK '<inlinemediaobject xmlns="http://docbook.org/ns/docbook">
<imageobject role="fo">
<imagedata fileref="figures/Check_mark_23x20_02.svg"
format="SVG" scale="60"/>
</imageobject>
<imageobject role="html">
<imagedata fileref="../figures/Check_mark_23x20_02.png"
format="PNG" />
</imageobject>
</inlinemediaobject>'>
<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook">
<imageobject role="fo">
<imagedata fileref="figures/Arrow_east.svg"
format="SVG" scale="60"/>
</imageobject>
<imageobject role="html">
<imagedata fileref="../figures/Arrow_east.png"
format="PNG" />
</imageobject>
</inlinemediaobject>'>
<!ENTITY APIv2 'Networking API v2.0'>
]> ]>
<section xml:id="provider_ext" xmlns="http://docbook.org/ns/docbook" <section xml:id="provider_ext" xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
@ -51,53 +17,50 @@
attributes prefixed with the <emphasis role="italic" attributes prefixed with the <emphasis role="italic"
>provider</emphasis> prefix, which specify these >provider</emphasis> prefix, which specify these
attributes.</para> attributes.</para>
<?hard-pagebreak?>
<section xml:id="provider_ext_concepts"> <section xml:id="provider_ext_concepts">
<title>Concepts</title> <title>Concepts</title>
<para>The provider networks extension is an attribute <para>The provider networks extension is an attribute
extension which adds the following set of attributes to extension which adds the following set of attributes to
the <emphasis role="bold">network</emphasis> the <emphasis role="bold">network</emphasis>
resource:</para> resource:</para>
<para> <itemizedlist>
<itemizedlist> <listitem>
<listitem> <para><emphasis role="italic">
<para><emphasis role="italic"> provider:network_type</emphasis> - Specifies
provider:network_type</emphasis> - the nature of the physical network mapped to this
Specifies the nature of the physical network network resource. Examples are
mapped to this network resource. Examples are <literal>flat</literal>,
<literal>flat</literal>, <literal>vlan</literal>, or
<literal>vlan</literal>, or <literal>gre</literal>.</para>
<literal>gre</literal>.</para> </listitem>
</listitem> <listitem>
<listitem> <para><emphasis role="italic">
<para><emphasis role="italic"> provider:physical_network</emphasis> -
provider:physical_network</emphasis> - Identifies the physical network on top of which
Identifies the physical network on top of this network object is being implemented. The
which this network object is being OpenStack Networking API does not expose any
implemented. The OpenStack Networking API does facility for retrieving the list of available
not expose any facility for retrieving the physical networks. As an example, in the Open
list of available physical networks. As an vSwitch plug-in this is a symbolic name which is
example, in the Open vSwitch plug-in this is a then mapped to specific bridges on each compute
symbolic name which is then mapped to specific host through the Open vSwitch plug-in
bridges on each compute host through the Open configuration file.</para>
vSwitch plug-in configuration file.</para> </listitem>
</listitem> <listitem>
<listitem> <para><emphasis role="italic">
<para><emphasis role="italic"> provider:segmentation_id</emphasis> -
provider:segmentation_id</emphasis> - Identifies an isolated segment on the physical
Identifies an isolated segment on the physical network; the nature of the segment depends on the
network; the nature of the segment depends on segmentation model defined by
the segmentation model defined by <literal>network_type</literal>. For instance,
<literal>network_type</literal>. For if <literal>network_type</literal> is
instance, if <literal>network_type</literal> <literal>vlan</literal>, then this is a
is <literal>vlan</literal>, then this is a <literal>vlan</literal> identifier; otherwise,
<literal>vlan</literal> identifier; if <literal>network_type</literal> is
otherwise, if <literal>network_type</literal> <literal>gre</literal>, then this will be a
is <literal>gre</literal>, then this will be a <literal>gre</literal> key.</para>
<literal>gre</literal> key.</para> </listitem>
</listitem> </itemizedlist>
</itemizedlist>
</para>
<para>The actual semantics of these attributes depend on the <para>The actual semantics of these attributes depend on the
technology back end of the particular plug-in. See the technology back end of the particular plug-in. See the
plug-in documentation and the <citetitle>OpenStack Cloud plug-in documentation and the <citetitle>OpenStack Cloud
@ -117,212 +80,22 @@
implies the user submitting the request is not authorized implies the user submitting the request is not authorized
to view or manipulate provider network attributes.</para> to view or manipulate provider network attributes.</para>
</section> </section>
<?hard-pagebreak?>
<section xml:id="provider_ext_ops"> <section xml:id="provider_ext_ops">
<title>Network API operations with provider network <title>Network API operations with provider extension</title>
extension</title> <para>Set and retrieve the provider extension attributes for
<para>This section discusses operations for setting and
retrieving the provider networks extension attributes for
network objects.</para> network objects.</para>
<!-- <wadl:resources <wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks-provider-ext.wadl" <wadl:resource
xmlns:wadl="http://wadl.dev.java.net/2009/02"/> --> href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks-provider-ext.wadl#Networks">
<section xml:id="provider_network_list"> <wadl:method href="#listNetworks"/>
<title>List Networks</title> <wadl:method href="#createNetwork"/>
<para> </wadl:resource>
<informaltable rules="all" width="100%"> <wadl:resource
<col width="20%"/> href="http://git.openstack.org/cgit/openstack/api-site/plain/api-ref/src/wadls/netconn-api/src/os-networks-provider-ext.wadl#network_id">
<col width="20%"/> <wadl:method href="#showNetwork"/>
<col width="60%"/> <wadl:method href="#updateNetwork"/>
<thead> <wadl:method href="#deleteNetwork"/>
<tr> </wadl:resource>
<td>Verb</td> </wadl:resources>
<td>URI</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>&GET;</td>
<td>/networks</td>
<td>Returns a list of networks with their
provider networks attributes.</td>
</tr>
</tbody>
</informaltable>
</para>
<para>Normal Response Code: 200 OK</para>
<para>Error Response Codes: 401 Unauthorized</para>
<para>This operation returns, for each network, its
provider network attributes as well as all the
attributes normally returned by the list networks
operation. Provider networks
attribute are returned only if the user is authorized
to view them.</para>
<example>
<title>List Networks with provider attributes: JSON
Response</title>
<programlisting language="json"><xi:include href="samples/networks-get-res-prov.json" parse="text"/></programlisting>
</example>
<example>
<title>List Networks with provider attributes: XML
Response</title>
<programlisting language="json"><xi:include href="samples/networks-get-res-prov.xml" parse="text"/></programlisting>
</example>
</section>
<section xml:id="provider_network_show">
<title>Show Network</title>
<para>
<informaltable rules="all" width="100%">
<col width="10%"/>
<col width="30%"/>
<col width="60%"/>
<thead>
<tr>
<td>Verb</td>
<td>URI</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>&GET;</td>
<td>/networks/<parameter>network_id</parameter></td>
<td>Returns details about a specific
network, including provider networks
attributes.</td>
</tr>
</tbody>
</informaltable>
</para>
<para>Normal Response Code: 200 OK</para>
<para>Error Response Code: 401 Unauthorized, 404 Not
Found</para>
<para>When the provider networks extension is enabled, and
the user submitting the request is authorized to see
provider networks mapping, this operation returns, for
the network specified in the request URI, its provider
network attributes, as well as all the attributes
normally retuned by the show networks
operation.</para>
<example>
<title>Show network with provider attributes: JSON
Response</title>
<programlisting language="json"><xi:include href="samples/networks-show-res-prov.json" parse="text"/></programlisting>
</example>
<example>
<title>Show network with provider attributes: XML
Response</title>
<programlisting language="json"><xi:include href="samples/networks-show-res-prov.xml" parse="text"/></programlisting>
</example>
</section>
<section xml:id="provider_network_create">
<title>Create Network</title>
<para>
<informaltable rules="all" width="100%">
<col width="20%"/>
<col width="20%"/>
<col width="60%"/>
<thead>
<tr>
<td>Verb</td>
<td>URI</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>&POST;</td>
<td>/networks</td>
<td>Creates a new network and explicitly
specify attributes with the underlying
infrastructure using the provider
network extension attributes.</td>
</tr>
</tbody>
</informaltable>
</para>
<para>Normal Response Code: 200 OK</para>
<para>Error Response Code: 400 Bad Request, 401
Unauthorized, 403 Forbidden</para>
<para>When the provider networks extension is enabled, and
the user submitting the request is authorized to set
provider networks mapping, this operation allows for
specifying how a new network should be mapped on the
underlying network infrastructure.</para>
<para>If the user submitting the request is not allowed to
set provider networks attributes, a 403 Forbidden
response will be returned.</para>
<para>As stated earlier in this chapter, the semantics of
the various provider networks attribute vary with the
particular plug-in employed. The following example
shows how to create a network mapped to a specific
vlan tag (the example refers to an OpenStack
Networking deployment which uses the Open vSwitch
plug-in).</para>
<example>
<title>Create Network with provider attributes: JSON
Request</title>
<programlisting language="json"><xi:include href="samples/networks-post-req-prov.json" parse="text"/></programlisting>
</example>
<example>
<title>Create Network with provider attributes: XML
Request</title>
<programlisting language="json"><xi:include href="samples/networks-post-req-prov.xml" parse="text"/></programlisting>
</example>
</section>
<section xml:id="provider_network_update">
<title>Update Network</title>
<informaltable rules="all" width="100%">
<col width="10%"/>
<col width="30%"/>
<col width="60%"/>
<thead>
<tr>
<td>Verb</td>
<td>URI</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>&PUT;</td>
<td>/networks/<parameter>network_id</parameter></td>
<td>Updates a network, including its mapping
with the underlying infrastructure using
the provider network extension
attributes.</td>
</tr>
</tbody>
</informaltable>
<para>Normal Response Code: 200 OK</para>
<para>Error Response Code: 400 Bad Request, 401
Unauthorized, 404 Not Found, 403 Forbidden</para>
<para>When the provider networks extension is enabled, and
the user submitting the request is authorized to see
provider networks mapping, this operation allows for
specifying how an existing network should be mapped on
the underlying network infrastructure.</para>
<para>If the user submitting the request is not allowed to
set provider networks attributes, a 403 Forbidden
response will be returned.</para>
<para>As stated earlier in this chapter, the semantics of
the various provider networks attribute vary with the
particular plug-in employed. The following example
shows how to update a network in order to map it to a
flat network (such as, no vlan tag); the example
refers to an OpenStack Networking deployment that uses
the Open vSwitch plug-in.</para>
<example>
<title>Update provider attributes for a network: JSON
Request</title>
<programlisting language="json"><xi:include href="samples/networks-put-req-prov.json" parse="text"/></programlisting>
</example>
<example>
<title>Update provider attributes for a network: XML
Request</title>
<programlisting language="json"><xi:include href="samples/networks-put-req-prov.xml" parse="text"/></programlisting>
</example>
</section>
</section> </section>
</section> </section>