add xml api sample tests to os-tenant-network
Change-Id: Ib79defe49c82a175cb8605aa3a65ccd2c48d68f7
This commit is contained in:
parent
59b417723a
commit
8534a03570
13
doc/api_samples/os-tenant-networks/networks-list-res.xml
Normal file
13
doc/api_samples/os-tenant-networks/networks-list-res.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<networks>
|
||||
<network>
|
||||
<cidr>10.0.0.0/29</cidr>
|
||||
<id>cf3fb0f1-9967-4dac-8284-2d103e904099</id>
|
||||
<label>test_0</label>
|
||||
</network>
|
||||
<network>
|
||||
<cidr>10.0.0.8/29</cidr>
|
||||
<id>434385bc-a7ac-4778-b295-56f8134fddbc</id>
|
||||
<label>test_1</label>
|
||||
</network>
|
||||
</networks>
|
7
doc/api_samples/os-tenant-networks/networks-post-req.xml
Normal file
7
doc/api_samples/os-tenant-networks/networks-post-req.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<network>
|
||||
<label>public</label>
|
||||
<cidr>172.0.0.0/24</cidr>
|
||||
<vlan_start>1</vlan_start>
|
||||
<num_networks>1</num_networks>
|
||||
<network_size>255</network_size>
|
||||
</network>
|
6
doc/api_samples/os-tenant-networks/networks-post-res.xml
Normal file
6
doc/api_samples/os-tenant-networks/networks-post-res.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<network>
|
||||
<cidr>172.0.0.0/24</cidr>
|
||||
<id>9ac30188-57d8-4349-94d1-dbad63b20e4d</id>
|
||||
<label>public</label>
|
||||
</network>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<networks>
|
||||
<network>
|
||||
<cidr>10.0.0.0/29</cidr>
|
||||
<id>%(id)s</id>
|
||||
<label>test_0</label>
|
||||
</network>
|
||||
<network>
|
||||
<cidr>10.0.0.8/29</cidr>
|
||||
<id>%(id)s</id>
|
||||
<label>test_1</label>
|
||||
</network>
|
||||
</networks>
|
@ -0,0 +1,7 @@
|
||||
<network>
|
||||
<label>public</label>
|
||||
<cidr>172.0.0.0/24</cidr>
|
||||
<vlan_start>1</vlan_start>
|
||||
<num_networks>1</num_networks>
|
||||
<network_size>255</network_size>
|
||||
</network>
|
@ -0,0 +1,5 @@
|
||||
<network>
|
||||
<cidr>172.0.0.0/24</cidr>
|
||||
<id>%(id)s</id>
|
||||
<label>public</label>
|
||||
</network>
|
@ -2554,6 +2554,17 @@ class OsNetworksJsonTests(ApiSampleTestBase):
|
||||
self.assertEqual(response.status, 202)
|
||||
|
||||
|
||||
class OsNetworksXmlTests(OsNetworksJsonTests):
|
||||
ctype = 'xml'
|
||||
|
||||
def test_delete_network(self):
|
||||
response = self._do_post('os-tenant-networks', "networks-post-req", {})
|
||||
net = etree.fromstring(response.read())
|
||||
network_id = net.find('id').text
|
||||
response = self._do_delete('os-tenant-networks/%s' % network_id)
|
||||
self.assertEqual(response.status, 202)
|
||||
|
||||
|
||||
class NetworksJsonTests(ApiSampleTestBase):
|
||||
extension_name = ("nova.api.openstack.compute.contrib"
|
||||
".os_networks.Os_networks")
|
||||
|
Loading…
Reference in New Issue
Block a user