Fix redundant sample of subnet single create

The sample of creating subnet uses the same sample as bulk create,
it should be reduced.

Updated xml sample files to include xml directive

Change-Id: Ibda1351e7461e96c8a3a80d78f180520ed401713
Closes-Bug: #1270908
This commit is contained in:
ZhiQiang Fan
2014-01-21 09:33:05 +08:00
committed by Diane Fleming
parent 01e740e079
commit ca93c5475c
35 changed files with 173 additions and 131 deletions

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<network>
<name>sample_network</name>
</network>

View File

@@ -4,7 +4,7 @@
xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>ACTIVE</status>
<subnets quantum:type="list" />
<subnets quantum:type="list"/>
<name>sample_network</name>
<tenant_id>4be6b806faa0491eb358018bbe9f0d4e</tenant_id>
<admin_state_up quantum:type="bool">True</admin_state_up>

View File

@@ -1,16 +1,20 @@
<?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:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<status>ACTIVE</status>
<subnets>
<subnet>e12f0c45-46e3-446a-b207-9474b27687a6</subnet>
</subnets>
<name>private</name>
<provider:physical_network xsi:nil="true" />
<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" />
<provider:segmentation_id xsi:nil="true"/>
</network>

View File

@@ -1,3 +1,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:router="http://docs.openstack.org/ext/quantum/router/api/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<?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:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>nova2</name>
</network>

View File

@@ -1,3 +1,4 @@
<?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"

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<networks>
<network>
<name>sample_network_1</name>

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<ports>
<port>
<name>test_port_1</name>

View File

@@ -1,6 +0,0 @@
<port
id="98017ddc-efc8-4c25-a915-774b2a633855"
state="DOWN">
<attachment
id="test_interface_identifier"/>
</port>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<port id="98017ddc-efc8-4c25-a915-774b2a633855" state="DOWN">
<attachment id="test_interface_identifier"/>
</port>

View File

@@ -1,3 +0,0 @@
<port
id="98017ddc-efc8-4c25-a915-774b2a633855"
state="DOWN"/>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<port id="98017ddc-efc8-4c25-a915-774b2a633855" state="DOWN"/>

View File

@@ -1,2 +1,2 @@
<port
state="ACTIVE"/>
<?xml version="1.0" encoding="UTF-8"?>
<port state="ACTIVE"/>

View File

@@ -1,2 +0,0 @@
<port
id="98017ddc-efc8-4c25-a915-774b2a633855"/>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<port id="98017ddc-efc8-4c25-a915-774b2a633855"/>

View File

@@ -7,32 +7,32 @@
<enable_dhcp quantum:type="bool">True</enable_dhcp>
<network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
<tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id>
<dns_nameservers quantum:type="list" />
<dns_nameservers quantum:type="list"/>
<allocation_pools>
<allocation_pool>
<start>10.0.0.2</start>
<end>10.255.255.254</end>
</allocation_pool>
</allocation_pools>
<host_routes quantum:type="list" />
<ip_version quantum:type="int">4</ip_version>
<gateway_ip>10.0.0.1</gateway_ip>
<cidr>10.0.0.0/8</cidr>
<id>bd3fd365-fe19-431a-be63-07017a09316c</id>
<host_routes quantum:type="list"/>
<ip_version quantum:type="int">4</ip_version>
<gateway_ip>10.0.0.1</gateway_ip>
<cidr>10.0.0.0/8</cidr>
<id>bd3fd365-fe19-431a-be63-07017a09316c</id>
</subnet>
<subnet>
<name>test_subnet_2</name>
<enable_dhcp quantum:type="bool">True</enable_dhcp>
<network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
<tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id>
<dns_nameservers quantum:type="list" />
<dns_nameservers quantum:type="list"/>
<allocation_pools>
<allocation_pool>
<start>192.168.0.2</start>
<end>192.168.255.254</end>
</allocation_pool>
</allocation_pools>
<host_routes quantum:type="list" />
<host_routes quantum:type="list"/>
<ip_version quantum:type="int">4</ip_version>
<gateway_ip>192.168.0.1</gateway_ip>
<cidr>192.168.0.0/16</cidr>

View File

@@ -0,0 +1,9 @@
{
"subnets":[
{
"cidr":"192.168.199.0/24",
"ip_version":4,
"network_id":"e6031bc2-901a-4c66-82da-f4c32ed89406"
},
]
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<subnets>
<subnet>
<name>test_subnet_1</name>
<network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
<cidr>10.0.0.0/8</cidr>
<ip_version>4</ip_version>
</subnet>
</subnets>

View File

@@ -0,0 +1,26 @@
{
"subnets":[
{
"allocation_pools":[
{
"end":"192.168.199.254",
"start":"192.168.199.2"
}
],
"cidr":"192.168.199.0/24",
"dns_nameservers":[
],
"enable_dhcp":true,
"gateway_ip":"192.168.199.1",
"host_routes":[
],
"id":"0468a7a7-290d-4127-aedd-6c9449775a24",
"ip_version":4,
"name":"",
"network_id":"e6031bc2-901a-4c66-82da-f4c32ed89406",
"tenant_id":"d19231fc08ec4bc4829b668040d34512"
},
]
}

View File

@@ -0,0 +1,23 @@
<?xml version='1.0' encoding='UTF-8'?>
<subnets xmlns="http://openstack.org/quantum/api/v2.0"
xmlns:quantum="http://openstack.org/quantum/api/v2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subnet>
<name>test_subnet_1</name>
<enable_dhcp quantum:type="bool">True</enable_dhcp>
<network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
<tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id>
<dns_nameservers quantum:type="list"/>
<allocation_pools>
<allocation_pool>
<start>10.0.0.2</start>
<end>10.255.255.254</end>
</allocation_pool>
</allocation_pools>
<host_routes quantum:type="list"/>
<ip_version quantum:type="int">4</ip_version>
<gateway_ip>10.0.0.1</gateway_ip>
<cidr>10.0.0.0/8</cidr>
<id>bd3fd365-fe19-431a-be63-07017a09316c</id>
</subnet>
</subnets>

View File

@@ -1,8 +0,0 @@
<ports>
<port
id="98017ddc-efc8-4c25-a915-774b2a633855"
state="ACTIVE"/>
<port
id="b832be00-6553-4f69-af33-acd554e36d08"
state="ACTIVE"/>
</ports>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ports>
<port id="98017ddc-efc8-4c25-a915-774b2a633855" state="ACTIVE"/>
<port id="b832be00-6553-4f69-af33-acd554e36d08" state="ACTIVE"/>
</ports>

View File

@@ -1,40 +0,0 @@
{
"subnets": [
{
"allocation_pools": [
{
"end": "10.0.3.254",
"start": "10.0.3.2"
}
],
"cidr": "10.0.3.0/24",
"dns_nameservers": [],
"enable_dhcp": true,
"gateway_ip": "10.0.3.1",
"host_routes": [],
"id": "91e47a57-7508-46fe-afc9-fc454e8580e1",
"ip_version": 4,
"name": "",
"network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363",
"tenant_id": "f667b69e4d6749749ef3bcba7251d9ce"
},
{
"allocation_pools": [
{
"end": "10.0.2.254",
"start": "10.0.2.2"
}
],
"cidr": "10.0.2.0/24",
"dns_nameservers": [],
"enable_dhcp": true,
"gateway_ip": "10.0.2.1",
"host_routes": [],
"id": "e3c3620c-9d24-4470-b226-739da2f617c0",
"ip_version": 4,
"name": "",
"network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363",
"tenant_id": "f667b69e4d6749749ef3bcba7251d9ce"
}
]
}

View File

@@ -1,6 +0,0 @@
<ports>
<port
id="98017ddc-efc8-4c25-a915-774b2a633855"/>
<port
id="b832be00-6553-4f69-af33-acd554e36d08"/>
</ports>

View File

@@ -1,40 +1,48 @@
{
"subnets": [
{
"allocation_pools": [
{
"end": "10.0.3.254",
"start": "10.0.3.2"
}
],
"cidr": "10.0.3.0/24",
"dns_nameservers": [],
"enable_dhcp": true,
"gateway_ip": "10.0.3.1",
"host_routes": [],
"id": "91e47a57-7508-46fe-afc9-fc454e8580e1",
"ip_version": 4,
"name": "",
"network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363",
"tenant_id": "f667b69e4d6749749ef3bcba7251d9ce"
},
{
"allocation_pools": [
{
"end": "10.0.2.254",
"start": "10.0.2.2"
}
],
"cidr": "10.0.2.0/24",
"dns_nameservers": [],
"enable_dhcp": true,
"gateway_ip": "10.0.2.1",
"host_routes": [],
"id": "e3c3620c-9d24-4470-b226-739da2f617c0",
"ip_version": 4,
"name": "",
"network_id": "1a6f6006-9e0b-4f99-984c-96787ae66363",
"tenant_id": "f667b69e4d6749749ef3bcba7251d9ce"
}
]
"subnets":[
{
"allocation_pools":[
{
"end":"10.0.3.254",
"start":"10.0.3.2"
}
],
"cidr":"10.0.3.0/24",
"dns_nameservers":[
],
"enable_dhcp":true,
"gateway_ip":"10.0.3.1",
"host_routes":[
],
"id":"91e47a57-7508-46fe-afc9-fc454e8580e1",
"ip_version":4,
"name":"",
"network_id":"1a6f6006-9e0b-4f99-984c-96787ae66363",
"tenant_id":"f667b69e4d6749749ef3bcba7251d9ce"
},
{
"allocation_pools":[
{
"end":"10.0.2.254",
"start":"10.0.2.2"
}
],
"cidr":"10.0.2.0/24",
"dns_nameservers":[
],
"enable_dhcp":true,
"gateway_ip":"10.0.2.1",
"host_routes":[
],
"id":"e3c3620c-9d24-4470-b226-739da2f617c0",
"ip_version":4,
"name":"",
"network_id":"1a6f6006-9e0b-4f99-984c-96787ae66363",
"tenant_id":"f667b69e4d6749749ef3bcba7251d9ce"
}
]
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ports>
<port id="98017ddc-efc8-4c25-a915-774b2a633855"/>
<port id="b832be00-6553-4f69-af33-acd554e36d08"/>
</ports>

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<subnets>
<subnet>
<name>test_subnet_1</name>

View File

@@ -52,7 +52,7 @@
<wadl:doc xml:lang="EN"
xmlns="http://docbook.org/ns/docbook">
<xsdxt:code
href="api_samples/quotas-list-res.json"/>
href="api_samples/quotas-list-resp.json"/>
</wadl:doc>
</representation>
</response>
@@ -80,7 +80,7 @@
<wadl:doc xml:lang="EN"
xmlns="http://docbook.org/ns/docbook">
<xsdxt:code
href="api_samples/quotas-show-res.json"/>
href="api_samples/quotas-show-resp.json"/>
</wadl:doc>
</representation>
</response>
@@ -117,7 +117,7 @@
<representation mediaType="application/json">
<wadl:doc xml:lang="EN"
xmlns="http://docbook.org/ns/docbook">
<xsdxt:code href="api_samples/quotas-put-res.json"
<xsdxt:code href="api_samples/quotas-put-resp.json"
/>
</wadl:doc>
</representation>

View File

@@ -80,13 +80,13 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-get-res.json"/>
href="api_samples/subnets-get-resp.json"/>
</wadl:doc>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code href="api_samples/subnets-get-res.xml"
<xsdxt:code href="api_samples/subnets-get-resp.xml"
/>
</wadl:doc>
</representation>
@@ -125,7 +125,7 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-post-create-bulk-req.json"
href="api_samples/subnets-create-req.json"
/>
</wadl:doc>
</representation>
@@ -133,7 +133,7 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-post-create-bulk-req.xml"
href="api_samples/subnets-create-req.xml"
/>
</wadl:doc>
</representation>
@@ -143,7 +143,7 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-create-bulk-resp.json"
href="api_samples/subnets-create-resp.json"
/>
</wadl:doc>
</representation>
@@ -151,7 +151,7 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/subnets-create-bulk-resp.xml"
href="api_samples/subnets-create-resp.xml"
/>
</wadl:doc>
</representation>
@@ -221,14 +221,14 @@
mediaType="application/json">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code href="api_samples/subnet-get-res.json"
<xsdxt:code href="api_samples/subnet-get-resp.json"
/>
</wadl:doc>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code href="api_samples/subnet-get-res.xml"
<xsdxt:code href="api_samples/subnet-get-resp.xml"
/>
</wadl:doc>
</representation>
@@ -264,13 +264,13 @@
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code
href="api_samples/subnet-post-res.json"/>
href="api_samples/subnet-post-resp.json"/>
</wadl:doc>
</representation>
<representation mediaType="application/xml">
<wadl:doc xmlns="http://docbook.org/ns/docbook"
xml:lang="EN">
<xsdxt:code href="api_samples/subnet-post-res.xml"
<xsdxt:code href="api_samples/subnet-post-resp.xml"
/>
</wadl:doc>
</representation>