blob: aba2c8eefc60ab899a1f109a85267f8bd0ae1bef [file] [log] [blame]
ZhiQiang Fan39f97222013-09-20 04:49:44 +08001# Copyright 2012 OpenStack Foundation
Jay Pipesf4dad392012-06-05 16:03:58 -04002# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
Miguel Lavallecc939612013-02-22 17:27:20 -060016import netaddr
Jay Pipesf4dad392012-06-05 16:03:58 -040017
Sean Dague1937d092013-05-17 16:36:38 -040018from tempest.api.network import base
Masayuki Igawa259c1132013-10-31 17:48:44 +090019from tempest.common.utils import data_utils
Matthew Treinish03b48df2014-01-29 16:59:49 +000020from tempest import config
Miguel Lavallecc939612013-02-22 17:27:20 -060021from tempest import exceptions
22from tempest.test import attr
Unmesh Gurjar44986832012-05-08 19:57:10 +053023
Matthew Treinish03b48df2014-01-29 16:59:49 +000024CONF = config.CONF
25
Unmesh Gurjar44986832012-05-08 19:57:10 +053026
raiesmh0867698322013-08-20 13:09:01 +053027class NetworksTestJSON(base.BaseNetworkTest):
28 _interface = 'json'
Unmesh Gurjar44986832012-05-08 19:57:10 +053029
Miguel Lavallecc939612013-02-22 17:27:20 -060030 """
Mark McClainf2982e82013-07-06 17:48:03 -040031 Tests the following operations in the Neutron API using the REST client for
32 Neutron:
Miguel Lavallecc939612013-02-22 17:27:20 -060033
34 create a network for a tenant
35 list tenant's networks
36 show a tenant network details
37 create a subnet for a tenant
38 list tenant's subnets
39 show a tenant subnet details
raiesmh08e1aad982013-08-05 14:19:36 +053040 port create
41 port delete
42 port list
43 port show
44 port update
45 network update
46 subnet update
Miguel Lavallecc939612013-02-22 17:27:20 -060047
Henry Gessauffda37a2014-01-16 11:17:55 -050048 All subnet tests are run once with ipv4 and once with ipv6.
49
Mark McClainf2982e82013-07-06 17:48:03 -040050 v2.0 of the Neutron API is assumed. It is also assumed that the following
Miguel Lavallecc939612013-02-22 17:27:20 -060051 options are defined in the [network] section of etc/tempest.conf:
52
53 tenant_network_cidr with a block of cidr's from which smaller blocks
Henry Gessauffda37a2014-01-16 11:17:55 -050054 can be allocated for tenant ipv4 subnets
55
56 tenant_network_v6_cidr is the equivalent for ipv6 subnets
Miguel Lavallecc939612013-02-22 17:27:20 -060057
58 tenant_network_mask_bits with the mask bits to be used to partition the
Henry Gessauffda37a2014-01-16 11:17:55 -050059 block defined by tenant_network_cidr
60
61 tenant_network_v6_mask_bits is the equivalent for ipv6 subnets
Miguel Lavallecc939612013-02-22 17:27:20 -060062 """
63
Unmesh Gurjar44986832012-05-08 19:57:10 +053064 @classmethod
65 def setUpClass(cls):
raiesmh0867698322013-08-20 13:09:01 +053066 super(NetworksTestJSON, cls).setUpClass()
Jay Pipesf4dad392012-06-05 16:03:58 -040067 cls.network = cls.create_network()
68 cls.name = cls.network['name']
Miguel Lavallecc939612013-02-22 17:27:20 -060069 cls.subnet = cls.create_subnet(cls.network)
70 cls.cidr = cls.subnet['cidr']
raiesmh08e1aad982013-08-05 14:19:36 +053071 cls.port = cls.create_port(cls.network)
Unmesh Gurjar44986832012-05-08 19:57:10 +053072
Attila Fazekas71834a22013-08-18 06:56:21 +020073 @attr(type='smoke')
raiesmh08e1aad982013-08-05 14:19:36 +053074 def test_create_update_delete_network_subnet(self):
Miguel Lavallecc939612013-02-22 17:27:20 -060075 # Creates a network
Masayuki Igawa259c1132013-10-31 17:48:44 +090076 name = data_utils.rand_name('network-')
Eugene Nikanorove9d255a2013-12-18 16:31:42 +040077 resp, body = self.client.create_network(name=name)
Miguel Lavallecc939612013-02-22 17:27:20 -060078 self.assertEqual('201', resp['status'])
Unmesh Gurjar44986832012-05-08 19:57:10 +053079 network = body['network']
raiesmh08e1aad982013-08-05 14:19:36 +053080 net_id = network['id']
81 # Verification of network update
82 new_name = "New_network"
Eugene Nikanorove9d255a2013-12-18 16:31:42 +040083 resp, body = self.client.update_network(net_id, name=new_name)
raiesmh08e1aad982013-08-05 14:19:36 +053084 self.assertEqual('200', resp['status'])
85 updated_net = body['network']
86 self.assertEqual(updated_net['name'], new_name)
Miguel Lavallecc939612013-02-22 17:27:20 -060087 # Find a cidr that is not in use yet and create a subnet with it
Henry Gessauffda37a2014-01-16 11:17:55 -050088 cidr = netaddr.IPNetwork(self._tenant_network_cidr)
89 mask_bits = self._tenant_network_mask_bits
Miguel Lavallecc939612013-02-22 17:27:20 -060090 for subnet_cidr in cidr.subnet(mask_bits):
91 try:
Eugene Nikanorove9d255a2013-12-18 16:31:42 +040092 resp, body = self.client.create_subnet(
93 network_id=net_id,
94 cidr=str(subnet_cidr),
Henry Gessauffda37a2014-01-16 11:17:55 -050095 ip_version=self._ip_version)
Miguel Lavallecc939612013-02-22 17:27:20 -060096 break
97 except exceptions.BadRequest as e:
98 is_overlapping_cidr = 'overlaps with another subnet' in str(e)
99 if not is_overlapping_cidr:
100 raise
101 self.assertEqual('201', resp['status'])
102 subnet = body['subnet']
raiesmh08e1aad982013-08-05 14:19:36 +0530103 subnet_id = subnet['id']
104 # Verification of subnet update
105 new_subnet = "New_subnet"
Eugene Nikanorove9d255a2013-12-18 16:31:42 +0400106 resp, body = self.client.update_subnet(subnet_id,
107 name=new_subnet)
raiesmh08e1aad982013-08-05 14:19:36 +0530108 self.assertEqual('200', resp['status'])
109 updated_subnet = body['subnet']
110 self.assertEqual(updated_subnet['name'], new_subnet)
raiesmh0867698322013-08-20 13:09:01 +0530111 # Delete subnet and network
raiesmh08e1aad982013-08-05 14:19:36 +0530112 resp, body = self.client.delete_subnet(subnet_id)
Miguel Lavallecc939612013-02-22 17:27:20 -0600113 self.assertEqual('204', resp['status'])
raiesmh08e1aad982013-08-05 14:19:36 +0530114 resp, body = self.client.delete_network(net_id)
Unmesh Gurjar44986832012-05-08 19:57:10 +0530115 self.assertEqual('204', resp['status'])
116
Attila Fazekas71834a22013-08-18 06:56:21 +0200117 @attr(type='smoke')
Unmesh Gurjar44986832012-05-08 19:57:10 +0530118 def test_show_network(self):
Sean Dague46c4a2b2013-01-03 17:54:17 -0500119 # Verifies the details of a network
Miguel Lavallecc939612013-02-22 17:27:20 -0600120 resp, body = self.client.show_network(self.network['id'])
Unmesh Gurjar44986832012-05-08 19:57:10 +0530121 self.assertEqual('200', resp['status'])
122 network = body['network']
123 self.assertEqual(self.network['id'], network['id'])
124 self.assertEqual(self.name, network['name'])
125
Attila Fazekas71834a22013-08-18 06:56:21 +0200126 @attr(type='smoke')
jun xied557d9b2014-01-09 14:00:36 +0800127 def test_show_network_fields(self):
128 # Verifies showing some fields of a network works
129 field_list = [('fields', 'id'), ('fields', 'name'), ]
130 resp, body = self.client.show_network(self.network['id'],
131 field_list=field_list)
132 self.assertEqual('200', resp['status'])
133 network = body['network']
134 self.assertEqual(len(network), 2)
135 self.assertEqual(self.network['id'], network['id'])
136 self.assertEqual(self.name, network['name'])
137
138 @attr(type='smoke')
Unmesh Gurjar44986832012-05-08 19:57:10 +0530139 def test_list_networks(self):
Sean Dague46c4a2b2013-01-03 17:54:17 -0500140 # Verify the network exists in the list of all networks
Unmesh Gurjar44986832012-05-08 19:57:10 +0530141 resp, body = self.client.list_networks()
raiesmh0867698322013-08-20 13:09:01 +0530142 self.assertEqual('200', resp['status'])
Unmesh Gurjar44986832012-05-08 19:57:10 +0530143 networks = body['networks']
raiesmh08e1aad982013-08-05 14:19:36 +0530144 found = None
145 for n in networks:
146 if (n['id'] == self.network['id']):
147 found = n['id']
148 msg = "Network list doesn't contain created network"
149 self.assertIsNotNone(found, msg)
Unmesh Gurjar44986832012-05-08 19:57:10 +0530150
Attila Fazekas71834a22013-08-18 06:56:21 +0200151 @attr(type='smoke')
jun xie0b4735d2014-01-07 15:42:58 +0800152 def test_list_networks_fields(self):
153 # Verify listing some fields of the networks
154 resp, body = self.client.list_networks(fields='id')
155 self.assertEqual('200', resp['status'])
156 networks = body['networks']
157 found = None
158 for n in networks:
159 self.assertEqual(len(n), 1)
160 self.assertIn('id', n)
161 if (n['id'] == self.network['id']):
162 found = n['id']
163 self.assertIsNotNone(found,
164 "Created network id not found in the list")
165
166 @attr(type='smoke')
Miguel Lavallecc939612013-02-22 17:27:20 -0600167 def test_show_subnet(self):
168 # Verifies the details of a subnet
169 resp, body = self.client.show_subnet(self.subnet['id'])
170 self.assertEqual('200', resp['status'])
171 subnet = body['subnet']
172 self.assertEqual(self.subnet['id'], subnet['id'])
173 self.assertEqual(self.cidr, subnet['cidr'])
174
Attila Fazekas71834a22013-08-18 06:56:21 +0200175 @attr(type='smoke')
jun xied557d9b2014-01-09 14:00:36 +0800176 def test_show_subnet_fields(self):
177 # Verifies showing some fields of a subnet works
178 field_list = [('fields', 'id'), ('fields', 'cidr'), ]
179 resp, body = self.client.show_subnet(self.subnet['id'],
180 field_list=field_list)
181 self.assertEqual('200', resp['status'])
182 subnet = body['subnet']
183 self.assertEqual(len(subnet), 2)
184 self.assertEqual(self.subnet['id'], subnet['id'])
185 self.assertEqual(self.cidr, subnet['cidr'])
186
187 @attr(type='smoke')
Miguel Lavallecc939612013-02-22 17:27:20 -0600188 def test_list_subnets(self):
189 # Verify the subnet exists in the list of all subnets
190 resp, body = self.client.list_subnets()
raiesmh0867698322013-08-20 13:09:01 +0530191 self.assertEqual('200', resp['status'])
Miguel Lavallecc939612013-02-22 17:27:20 -0600192 subnets = body['subnets']
raiesmh08e1aad982013-08-05 14:19:36 +0530193 found = None
194 for n in subnets:
195 if (n['id'] == self.subnet['id']):
196 found = n['id']
197 msg = "Subnet list doesn't contain created subnet"
198 self.assertIsNotNone(found, msg)
199
Attila Fazekas71834a22013-08-18 06:56:21 +0200200 @attr(type='smoke')
jun xie0b4735d2014-01-07 15:42:58 +0800201 def test_list_subnets_fields(self):
202 # Verify listing some fields of the subnets
203 resp, body = self.client.list_subnets(fields='id')
204 self.assertEqual('200', resp['status'])
205 subnets = body['subnets']
206 found = None
207 for n in subnets:
208 self.assertEqual(len(n), 1)
209 self.assertIn('id', n)
210 if (n['id'] == self.subnet['id']):
211 found = n['id']
212 self.assertIsNotNone(found,
213 "Created subnet id not found in the list")
214
215 @attr(type='smoke')
raiesmh08e1aad982013-08-05 14:19:36 +0530216 def test_create_update_delete_port(self):
raiesmh0867698322013-08-20 13:09:01 +0530217 # Verify that successful port creation, update & deletion
Eugene Nikanorove9d255a2013-12-18 16:31:42 +0400218 resp, body = self.client.create_port(
219 network_id=self.network['id'])
raiesmh08e1aad982013-08-05 14:19:36 +0530220 self.assertEqual('201', resp['status'])
221 port = body['port']
jun xie3c8df152014-02-12 11:36:52 +0800222 self.assertTrue(port['admin_state_up'])
raiesmh08e1aad982013-08-05 14:19:36 +0530223 # Verification of port update
224 new_port = "New_Port"
jun xie3c8df152014-02-12 11:36:52 +0800225 resp, body = self.client.update_port(
226 port['id'],
227 name=new_port,
228 admin_state_up=False)
raiesmh08e1aad982013-08-05 14:19:36 +0530229 self.assertEqual('200', resp['status'])
230 updated_port = body['port']
231 self.assertEqual(updated_port['name'], new_port)
jun xie3c8df152014-02-12 11:36:52 +0800232 self.assertFalse(updated_port['admin_state_up'])
raiesmh08e1aad982013-08-05 14:19:36 +0530233 # Verification of port delete
234 resp, body = self.client.delete_port(port['id'])
235 self.assertEqual('204', resp['status'])
236
Attila Fazekas71834a22013-08-18 06:56:21 +0200237 @attr(type='smoke')
raiesmh0867698322013-08-20 13:09:01 +0530238 def test_show_port(self):
raiesmh08e1aad982013-08-05 14:19:36 +0530239 # Verify the details of port
240 resp, body = self.client.show_port(self.port['id'])
241 self.assertEqual('200', resp['status'])
242 port = body['port']
243 self.assertEqual(self.port['id'], port['id'])
244
Attila Fazekas71834a22013-08-18 06:56:21 +0200245 @attr(type='smoke')
jun xied557d9b2014-01-09 14:00:36 +0800246 def test_show_port_fields(self):
247 # Verifies showing fields of a port works
248 field_list = [('fields', 'id'), ]
249 resp, body = self.client.show_port(self.port['id'],
250 field_list=field_list)
251 self.assertEqual('200', resp['status'])
252 port = body['port']
253 self.assertEqual(len(port), 1)
254 self.assertEqual(self.port['id'], port['id'])
255
256 @attr(type='smoke')
raiesmh08e1aad982013-08-05 14:19:36 +0530257 def test_list_ports(self):
258 # Verify the port exists in the list of all ports
259 resp, body = self.client.list_ports()
260 self.assertEqual('200', resp['status'])
261 ports_list = body['ports']
262 found = None
263 for n in ports_list:
264 if (n['id'] == self.port['id']):
265 found = n['id']
266 self.assertIsNotNone(found, "Port list doesn't contain created port")
Anju Tiwari6656f582013-08-03 05:43:42 +0530267
jun xie0b4735d2014-01-07 15:42:58 +0800268 @attr(type='smoke')
nayna-patel51ea8202014-01-31 04:52:45 +0000269 def test_port_list_filter_by_router_id(self):
270 # Create a router
271 network = self.create_network()
272 self.create_subnet(network)
273 router = self.create_router(data_utils.rand_name('router-'))
274 resp, port = self.client.create_port(
275 network_id=network['id'])
276 # Add router interface to port created above
277 resp, interface = self.client.add_router_interface_with_port_id(
278 router['id'], port['port']['id'])
279 self.addCleanup(self.client.remove_router_interface_with_port_id,
280 router['id'], port['port']['id'])
281 # list ports filtered by router_id
282 resp, port_list = self.client.list_ports(
283 device_id=router['id'])
284 self.assertEqual('200', resp['status'])
285 # Verify if only corresponding port is listed and assert router_id
286 self.assertEqual(len(port_list['ports']), 1)
287 self.assertEqual(port['port']['id'], port_list['ports'][0]['id'])
288 self.assertEqual(router['id'], port_list['ports'][0]['device_id'])
289
290 @attr(type='smoke')
jun xie0b4735d2014-01-07 15:42:58 +0800291 def test_list_ports_fields(self):
292 # Verify listing some fields of the ports
293 resp, body = self.client.list_ports(fields='id')
294 self.assertEqual('200', resp['status'])
295 ports_list = body['ports']
296 found = None
297 for n in ports_list:
298 self.assertEqual(len(n), 1)
299 self.assertIn('id', n)
300 if (n['id'] == self.port['id']):
301 found = n['id']
302 self.assertIsNotNone(found,
303 "Created port id not found in the list")
304
raiesmh086b055e22013-09-16 12:59:57 +0530305
306class NetworksTestXML(NetworksTestJSON):
307 _interface = 'xml'
308
309
Ken'ichi Ohmichi91c675d2014-02-06 02:15:21 +0900310class BulkNetworkOpsTestJSON(base.BaseNetworkTest):
raiesmh086b055e22013-09-16 12:59:57 +0530311 _interface = 'json'
312
313 """
314 Tests the following operations in the Neutron API using the REST client for
315 Neutron:
316
317 bulk network creation
318 bulk subnet creation
Eugene Nikanorove9d255a2013-12-18 16:31:42 +0400319 bulk port creation
raiesmh086b055e22013-09-16 12:59:57 +0530320 list tenant's networks
321
322 v2.0 of the Neutron API is assumed. It is also assumed that the following
323 options are defined in the [network] section of etc/tempest.conf:
324
325 tenant_network_cidr with a block of cidr's from which smaller blocks
326 can be allocated for tenant networks
327
328 tenant_network_mask_bits with the mask bits to be used to partition the
329 block defined by tenant-network_cidr
330 """
331
332 @classmethod
333 def setUpClass(cls):
Ken'ichi Ohmichi91c675d2014-02-06 02:15:21 +0900334 super(BulkNetworkOpsTestJSON, cls).setUpClass()
raiesmh086b055e22013-09-16 12:59:57 +0530335 cls.network1 = cls.create_network()
336 cls.network2 = cls.create_network()
337
338 def _delete_networks(self, created_networks):
339 for n in created_networks:
340 resp, body = self.client.delete_network(n['id'])
341 self.assertEqual(204, resp.status)
342 # Asserting that the networks are not found in the list after deletion
343 resp, body = self.client.list_networks()
344 networks_list = list()
345 for network in body['networks']:
346 networks_list.append(network['id'])
347 for n in created_networks:
348 self.assertNotIn(n['id'], networks_list)
349
350 def _delete_subnets(self, created_subnets):
351 for n in created_subnets:
352 resp, body = self.client.delete_subnet(n['id'])
353 self.assertEqual(204, resp.status)
354 # Asserting that the subnets are not found in the list after deletion
355 resp, body = self.client.list_subnets()
356 subnets_list = list()
357 for subnet in body['subnets']:
358 subnets_list.append(subnet['id'])
359 for n in created_subnets:
360 self.assertNotIn(n['id'], subnets_list)
361
362 def _delete_ports(self, created_ports):
363 for n in created_ports:
364 resp, body = self.client.delete_port(n['id'])
365 self.assertEqual(204, resp.status)
366 # Asserting that the ports are not found in the list after deletion
367 resp, body = self.client.list_ports()
368 ports_list = list()
369 for port in body['ports']:
370 ports_list.append(port['id'])
371 for n in created_ports:
372 self.assertNotIn(n['id'], ports_list)
373
Attila Fazekas71834a22013-08-18 06:56:21 +0200374 @attr(type='smoke')
Nayna Patelb03eab42013-08-08 08:58:48 +0000375 def test_bulk_create_delete_network(self):
376 # Creates 2 networks in one request
Masayuki Igawa259c1132013-10-31 17:48:44 +0900377 network_names = [data_utils.rand_name('network-'),
378 data_utils.rand_name('network-')]
Nayna Patelb03eab42013-08-08 08:58:48 +0000379 resp, body = self.client.create_bulk_network(2, network_names)
380 created_networks = body['networks']
381 self.assertEqual('201', resp['status'])
382 self.addCleanup(self._delete_networks, created_networks)
383 # Asserting that the networks are found in the list after creation
384 resp, body = self.client.list_networks()
385 networks_list = list()
386 for network in body['networks']:
387 networks_list.append(network['id'])
388 for n in created_networks:
389 self.assertIsNotNone(n['id'])
390 self.assertIn(n['id'], networks_list)
raiesmh0867698322013-08-20 13:09:01 +0530391
raiesmh082d5c6512013-09-06 15:35:05 +0530392 @attr(type='smoke')
393 def test_bulk_create_delete_subnet(self):
394 # Creates 2 subnets in one request
Matthew Treinish03b48df2014-01-29 16:59:49 +0000395 cidr = netaddr.IPNetwork(CONF.network.tenant_network_cidr)
396 mask_bits = CONF.network.tenant_network_mask_bits
raiesmh082d5c6512013-09-06 15:35:05 +0530397 cidrs = []
398 for subnet_cidr in cidr.subnet(mask_bits):
399 cidrs.append(subnet_cidr)
400 names = []
401 networks = [self.network1['id'], self.network2['id']]
402 for i in range(len(networks)):
Masayuki Igawa259c1132013-10-31 17:48:44 +0900403 names.append(data_utils.rand_name('subnet-'))
raiesmh082d5c6512013-09-06 15:35:05 +0530404 subnet_list = []
405 # TODO(raies): "for IPv6, version list [4, 6] will be used.
406 # and cidr for IPv6 will be of IPv6"
407 ip_version = [4, 4]
408 for i in range(len(names)):
409 p1 = {
410 'network_id': networks[i],
411 'cidr': str(cidrs[(i)]),
412 'name': names[i],
413 'ip_version': ip_version[i]
414 }
415 subnet_list.append(p1)
416 del subnet_list[1]['name']
417 resp, body = self.client.create_bulk_subnet(subnet_list)
418 created_subnets = body['subnets']
419 self.addCleanup(self._delete_subnets, created_subnets)
420 self.assertEqual('201', resp['status'])
421 # Asserting that the subnets are found in the list after creation
422 resp, body = self.client.list_subnets()
423 subnets_list = list()
424 for subnet in body['subnets']:
425 subnets_list.append(subnet['id'])
426 for n in created_subnets:
427 self.assertIsNotNone(n['id'])
428 self.assertIn(n['id'], subnets_list)
429
430 @attr(type='smoke')
431 def test_bulk_create_delete_port(self):
432 # Creates 2 ports in one request
433 names = []
434 networks = [self.network1['id'], self.network2['id']]
435 for i in range(len(networks)):
Masayuki Igawa259c1132013-10-31 17:48:44 +0900436 names.append(data_utils.rand_name('port-'))
raiesmh082d5c6512013-09-06 15:35:05 +0530437 port_list = []
438 state = [True, False]
439 for i in range(len(names)):
440 p1 = {
441 'network_id': networks[i],
442 'name': names[i],
443 'admin_state_up': state[i],
444 }
445 port_list.append(p1)
446 del port_list[1]['name']
447 resp, body = self.client.create_bulk_port(port_list)
448 created_ports = body['ports']
449 self.addCleanup(self._delete_ports, created_ports)
450 self.assertEqual('201', resp['status'])
451 # Asserting that the ports are found in the list after creation
452 resp, body = self.client.list_ports()
453 ports_list = list()
454 for port in body['ports']:
455 ports_list.append(port['id'])
456 for n in created_ports:
457 self.assertIsNotNone(n['id'])
458 self.assertIn(n['id'], ports_list)
459
raiesmh0867698322013-08-20 13:09:01 +0530460
Ken'ichi Ohmichi91c675d2014-02-06 02:15:21 +0900461class BulkNetworkOpsTestXML(BulkNetworkOpsTestJSON):
raiesmh0867698322013-08-20 13:09:01 +0530462 _interface = 'xml'
Henry Gessauffda37a2014-01-16 11:17:55 -0500463
464
465class NetworksIpV6TestJSON(NetworksTestJSON):
466 _ip_version = 6
467 _tenant_network_cidr = CONF.network.tenant_network_v6_cidr
468 _tenant_network_mask_bits = CONF.network.tenant_network_v6_mask_bits
469
armando-migliaccio5bb7aef2014-02-19 21:55:14 -0800470 @classmethod
471 def setUpClass(cls):
472 super(NetworksIpV6TestJSON, cls).setUpClass()
473 if not CONF.network.ipv6_enabled:
474 cls.tearDownClass()
475 skip_msg = "IPv6 Tests are disabled."
476 raise cls.skipException(skip_msg)
477
Henry Gessauffda37a2014-01-16 11:17:55 -0500478
479class NetworksIpV6TestXML(NetworksIpV6TestJSON):
480 _interface = 'xml'