Add the port bindings provider-prefixed extended attributes

Partial-Bug: #1157159

Change-Id: I4b25011902128eba20667d9023806735581cce27
author: diane fleming
This commit is contained in:
Diane Fleming 2013-09-13 10:59:06 -05:00
parent 64cca08847
commit afdea610dc
27 changed files with 1489 additions and 426 deletions

View File

@ -35,18 +35,12 @@ format="SVG" scale="60"/>
<title>Preface</title>
<para>The OpenStack Networking project provides virtual networking services
among devices managed by the <link
xlink:href="http://wiki.openstack.org/OpenStack"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">OpenStack</link>
xlink:href="http://wiki.openstack.org/OpenStack">OpenStack</link>
compute service. </para>
<para>This document describes the features available with the
&APIv2;.</para>
<para>This document describes the
&APIv2; features.</para>
<para>We welcome feedback, comments, and bug reports at <link
xlink:href="http://bugs.launchpad.net/Neutron" xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">bugs.launchpad.net/Neutron</link>. </para>
xlink:href="http://bugs.launchpad.net/Neutron">bugs.launchpad.net/Neutron</link>.</para>
<section xml:id="Intended_Audience-d1e85">
<title>Intended Audience</title>
<para xmlns:svg="http://www.w3.org/2000/svg"
@ -58,17 +52,13 @@ format="SVG" scale="60"/>
general understanding of the OpenStack Networking
service, the OpenStack compute service, and the
integration between the two. You should also have access
to a plugin that implements the &APIv2;. </para>
to a plug-in that implements the &APIv2;.</para>
<para xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">You should also
be familiar with: </para>
<itemizedlist spacing="compact"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">
be familiar with:</para>
<itemizedlist spacing="compact">
<listitem>
<para>ReSTful web services</para>
</listitem>
@ -93,13 +83,8 @@ format="SVG" scale="60"/>
<section xml:id="Additional_Resources-d1e346">
<title>Resources</title>
<para>Use the following resources in conjunction with this
guide: <informaltable rules="all"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">
<col width="32%"/>
<col width="68%"/>
guide:</para>
<informaltable rules="all">
<thead>
<tr>
<th>Resource</th>
@ -122,7 +107,6 @@ format="SVG" scale="60"/>
>http://wiki.openstack.org/Neutron</link></td>
</tr>
</tbody>
</informaltable></para>
</informaltable>
</section>
</preface>

View File

@ -45,7 +45,7 @@
a certain agent, and OpenStack Networking schedulers will not schedule resources to
it.</para>
<para>For how to use agent management extension and OpenStack Networking schedulers feature,
see the <citetitle>OpenStack Networking Administration Guide</citetitle>.</para>
see the <citetitle>OpenStack Cloud Administrator Guide</citetitle>.</para>
<informaltable rules="all" width="100%">
<col width="20%"/>
<col width="20%"/>

File diff suppressed because it is too large Load Diff

View File

@ -35,123 +35,123 @@
xmlns:db="http://docbook.org/ns/docbook" version="5.0"
status="final" xml:id="extraroute-ext">
<title>The ExtraRoute Extension</title>
<para>
You can setup route configuration on the Router using this extension.
This extension augments the 'Router' resource by adding a new 'routes' attribute.
</para>
<para>
You can specify a set of nexthop IPs and destination CIDRs.
<para>You can set up route configuration on the Router using this
extension. This extension augments the 'Router' resource by
adding a new 'routes' attribute. </para>
<para>You can specify a set of nexthop IPs and destination CIDRs.
Note the nexthop IP must be a part of one of the subnets
router interfaces are connected to.
This is why configuration of route property is allowed only update operation on REST.
</para>
<table rules="all">
<caption>Router Attributes</caption>
<col width="20%"/>
<col width="8%"/>
<col width="10%"/>
<col width="7%"/>
<col width="15%"/>
<col width="15%"/>
<col width="25%"/>
<thead>
<tr>
<th>Attribute </th>
<th>Type </th>
<th>Required </th>
<th>CRUD<footnote xml:id="crud_extraroute">
<para>
<itemizedlist>
<listitem>
<para><emphasis role="bold"
>C</emphasis>. Use the attribute in
create operations. </para>
</listitem>
<listitem>
<para><emphasis role="bold"
>R</emphasis>. This attribute is
returned in response to show and
list operations. </para>
</listitem>
<listitem>
<para><emphasis role="bold"
>U</emphasis>. You can update the
value of this attribute.</para>
</listitem>
<listitem>
<para><emphasis role="bold"
>D</emphasis>. You can delete the
value of this attribute. </para>
</listitem>
</itemizedlist>
</para>
</footnote></th>
<th>Default Value </th>
<th>Validation Constraints </th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>routes</td>
<td>list of dict</td>
<td>No</td>
<td>U</td>
<td>None</td>
<td>List should be in this form.
[{'nexthop':IPAddress, 'destination':CIDR}]
</td>
<td>Extra route configuration</td>
</tr>
</tbody>
</table>
<section xml:id="update_extra_route">
<title>Update Extra route</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>&PUT;</td>
<td>/routers/<parameter>router_id</parameter></td>
<td>Update logical router with routes attribute.</td>
</tr>
</tbody>
</informaltable>
</para>
<para>Normal Response Code: <returnvalue>200</returnvalue>
</para>
<simpara>Error Response Codes: Unauthorized
(<errorcode>401</errorcode>), Bad Request
(<errorcode>400</errorcode>), Not Found
(<errorcode>404</errorcode>), Conflict
(<errorcode>409</errorcode>)</simpara>
<para>This operation configures extra routes on the router. Note the nexthop IP must be a
part of one of the subnets router interfaces are connected to, otherwise the server will
respond with <literal>400 Bad Request</literal>. When a validation error is detected
(e.g. format error of IP address or CIDR), the server will respond with <literal>400 Bad
Request</literal> When Neutron receives a request to delete the router interface for
subnets which are used by one or more routes, it willl respond with <literal>409
Conflict</literal>
router interfaces are connected to. This is why configuration
of route property is allowed only update operation on REST. </para>
<table rules="all">
<caption>Router Attributes</caption>
<col width="20%"/>
<col width="8%"/>
<col width="10%"/>
<col width="7%"/>
<col width="15%"/>
<col width="15%"/>
<col width="25%"/>
<thead>
<tr>
<th>Attribute </th>
<th>Type </th>
<th>Required </th>
<th>CRUD<footnote xml:id="crud_extraroute">
<para>
<itemizedlist>
<listitem>
<para><emphasis role="bold"
>C</emphasis>. Use the attribute in
create operations. </para>
</listitem>
<listitem>
<para><emphasis role="bold"
>R</emphasis>. This attribute is
returned in response to show and
list operations. </para>
</listitem>
<listitem>
<para><emphasis role="bold"
>U</emphasis>. You can update the
value of this attribute.</para>
</listitem>
<listitem>
<para><emphasis role="bold"
>D</emphasis>. You can delete the
value of this attribute. </para>
</listitem>
</itemizedlist>
</para>
</footnote></th>
<th>Default Value </th>
<th>Validation Constraints </th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>routes</td>
<td>list of dict</td>
<td>No</td>
<td>U</td>
<td>None</td>
<td>List should be in this form.
[{'nexthop':IPAddress, 'destination':CIDR}] </td>
<td>Extra route configuration</td>
</tr>
</tbody>
</table>
<section xml:id="update_extra_route">
<title>Update Extra route</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>&PUT;</td>
<td>/routers/<parameter>router_id</parameter></td>
<td>Update logical router with routes
attribute.</td>
</tr>
</tbody>
</informaltable>
</para>
<example>
<title>Update the routes attribute for a given router</title>
<programlisting language="json"><xi:include href="samples/extraroute-put-req.json" parse="text"/></programlisting>
</example>
<example>
<para>Normal Response Code: <returnvalue>200</returnvalue>
</para>
<simpara>Error Response Codes: Unauthorized
(<errorcode>401</errorcode>), Bad Request
(<errorcode>400</errorcode>), Not Found
(<errorcode>404</errorcode>), Conflict
(<errorcode>409</errorcode>)</simpara>
<para>This operation configures extra routes on the router.
The nexthop IP must be a part of one of the subnets
to which the router interfaces are connected. Otherwise, the server
responds with <literal>400 Bad Request</literal>. When
a validation error is detected, such as a format error of IP
address or CIDR, the server responds with
<literal>400 Bad Request</literal>. When Networking
receives a request to delete the router interface for
subnets that are used by one or more routes, it
responds with <literal>409 Conflict</literal>.
</para>
<example>
<title>Update the routes attribute for a given
router</title>
<programlisting language="json"><xi:include href="samples/extraroute-put-req.json" parse="text"/></programlisting>
</example>
<example>
<title>Update routes: Response</title>
<programlisting language="json"><xi:include href="samples/extraroute-put-res.json" parse="text"/></programlisting>
</example>
</section>
<?hard-pagebreak?>
</example>
</section>
<?hard-pagebreak?>
</section>

View File

@ -75,12 +75,12 @@
</listitem>
<listitem>
<para><emphasis role="bold">member</emphasis>, a representation
of the application running on backend server.
of the application running on back end server.
</para>
</listitem>
<listitem>
<para><emphasis role="bold">health_monitor</emphasis>, which is used
to determine whether or not back-end members of the pool
to determine whether or not back end members of the pool
are usable for processing traffic.
</para>
</listitem>
@ -110,32 +110,32 @@
</para>
<para>
A pool <emphasis role="bold">member</emphasis> represents the application running on the backend server.
A pool <emphasis role="bold">member</emphasis> represents the application running on the back end server.
</para>
<para>
A
<emphasis role="bold">Health Monitor</emphasis>
is used to determine whether or not back-end members of the VIP's
is used to determine whether or not back end members of the VIP's
pool are usable for processing a request. A pool can have several
health monitors associated with it. There are different types of
health monitors supported by the LBaaS extension:
health monitors supported by the LBaaS extension:</para>
<itemizedlist>
<listitem>
<para><emphasis>PING</emphasis>: used to ping the members using ICMP.</para>
<para><emphasis>PING</emphasis>: pings the members by using ICMP.</para>
</listitem>
<listitem>
<para><emphasis>TCP</emphasis>: used to connect to the members using TCP.</para>
<para><emphasis>TCP</emphasis>: connects to the members by using TCP.</para>
</listitem>
<listitem>
<para><emphasis>HTTP</emphasis>: used to send an HTTP request to the member.</para>
<para><emphasis>HTTP</emphasis>: sends an HTTP request to the member.</para>
</listitem>
<listitem>
<para><emphasis>HTTPS</emphasis>: used to send a secure HTTP request to the member.</para>
<para><emphasis>HTTPS</emphasis>: sends a secure HTTP request to the member.</para>
</listitem>
</itemizedlist>
When a pool has several monitors associated with it, each member of
<para>When a pool has several monitors associated with it, each member of
the pool is monitored by all these monitors. If any monitor
declares the member as unhealthy, then the member status is changed
to <emphasis>inactive</emphasis> and the member won't participate in its pool's load
@ -147,35 +147,32 @@
Session persistence is a feature of the load balancing service. It
attempts to force connections or requests in the same session to be
processed by the same member as long as it is active. The
LBaaS extension supports three types of persistence:
LBaaS extension supports three types of persistence:</para>
<itemizedlist>
<listitem>
<para><emphasis>SOURCE_IP</emphasis>: With this persistence
mode, all connections originating from the same source
IP address will be handled by the same member of the
IP address are handled by the same member of the
pool.
</para>
</listitem>
<listitem>
<para><emphasis>HTTP_COOKIE</emphasis>: With this
persistence mode, the load balancing function will
create a cookie on the first request from a client.
persistence mode, the load balancing function creates a cookie on the first request from a client.
Subsequent requests containing the same cookie value
will be handled by the same member of the pool.
</para>
</listitem>
<listitem>
<para><emphasis>APP_COOKIE</emphasis>: With this
persistence mode, the load balancing function will rely
on a cookie established by the backend application. All
requests carrying the same cookie value will be handled
persistence mode, the load balancing function relies
on a cookie established by the back end application. All
requests carrying the same cookie value is handled
by the same member of the pool.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<?hard-pagebreak?>
@ -185,17 +182,17 @@
<para>
The high-level task flow for using LBaaS API to configure load
balancing is as follows:
balancing is as follows:</para>
<orderedlist>
<listitem>
<para>The tenant creates a Pool, which is initially empty</para>
<para>The tenant creates a pool, which is initially empty</para>
</listitem>
<listitem>
<para>The tenant creates one or several Members in the Pool</para>
<para>The tenant creates one or several members in the pool</para>
</listitem>
<listitem>
<para>The tenant create one or several Health Monitors</para>
<para>The tenant create one or several health monitors</para>
</listitem>
<listitem>
<para>The tenant associates the Health Monitors with the Pool</para>
@ -204,7 +201,6 @@
<para>The tenant finally creates a VIP associated with the Pool</para>
</listitem>
</orderedlist>
</para>
</section>

View File

@ -63,8 +63,8 @@
the physical network on top of which this network object is being
implemented. The OpenStack Networking API does not expose any facility for retrieving the
list of available physical networks. As an example, in the Open vSwitch
plugin this is a symbolic name which is then mapped to specific bridges on
each compute host through the Open vSwitch plugin configuration file.</para>
plug-in this is a symbolic name which is then mapped to specific bridges on
each compute host through the Open vSwitch plug-in configuration file.</para>
</listitem>
<listitem>
<para><emphasis role="italic"> provider:segmentation_id</emphasis> - Identifies
@ -78,11 +78,11 @@
</listitem>
</itemizedlist>
</para>
<para>The actual semantics of these attributes depend on the technology backend of the
particular plugin. See the plugin document or the
<citetitle>OpenStack Networking Administration Guide</citetitle> to understand which values should be specific for
each of these attributes when OpenStack Networking is deployed with a particular plugin. The examples
shown in this chapter refer to the Open vSwitch plugin.</para>
<para>The actual semantics of these attributes depend on the technology back end of the
particular plug-in. See the plug-in documentation and the
<citetitle>OpenStack Cloud Administrator Guide</citetitle> to understand which values should be specific for
each of these attributes when OpenStack Networking is deployed with a particular plug-in. The examples
shown in this chapter refer to the Open vSwitch plug-in.</para>
<para>It is also worth noting that the default policy settings allow only users with
administrative rights to specify these parameters in requests, and to see their values
in responses. By default, the provider network extension attributes are completely
@ -208,9 +208,9 @@
<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 plugin employed. The following example shows how
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 plugin).</para>
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>
@ -254,9 +254,9 @@
<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 plugin employed. The following example shows how
to update a network in order to map it to a flat network (ie: no vlan tag); the
example refers to an OpenStack Networking deployment which uses the Open vSwitch plugin.</para>
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>

View File

@ -42,7 +42,7 @@
to create at most X networks, and permit tenant B to create at most Y networks.</para>
<para>If quotas per tenant is needed, you must enable the Quotas
extension. For information, see the <citetitle>OpenStack
Network Administration Guide</citetitle>.</para>
Cloud Administrator Guide</citetitle>.</para>
<informaltable rules="all" width="100%">
<col width="20%"/>
<col width="20%"/>

2
v2.0/samples/networks-get-res-prov.json Normal file → Executable file
View File

@ -23,6 +23,6 @@
"provider:network_type": "local",
"provider:physical_network": null,
"provider:segmentation_id": null
},
}
]
}

View File

@ -12,7 +12,8 @@
<id>3a06dfc7-d239-4aad-9a57-21cd171c72e5</id>
<provider:network_type>vlan</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id neutron:type="int">101</provider:segmentation_id>
<provider:segmentation_id neutron:type="int"
>101</provider:segmentation_id>
</network>
<network>
<status>ACTIVE</status>
@ -22,8 +23,7 @@
<shared neutron:type="bool">False</shared>
<id>7db8c5a4-6eb0-478d-856b-7cfda2b25e13</id>
<provider:network_type>local</provider:network_type>
<provider:physical_network xsi:nil="true" />
<provider:segmentation_id xsi:nil="true" />
<provider:physical_network xsi:nil="true"/>
<provider:segmentation_id xsi:nil="true"/>
</network>
</networks>
</networks>

View File

@ -0,0 +1,37 @@
{
"networks":[
{
"status":"ACTIVE",
"subnets":[
"a318fcb4-9ff0-4485-b78c-9e6738c21b26"
],
"name":"private",
"admin_state_up":true,
"tenant_id":"625887121e364204873d362b553ab171",
"id":"9d83c053-b0a4-4682-ae80-c00df269ce0a",
"shared":false
},
{
"status":"ACTIVE",
"subnets":[
"aca4d43c-c48c-4a2c-9bb6-ba374ef7e135"
],
"name":"nova",
"admin_state_up":true,
"tenant_id":"63878e4c5dd649d2a980e37aefddfa87",
"id":"ebda9658-093b-41ba-80ce-0cf8cb8365d4",
"shared":false
},
{
"status":"ACTIVE",
"subnets":[
"e12f0c45-46e3-446a-b207-9474b27687a6"
],
"name":"network_3",
"admin_state_up":true,
"tenant_id":"ed680f49ff714162ab3612d7876ffce5",
"id":"afc75773-640e-403c-9fff-62ba98db1f19",
"shared":true
}
]
}

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<networks xmlns="http://openstack.org/quantum/api/v2.0"
xmlns:quantum="http://openstack.org/quantum/api/v2.0"
xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<network>
<status>ACTIVE</status>
<subnets>
<subnet>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet>
</subnets>
<name>private</name>
<admin_state_up quantum:type="bool">True</admin_state_up>
<tenant_id>625887121e364204873d362b553ab171</tenant_id>
<router:external quantum:type="bool">False</router:external>
<shared quantum:type="bool">False</shared>
<id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id>
</network>
<network>
<status>ACTIVE</status>
<subnets>
<subnet>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet>
</subnets>
<name>nova</name>
<admin_state_up quantum:type="bool">True</admin_state_up>
<tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id>
<router:external quantum:type="bool">True</router:external>
<shared quantum:type="bool">False</shared>
<id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</id>
</network>
</networks>

View File

@ -7,5 +7,4 @@
"provider:physical_network": "physnet_1",
"provider:segmentation_id": 201
}
}
}

View File

@ -1,12 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/neutron/api/v2.0"
xmlns:neutron="http://openstack.org/neutron/api/v2.0"
xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<?xml version="1.0" encoding="UTF-8"?>
<network xmlns="http://openstack.org/neutron/api/v2.0" xmlns:neutron="http://openstack.org/neutron/api/v2.0" xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>net-name</name>
<admin_state_up neutron:type="bool">True</admin_state_up>
<provider:network_type>vlan</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id neutron:type="int">201</provider:segmentation_id>
</network>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<networks xmlns="http://openstack.org/quantum/api/v2.0"
xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
xmlns:quantum="http://openstack.org/quantum/api/v2.0"
xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<network>
<status>ACTIVE</status>
<subnets>
<subnet>a318fcb4-9ff0-4485-b78c-9e6738c21b26</subnet>
</subnets>
<name>private</name>
<provider:physical_network xsi:nil="true"/>
<admin_state_up quantum:type="bool">True</admin_state_up>
<tenant_id>625887121e364204873d362b553ab171</tenant_id>
<provider:network_type>local</provider:network_type>
<router:external quantum:type="bool">False</router:external>
<shared quantum:type="bool">False</shared>
<id>9d83c053-b0a4-4682-ae80-c00df269ce0a</id>
<provider:segmentation_id xsi:nil="true"/>
</network>
<network>
<status>ACTIVE</status>
<subnets>
<subnet>aca4d43c-c48c-4a2c-9bb6-ba374ef7e135</subnet>
</subnets>
<name>nova</name>
<provider:physical_network xsi:nil="true"/>
<admin_state_up quantum:type="bool">True</admin_state_up>
<tenant_id>63878e4c5dd649d2a980e37aefddfa87</tenant_id>
<provider:network_type>local</provider:network_type>
<router:external quantum:type="bool">True</router:external>
<shared quantum:type="bool">False</shared>
<id>ebda9658-093b-41ba-80ce-0cf8cb8365d4</id>
<provider:segmentation_id xsi:nil="true"/>
</network>
</networks>

View File

@ -12,4 +12,3 @@ Accept: application/xml
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id xsi:nil="true"/>
</network>

View File

@ -11,6 +11,6 @@
<id>3a06dfc7-d239-4aad-9a57-21cd171c72e5</id>
<provider:network_type>vlan</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id neutron:type="int">101</provider:segmentation_id>
<provider:segmentation_id neutron:type="int"
>101</provider:segmentation_id>
</network>

View File

@ -0,0 +1,28 @@
{
"networks": [
{
"status": "ACTIVE",
"subnets": [],
"name": "network-1",
"admin_state_up": true,
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
"id": "3a06dfc7-d239-4aad-9a57-21cd171c72e5",
"shared": false,
"provider:network_type": "vlan",
"provider:physical_network": "physnet_1",
"provider:segmentation_id": 101
},
{
"status": "ACTIVE",
"subnets": [],
"name": "network-2",
"admin_state_up": true,
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
"id": "7db8c5a4-6eb0-478d-856b-7cfda2b25e13",
"shared": false,
"provider:network_type": "local",
"provider:physical_network": null,
"provider:segmentation_id": null
},
]
}

View File

@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<networks xmlns="http://openstack.org/neutron/api/v2.0"
xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
xmlns:neutron="http://openstack.org/neutron/api/v2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<network>
<status>ACTIVE</status>
<name>network-1</name>
<admin_state_up neutron:type="bool">True</admin_state_up>
<tenant_id>c1210485b2424d48804aad5d39c61b8f</tenant_id>
<shared neutron:type="bool">False</shared>
<id>3a06dfc7-d239-4aad-9a57-21cd171c72e5</id>
<provider:network_type>vlan</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id neutron:type="int">101</provider:segmentation_id>
</network>
<network>
<status>ACTIVE</status>
<name>network-2</name>
<admin_state_up neutron:type="bool">True</admin_state_up>
<tenant_id>c1210485b2424d48804aad5d39c61b8f</tenant_id>
<shared neutron:type="bool">False</shared>
<id>7db8c5a4-6eb0-478d-856b-7cfda2b25e13</id>
<provider:network_type>local</provider:network_type>
<provider:physical_network xsi:nil="true" />
<provider:segmentation_id xsi:nil="true" />
</network>
</networks>

View File

@ -0,0 +1,11 @@
{
"network":
{
"name": "net-name",
"admin_state_up": true,
"provider:network_type": "vlan",
"provider:physical_network": "physnet_1",
"provider:segmentation_id": 201
}
}

View File

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/neutron/api/v2.0"
xmlns:neutron="http://openstack.org/neutron/api/v2.0"
xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>net-name</name>
<admin_state_up neutron:type="bool">True</admin_state_up>
<provider:network_type>vlan</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id neutron:type="int">201</provider:segmentation_id>
</network>

View File

@ -0,0 +1,13 @@
PUT /v2.0/networks/3a06dfc7-d239-4aad-9a57-21cd171c72e5.json
Content-Type: application/json
Accept: application/json
{
"network":
{
"provider:network_type": "flat",
"provider:physical_network": "physnet_1",
"provider:segmentation_id": null
}
}

View File

@ -0,0 +1,15 @@
PUT /v2.0/networks/3a06dfc7-d239-4aad-9a57-21cd171c72e5.xml
Content-Type: application/xml
Accept: application/xml
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/neutron/api/v2.0"
xmlns:neutron="http://openstack.org/neutron/api/v2.0"
xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<provider:network_type>flat</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id xsi:nil="true"/>
</network>

View File

@ -0,0 +1,15 @@
{
"network":
{
"status": "ACTIVE",
"subnets": [],
"name": "network-1",
"admin_state_up": true,
"tenant_id": "c1210485b2424d48804aad5d39c61b8f",
"id": "3a06dfc7-d239-4aad-9a57-21cd171c72e5",
"shared": false,
"provider:network_type": "vlan",
"provider:physical_network": "physnet_1",
"provider:segmentation_id": 101
}
}

View File

@ -0,0 +1,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/neutron/api/v2.0"
xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
xmlns:neutron="http://openstack.org/neutron/api/v2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>ACTIVE</status>
<name>network-1</name>
<admin_state_up neutron:type="bool">True</admin_state_up>
<tenant_id>c1210485b2424d48804aad5d39c61b8f</tenant_id>
<shared neutron:type="bool">False</shared>
<id>3a06dfc7-d239-4aad-9a57-21cd171c72e5</id>
<provider:network_type>vlan</provider:network_type>
<provider:physical_network>physnet_1</provider:physical_network>
<provider:segmentation_id neutron:type="int">101</provider:segmentation_id>
</network>

View File

@ -0,0 +1,467 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book[
<!-- 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="binding_ext_ports"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>The <literal>binding</literal> Extended Attributes for
Ports</title>
<para>Use the &APIv2; with the <parameter>binding</parameter>
extended attributes to get information about, create, and
update port objects.</para>
<para>The <parameter>binding</parameter>-prefixed extended
attributes for ports are:</para>
<table rules="all" width="95%">
<caption><parameter>binding</parameter> Extended Attributes
for Ports</caption>
<col width="30%"/>
<col width="10%"/>
<col width="10%"/>
<col width="10%"/>
<col width="10%"/>
<col width="10%"/>
<col width="20%"/>
<thead>
<tr>
<th>Attribute </th>
<th>Type </th>
<th>Required </th>
<th>CRUD<footnote xml:id="crud_network">
<para><itemizedlist>
<listitem>
<para><emphasis role="bold"
>C</emphasis>. Use the attribute in
create operations.</para>
</listitem>
<listitem>
<para><emphasis role="bold"
>R</emphasis>. This attribute is
returned in response to show and
list operations.</para>
</listitem>
<listitem>
<para><emphasis role="bold"
>U</emphasis>. You can update the
value of this attribute.</para>
</listitem>
<listitem>
<para><emphasis role="bold"
>D</emphasis>. You can delete the
value of this attribute.</para>
</listitem>
</itemizedlist></para>
</footnote></th>
<th>Default Value</th>
<th>Validation Constraints</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><para><parameter>binding:vif_type</parameter></para></td>
<td><para>String</para></td>
<td><para>N/A</para></td>
<td><para>R</para></td>
<td><para>None</para></td>
<td><para>N/A</para></td>
<td><para>Read-only. The vif type for the specified
port.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:host_id</parameter></para></td>
<td><para>uuid-str</para></td>
<td><para>N/A</para></td>
<td><para>CRU</para></td>
<td><para>None</para></td>
<td><para>N/A</para></td>
<td><para>The ID of the host where the port is
allocated. In some cases different
implementations can run on different
hosts.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:profile</parameter></para></td>
<td>list(dict)</td>
<td>N/A</td>
<td>CRU</td>
<td>None</td>
<td>N/A</td>
<td><para>A dictionary that enables the application
running on the specified host to pass and
receive vif port-specific information to the
plug-in.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:capabilities</parameter></para></td>
<td>list(dict)</td>
<td>N/A</td>
<td>R</td>
<td>None</td>
<td>N/A</td>
<td><para>Read-only. A dictionary that enables the
application to pass information about
functions that &APIv2; provides. Specify the
following value: port_filter : Boolean to
define whether &APIv2; provides port filtering
features such as security group and
anti-MAC/IP spoofing.</para></td>
</tr>
</tbody>
</table>
<section xml:id="List_Ports_binding">
<title>List Ports</title>
<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>&GET;</td>
<td>/ports</td>
<td>Lists ports to which the tenant has access.
The <parameter>binding</parameter> extended
attributes are visible to only administrative
users.</td>
</tr>
</tbody>
</informaltable>
<simpara>Normal Response Code: <returnvalue>200</returnvalue>
</simpara>
<simpara>Error Response Codes: Unauthorized
(<errorcode>401</errorcode>)</simpara>
<para>This operation lists ports to which the tenant has
access.</para>
<para>This operation does not require a request body.</para>
<para>This operation returns a response body.</para>
<para>In addition to any other fields returned in <xref
linkend="List_Ports"/> response, the following
<parameter>binding</parameter>-prefixed fields are
visible to administrative users:</para>
<informaltable rules="all">
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><para><parameter>binding:vif_type</parameter></para></td>
<td><para>Read-only. The vif type for the
specified port.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:host_id</parameter></para></td>
<td><para>The ID of the host where the port is
allocated. In some cases different
implementations can run on different
hosts.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:profile</parameter></para></td>
<td><para>A dictionary that enables the
application running on the specified host
to pass and receive vif port-specific
information to the plug-in.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:capabilities</parameter></para></td>
<td><para>Read-only. A dictionary that enables the
application to pass information about
functions that &APIv2; provides. Specify
the following value: port_filter : Boolean
to define whether &APIv2; provides port
filtering features such as security group
and anti-MAC/IP spoofing.</para>
</td>
</tr>
</tbody>
</informaltable>
</section>
<?hard-pagebreak?>
<section xml:id="Show_port_binding">
<title>Show Port</title>
<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>&GET;</td>
<td>/ports/<parameter>port-id</parameter></td>
<td>Shows information for a specified port. The
<parameter>binding</parameter> extended
attributes are visible to only administrative
users.</td>
</tr>
</tbody>
</informaltable>
<simpara>Normal Response Code: <returnvalue>200</returnvalue>
</simpara>
<simpara>Error Response Codes: Unauthorized
(<errorcode>401</errorcode>), Not Found
(<errorcode>404</errorcode>)</simpara>
<para>This operation returns information for the port
specified in the request URI. </para>
<para>This operation does not require a request body.</para>
<para>This operation returns a response body.</para>
<para>In addition to any fields returned in the <xref
linkend="Show_port"/> response, the following
<parameter>binding</parameter>-prefixed extended
attributes are visible to administrative users:</para>
<informaltable rules="all">
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><para><parameter>binding:vif_type</parameter></para></td>
<td><para>Read-only. The vif type for the
specified port.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:host_id</parameter></para></td>
<td><para>The ID of the host where the port is
allocated. In some cases different
implementations can run on different
hosts.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:profile</parameter></para></td>
<td><para>A dictionary that enables the
application running on the specified host
to pass and receive vif port-specific
information to the plug-in.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:capabilities</parameter></para></td>
<td><para>Read-only. A dictionary that enables the
application to pass information about
functions that &APIv2; provides. Specify
the following value: port_filter : Boolean
to define whether &APIv2; provides port
filtering features such as security group
and anti-MAC/IP spoofing.</para>
</td>
</tr>
</tbody>
</informaltable>
</section>
<section xml:id="Create_Port_binding">
<title>Create Port</title>
<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>/ports</td>
<td>Creates a port on a specified network. Only
administrative users can add the
<parameter>binding</parameter> extended
attributes.</td>
</tr>
</tbody>
</informaltable>
<simpara>Normal Response Code: <returnvalue>201</returnvalue>
</simpara>
<simpara>Error Response Codes: Bad Request
(<errorcode>400</errorcode>), Unauthorized
(<errorcode>401</errorcode>), Forbidden
(<errorcode>403</errorcode>), Not Found
(<errorcode>404</errorcode>), Conflict
(<errorcode>409</errorcode>), MAC generation failure
(<errorcode>503</errorcode>) </simpara>
<para>This operation creates an OpenStack Networking port. You
must specify the network where the port is to created on
the <parameter>network_id</parameter> attribute in the
request body.</para>
<para>This operation requires a request body.</para>
<para>This operation returns a response body.</para>
<para>In addition to any attributes that can be set in a <xref
linkend="Create_Port"/> operation, administrative
users can also set the following
<parameter>binding</parameter>-prefixed extended
attributes:</para>
<informaltable rules="all">
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<para><parameter>binding:host_id</parameter></para></td>
<td><para>The ID of the host where the port is
allocated. In some cases different
implementations can run on different
hosts.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:profile</parameter></para></td>
<td><para>A dictionary that enables the
application running on the specified host
to pass and receive vif port-specific
information to the plug-in.</para>
</td>
</tr>
</tbody>
</informaltable>
</section>
<section xml:id="Update_Port_binding">
<title>Update Port</title>
<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>&PUT;</td>
<td>/ports/<parameter>port-id</parameter></td>
<td>Updates a specified port. Only administrative
users can update the
<parameter>binding</parameter> extended
attributes.</td>
</tr>
</tbody>
</informaltable>
<simpara>Normal Response Code: <returnvalue>200</returnvalue>
</simpara>
<simpara>Error Response Codes: Bad Request
(<errorcode>400</errorcode>), Unauthorized
(<errorcode>401</errorcode>), Forbidden
(<errorcode>403</errorcode>), Not Found
(<errorcode>404</errorcode>), Conflict
(<errorcode>409</errorcode>) </simpara>
<para>Use this operation to update information for a
port.</para>
<para>This operation requires a request body.</para>
<para>This operation returns a response body.</para>
<para>In addition to any attributes that can be updated in
<xref linkend="Update_Port"/> operation,
administrative users can also update the following
<parameter>binding</parameter>-prefixed extended
attributes:</para>
<informaltable rules="all">
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<para><parameter>binding:host_id</parameter></para></td>
<td><para>The ID of the host where the port is
allocated. In some cases different
implementations can run on different
hosts.</para>
</td>
</tr>
<tr>
<td>
<para><parameter>binding:profile</parameter></para></td>
<td><para>A dictionary that enables the
application running on the specified host
to pass and receive vif port-specific
information to the plug-in.</para>
</td>
</tr>
</tbody>
</informaltable>
</section>
</section>

View File

@ -0,0 +1,288 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book[
<!-- 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_networks"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Network API Operations</title>
<para>Use the &APIv2; with the <parameter>provider</parameter>
extended attributes to get information about, create, and
update networks.</para>
<para>The <parameter>provider</parameter>-prefixed extended
attributes for networks are:</para>
<table rules="all">
<caption><parameter>provider</parameter> Extended Attributes
for Networks</caption>
<col width="25%"/>
<col width="75%"/>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><para><parameter>provider:network_type</parameter></para></td>
<td><para>The type of physical network that maps to
this networks resource. Examples are
<literal>flat</literal>,
<literal>vlan</literal>, <literal>vxlan</literal>, <literal>local</literal>, and
<literal>gre</literal>.</para></td>
</tr>
<tr>
<td>
<para><parameter>provider:physical_network</parameter></para></td>
<td><para>The physical network on which this network
object is implemented. The &APIv2; 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></td>
</tr>
<tr>
<td>
<para><parameter>provider:segmentation_id</parameter></para></td>
<td><para>An isolated segment on the physical network.
The <literal>network_type</literal> attribute
defines the segmentation model. For example,
if <literal>network_type</literal> is
<literal>vlan</literal>, this ID is a
<literal>vlan</literal> identifier. If
<literal>network_type</literal> is
<literal>gre</literal>, this ID is a
<literal>gre</literal> key.</para></td>
</tr>
</tbody>
</table>
<section xml:id="provider_network_list">
<title>List Networks</title>
<para>
<informaltable rules="all" width="100%">
<col width="20%"/>
<col width="21%"/>
<col width="59%"/>
<thead>
<tr>
<td>Verb</td>
<td>URI</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>&GET;</td>
<td>/networks</td>
<td>Lists networks. The
<parameter>provider</parameter>
extended attributes are visible to only
administrative users.</td>
</tr>
</tbody>
</informaltable>
</para>
<para>Normal Response Code: 200 OK</para>
<para>Error Response Codes: 401 Unauthorized</para>
<para>This operation lists network attributes including
<parameter>provider</parameter> extended attributes.
The <parameter>provider</parameter> extended attributes
are visible to only administrative users.</para>
<example>
<title>List Networks with provider extended 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 extended attributes:
XML Response</title>
<programlisting language="xml"><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>Shows information for a specified network.
The <parameter>provider</parameter>
extended attributes are visible to only
administrative users.</td>
</tr>
</tbody>
</informaltable>
</para>
<para>Normal Response Code: 200 OK</para>
<para>Error Response Code: 401 Unauthorized, 404 Not
Found</para>
<para>This operation shows information for a specified
network. The <parameter>provider</parameter> extended
attributes are visible to only administrative
users.</para>
<example>
<title>Show Network with provider extended 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 extended attributes: XML
Response</title>
<programlisting language="xml"><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 network. Only administrative
users can add the
<parameter>provider</parameter>
extended 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>This operation enables administrative users to create a
network and define how it is 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 is
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 extended 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 extended attributes:
XML Request</title>
<programlisting language="xml"><xi:include href="samples/networks-post-req-prov.xml" parse="text"/></programlisting>
</example>
</section>
<section xml:id="provider_network_update">
<title>Update 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>&PUT;</td>
<td>/networks/<parameter>network_id</parameter></td>
<td>Updates a network. Only administrative
users can update the
<parameter>provider</parameter>
extended attributes.</td>
</tr>
</tbody>
</informaltable>
</para>
<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 is
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 to map it to a flat network (such
as, the no vlan tag); the example refers to an OpenStack
Networking deployment that uses the Open vSwitch
plug-in.</para>
<example>
<title>Update Network with provider extended attributes:
JSON Request</title>
<programlisting language="json"><xi:include href="samples/networks-put-req-prov.json" parse="text"/></programlisting>
</example>
<example>
<title>Update Network with provider extended attributes:
XML Request</title>
<programlisting language="xml"><xi:include href="samples/networks-put-req-prov.xml" parse="text"/></programlisting>
</example>
</section>
</section>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<imagedata fileref="figures/Check_mark_23x20_02.svg"
format="SVG" scale="60"/>
</imageobject>
</inlinemediaobject>'>
<!ENTITY ARROW '<inlinemediaobject xmlns="http://docbook.org/ns/docbook">
<imageobject>
<imagedata fileref="figures/Arrow_east.svg"
format="SVG" scale="60"/>
</imageobject>
</inlinemediaobject>'>
<!ENTITY APIv2 'Networking API v2.0'>
]>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook" version="5.0"
status="final" xml:id="provider_extended_attrs">
<title>The <literal>provider</literal> Extended Attributes for
Networks</title>
<para>The <parameter>provider</parameter> extended attributes for
networks enables administrative users to specify how network
objects map to the underlying networking infrastructure. These
extended attributes also appear when administrative users
query networks. </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 &APIv2; with a
particular plug-in, see the plug-in documentation and the
<citetitle>OpenStack Cloud Administrator
Guide</citetitle>. 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> operation,
you do not have administrative privileges.</para>
</note>
<xi:include href="section_provider_ext_networks.xml"/>
</section>