| Method | URI | Description |
|---|---|---|
| POST | /v2.0/networks | Creates a network. |
Normal response codes: 201
Example 4.3. Create network: JSON request
{
"network":{
"name":"sample_network",
"admin_state_up":true
}
}Example 4.4. Create network: XML request
<?xml version="1.0" encoding="UTF-8"?>
<network>
<name>sample_network2</name>
</network>
This operation does not require a request body.
Example 4.5. Create network: JSON response
{
"network":{
"status":"ACTIVE",
"subnets":[
],
"name":"net1",
"admin_state_up":true,
"tenant_id":"9bacb3c5d39d41a79512987f338cf177",
"segments":[
{
"provider:segmentation_id":2,
"provider:physical_network":"8bab8453-1bc9-45af-8c70-f83aa9b50453",
"provider:network_type":"vlan"
},
{
"provider:segmentation_id":null,
"provider:physical_network":"8bab8453-1bc9-45af-8c70-f83aa9b50453",
"provider:network_type":"stt"
}
],
"shared":false,
"port_security_enabled":true,
"id":"4e8e5957-649f-477b-9e5b-f1f75b21c03c"
}
}Example 4.6. Create network: XML response
<?xml version='1.0' encoding='UTF-8'?>
<network 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:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>ACTIVE</status>
<subnets quantum:type="list"/>
<name>sample_network2</name>
<provider:physical_network xsi:nil="true"/>
<admin_state_up quantum:type="bool">True</admin_state_up>
<tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
<provider:network_type>local</provider:network_type>
<shared quantum:type="bool">False</shared>
<id>c220b026-ece1-4ead-873f-83537f4c9f92</id>
<provider:segmentation_id xsi:nil="true"/>
</network>
This operation does not return a response body.

