Added test ability for 2 VMs on different networks to ping each other.
[snaps.git] / snaps / test_suite_builder.py
1 # Copyright (c) 2017 Cable Television Laboratories, Inc. ("CableLabs")
2 #                    and others.  All rights reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain 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,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 import logging
17 import unittest
18
19 from snaps.domain.test.flavor_tests import FlavorDomainObjectTests
20 from snaps.domain.test.image_tests import ImageDomainObjectTests
21 from snaps.domain.test.keypair_tests import KeypairDomainObjectTests
22 from snaps.domain.test.network_tests import (
23     SecurityGroupDomainObjectTests, SecurityGroupRuleDomainObjectTests,
24     PortDomainObjectTests, RouterDomainObjectTests,
25     InterfaceRouterDomainObjectTests, NetworkObjectTests, SubnetObjectTests)
26 from snaps.domain.test.project_tests import (
27     ProjectDomainObjectTests, DomainDomainObjectTests)
28 from snaps.domain.test.role_tests import RoleDomainObjectTests
29 from snaps.domain.test.stack_tests import StackDomainObjectTests
30 from snaps.domain.test.user_tests import UserDomainObjectTests
31 from snaps.domain.test.vm_inst_tests import (
32     VmInstDomainObjectTests, FloatingIpDomainObjectTests)
33 from snaps.openstack.tests.conf.os_credentials_tests import (
34     ProxySettingsUnitTests, OSCredsUnitTests)
35 from snaps.openstack.tests.create_flavor_tests import (
36     CreateFlavorTests, FlavorSettingsUnitTests)
37 from snaps.openstack.tests.create_image_tests import (
38     CreateImageSuccessTests, CreateImageNegativeTests, ImageSettingsUnitTests,
39     CreateMultiPartImageTests)
40 from snaps.openstack.tests.create_instance_tests import (
41     CreateInstanceSingleNetworkTests, CreateInstancePubPrivNetTests,
42     CreateInstanceOnComputeHost, CreateInstanceSimpleTests,
43     FloatingIpSettingsUnitTests, InstanceSecurityGroupTests,
44     VmInstanceSettingsUnitTests, CreateInstancePortManipulationTests,
45     SimpleHealthCheck, CreateInstanceFromThreePartImage,
46     CreateInstanceMockOfflineTests, CreateInstanceTwoNetTests)
47 from snaps.openstack.tests.create_keypairs_tests import (
48     CreateKeypairsTests, KeypairSettingsUnitTests, CreateKeypairsCleanupTests)
49 from snaps.openstack.tests.create_network_tests import (
50     CreateNetworkSuccessTests, NetworkSettingsUnitTests, PortSettingsUnitTests,
51     SubnetSettingsUnitTests, CreateNetworkTypeTests)
52 from snaps.openstack.tests.create_project_tests import (
53     CreateProjectSuccessTests, ProjectSettingsUnitTests,
54     CreateProjectUserTests)
55 from snaps.openstack.tests.create_router_tests import (
56     CreateRouterSuccessTests, CreateRouterNegativeTests,
57     RouterSettingsUnitTests)
58 from snaps.openstack.tests.create_security_group_tests import (
59     CreateSecurityGroupTests, SecurityGroupRuleSettingsUnitTests,
60     SecurityGroupSettingsUnitTests)
61 from snaps.openstack.tests.create_stack_tests import (
62     StackSettingsUnitTests, CreateStackSuccessTests,  CreateStackNegativeTests)
63 from snaps.openstack.tests.create_user_tests import (
64     UserSettingsUnitTests, CreateUserSuccessTests)
65 from snaps.openstack.tests.os_source_file_test import (
66     OSComponentTestCase, OSIntegrationTestCase)
67 from snaps.openstack.utils.tests.glance_utils_tests import (
68     GlanceSmokeTests, GlanceUtilsTests)
69 from snaps.openstack.utils.tests.heat_utils_tests import (
70     HeatUtilsCreateStackTests, HeatSmokeTests)
71 from snaps.openstack.utils.tests.keystone_utils_tests import (
72     KeystoneSmokeTests, KeystoneUtilsTests)
73 from snaps.openstack.utils.tests.neutron_utils_tests import (
74     NeutronSmokeTests, NeutronUtilsNetworkTests, NeutronUtilsSubnetTests,
75     NeutronUtilsRouterTests, NeutronUtilsSecurityGroupTests,
76     NeutronUtilsFloatingIpTests)
77 from snaps.openstack.utils.tests.nova_utils_tests import (
78     NovaSmokeTests, NovaUtilsKeypairTests, NovaUtilsFlavorTests,
79     NovaUtilsInstanceTests)
80 from snaps.provisioning.tests.ansible_utils_tests import (
81     AnsibleProvisioningTests)
82 from snaps.tests.file_utils_tests import FileUtilsTests
83
84 __author__ = 'spisarski'
85
86
87 def add_unit_tests(suite):
88     """
89     Adds tests that do not require external resources
90     :param suite: the unittest.TestSuite object to which to add the tests
91     :return: None as the tests will be adding to the 'suite' parameter object
92     """
93     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(FileUtilsTests))
94     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
95         SecurityGroupRuleSettingsUnitTests))
96     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
97         ProxySettingsUnitTests))
98     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
99         OSCredsUnitTests))
100     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
101         SecurityGroupSettingsUnitTests))
102     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
103         SecurityGroupDomainObjectTests))
104     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
105         SecurityGroupRuleDomainObjectTests))
106     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
107         ImageSettingsUnitTests))
108     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
109         ImageDomainObjectTests))
110     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
111         FlavorSettingsUnitTests))
112     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
113         FlavorDomainObjectTests))
114     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
115         KeypairSettingsUnitTests))
116     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
117         KeypairDomainObjectTests))
118     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
119         UserSettingsUnitTests))
120     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
121         UserDomainObjectTests))
122     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
123         ProjectSettingsUnitTests))
124     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
125         ProjectDomainObjectTests))
126     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
127         DomainDomainObjectTests))
128     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
129         RoleDomainObjectTests))
130     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
131         NetworkSettingsUnitTests))
132     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
133         NetworkObjectTests))
134     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
135         SubnetSettingsUnitTests))
136     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
137         SubnetObjectTests))
138     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
139         PortSettingsUnitTests))
140     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
141         PortDomainObjectTests))
142     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
143         RouterSettingsUnitTests))
144     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
145         RouterDomainObjectTests))
146     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
147         InterfaceRouterDomainObjectTests))
148     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
149         FloatingIpSettingsUnitTests))
150     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
151         VmInstanceSettingsUnitTests))
152     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
153         StackDomainObjectTests))
154     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
155         StackSettingsUnitTests))
156     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
157         VmInstDomainObjectTests))
158     suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
159         FloatingIpDomainObjectTests))
160
161
162 def add_openstack_client_tests(suite, os_creds, ext_net_name,
163                                use_keystone=True, log_level=logging.INFO):
164     """
165     Adds tests written to exercise OpenStack client retrieval
166     :param suite: the unittest.TestSuite object to which to add the tests
167     :param os_creds: and instance of OSCreds that holds the credentials
168                      required by OpenStack
169     :param ext_net_name: the name of an external network on the cloud under
170                          test
171     :param use_keystone: when True, tests requiring direct access to Keystone
172                          are added as these need to be running on a host that
173                          has access to the cloud's private network
174     :param log_level: the logging level
175     :return: None as the tests will be adding to the 'suite' parameter object
176     """
177     # Basic connection tests
178     suite.addTest(
179         OSComponentTestCase.parameterize(
180             GlanceSmokeTests, os_creds=os_creds, ext_net_name=ext_net_name,
181             log_level=log_level))
182
183     if use_keystone:
184         suite.addTest(
185             OSComponentTestCase.parameterize(
186                 KeystoneSmokeTests, os_creds=os_creds,
187                 ext_net_name=ext_net_name, log_level=log_level))
188
189     suite.addTest(
190         OSComponentTestCase.parameterize(
191             NeutronSmokeTests, os_creds=os_creds, ext_net_name=ext_net_name,
192             log_level=log_level))
193     suite.addTest(
194         OSComponentTestCase.parameterize(
195             NovaSmokeTests, os_creds=os_creds, ext_net_name=ext_net_name,
196             log_level=log_level))
197     suite.addTest(
198         OSComponentTestCase.parameterize(
199             HeatSmokeTests, os_creds=os_creds, ext_net_name=ext_net_name,
200             log_level=log_level))
201
202
203 def add_openstack_api_tests(suite, os_creds, ext_net_name, use_keystone=True,
204                             image_metadata=None, log_level=logging.INFO):
205     """
206     Adds tests written to exercise all existing OpenStack APIs
207     :param suite: the unittest.TestSuite object to which to add the tests
208     :param os_creds: Instance of OSCreds that holds the credentials
209                      required by OpenStack
210     :param ext_net_name: the name of an external network on the cloud under
211                          test
212     :param use_keystone: when True, tests requiring direct access to Keystone
213                          are added as these need to be running on a host that
214                          has access to the cloud's private network
215     :param image_metadata: dict() object containing metadata for creating an
216                            image with custom config
217                            (see YAML files in examples/image-metadata)
218     :param log_level: the logging level
219     :return: None as the tests will be adding to the 'suite' parameter object
220     """
221     # Tests the OpenStack API calls
222     if use_keystone:
223         suite.addTest(OSComponentTestCase.parameterize(
224             KeystoneUtilsTests, os_creds=os_creds, ext_net_name=ext_net_name,
225             log_level=log_level))
226         suite.addTest(OSComponentTestCase.parameterize(
227             CreateUserSuccessTests, os_creds=os_creds,
228             ext_net_name=ext_net_name, log_level=log_level))
229         suite.addTest(OSComponentTestCase.parameterize(
230             CreateProjectSuccessTests, os_creds=os_creds,
231             ext_net_name=ext_net_name, log_level=log_level))
232         suite.addTest(OSComponentTestCase.parameterize(
233             CreateProjectUserTests, os_creds=os_creds,
234             ext_net_name=ext_net_name, log_level=log_level))
235
236     suite.addTest(OSComponentTestCase.parameterize(
237         GlanceUtilsTests, os_creds=os_creds, ext_net_name=ext_net_name,
238         image_metadata=image_metadata,
239         log_level=log_level))
240     suite.addTest(OSComponentTestCase.parameterize(
241         NeutronUtilsNetworkTests, os_creds=os_creds, ext_net_name=ext_net_name,
242         log_level=log_level))
243     suite.addTest(OSComponentTestCase.parameterize(
244         NeutronUtilsSubnetTests, os_creds=os_creds, ext_net_name=ext_net_name,
245         log_level=log_level))
246     suite.addTest(OSComponentTestCase.parameterize(
247         NeutronUtilsRouterTests, os_creds=os_creds, ext_net_name=ext_net_name,
248         log_level=log_level))
249     suite.addTest(OSComponentTestCase.parameterize(
250         NeutronUtilsSecurityGroupTests, os_creds=os_creds,
251         ext_net_name=ext_net_name, log_level=log_level))
252     suite.addTest(OSComponentTestCase.parameterize(
253         NeutronUtilsFloatingIpTests, os_creds=os_creds,
254         ext_net_name=ext_net_name, log_level=log_level))
255     suite.addTest(OSComponentTestCase.parameterize(
256         NovaUtilsKeypairTests, os_creds=os_creds, ext_net_name=ext_net_name,
257         log_level=log_level))
258     suite.addTest(OSComponentTestCase.parameterize(
259         NovaUtilsFlavorTests, os_creds=os_creds, ext_net_name=ext_net_name,
260         log_level=log_level))
261     suite.addTest(OSComponentTestCase.parameterize(
262         NovaUtilsInstanceTests, os_creds=os_creds, ext_net_name=ext_net_name,
263         log_level=log_level, image_metadata=image_metadata))
264     suite.addTest(OSComponentTestCase.parameterize(
265         CreateFlavorTests, os_creds=os_creds, ext_net_name=ext_net_name,
266         log_level=log_level))
267     suite.addTest(OSComponentTestCase.parameterize(
268         HeatUtilsCreateStackTests, os_creds=os_creds,
269         ext_net_name=ext_net_name, log_level=log_level,
270         image_metadata=image_metadata))
271
272
273 def add_openstack_integration_tests(suite, os_creds, ext_net_name,
274                                     use_keystone=True, flavor_metadata=None,
275                                     image_metadata=None, use_floating_ips=True,
276                                     log_level=logging.INFO):
277     """
278     Adds tests written to exercise all long-running OpenStack integration tests
279     meaning they will be creating VM instances and potentially performing some
280     SSH functions through floatingIPs
281     :param suite: the unittest.TestSuite object to which to add the tests
282     :param os_creds: and instance of OSCreds that holds the credentials
283                      required by OpenStack
284     :param ext_net_name: the name of an external network on the cloud under
285                          test
286     :param use_keystone: when True, tests requiring direct access to Keystone
287                          are added as these need to be running on a host that
288                          has access to the cloud's private network
289     :param image_metadata: dict() object containing metadata for creating an
290                            image with custom config
291                            (see YAML files in examples/image-metadata)
292     :param flavor_metadata: dict() object containing the metadata required by
293                             your flavor based on your configuration:
294                             (i.e. {'hw:mem_page_size': 'large'})
295     :param use_floating_ips: when true, all tests requiring Floating IPs will
296                              be added to the suite
297     :param log_level: the logging level
298     :return: None as the tests will be adding to the 'suite' parameter object
299     """
300     # Tests the OpenStack API calls via a creator. If use_keystone, objects
301     # will be created with a custom user and project
302
303     # Creator Object tests
304     suite.addTest(OSIntegrationTestCase.parameterize(
305         CreateSecurityGroupTests, os_creds=os_creds, ext_net_name=ext_net_name,
306         use_keystone=use_keystone,
307         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
308         log_level=log_level))
309     suite.addTest(OSIntegrationTestCase.parameterize(
310         CreateImageSuccessTests, os_creds=os_creds, ext_net_name=ext_net_name,
311         use_keystone=use_keystone,
312         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
313         log_level=log_level))
314     suite.addTest(OSIntegrationTestCase.parameterize(
315         CreateImageNegativeTests, os_creds=os_creds, ext_net_name=ext_net_name,
316         use_keystone=use_keystone,
317         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
318         log_level=log_level))
319     suite.addTest(OSIntegrationTestCase.parameterize(
320         CreateMultiPartImageTests, os_creds=os_creds,
321         ext_net_name=ext_net_name, use_keystone=use_keystone,
322         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
323         log_level=log_level))
324     suite.addTest(OSIntegrationTestCase.parameterize(
325         CreateKeypairsTests, os_creds=os_creds, ext_net_name=ext_net_name,
326         use_keystone=use_keystone,
327         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
328         log_level=log_level))
329     suite.addTest(OSIntegrationTestCase.parameterize(
330         CreateKeypairsCleanupTests, os_creds=os_creds,
331         ext_net_name=ext_net_name,
332         use_keystone=use_keystone,
333         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
334         log_level=log_level))
335     suite.addTest(OSIntegrationTestCase.parameterize(
336         CreateNetworkSuccessTests, os_creds=os_creds,
337         ext_net_name=ext_net_name, use_keystone=use_keystone,
338         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
339         log_level=log_level))
340     suite.addTest(OSIntegrationTestCase.parameterize(
341         CreateRouterSuccessTests, os_creds=os_creds, ext_net_name=ext_net_name,
342         use_keystone=use_keystone,
343         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
344         log_level=log_level))
345     suite.addTest(OSIntegrationTestCase.parameterize(
346         CreateRouterNegativeTests, os_creds=os_creds,
347         ext_net_name=ext_net_name, use_keystone=use_keystone,
348         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
349         log_level=log_level))
350
351     # VM Instances
352     suite.addTest(OSIntegrationTestCase.parameterize(
353         SimpleHealthCheck, os_creds=os_creds, ext_net_name=ext_net_name,
354         use_keystone=use_keystone,
355         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
356         log_level=log_level))
357     suite.addTest(OSIntegrationTestCase.parameterize(
358         CreateInstanceTwoNetTests, os_creds=os_creds,
359         ext_net_name=ext_net_name, use_keystone=use_keystone,
360         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
361         log_level=log_level))
362     suite.addTest(OSIntegrationTestCase.parameterize(
363         CreateInstanceSimpleTests, os_creds=os_creds,
364         ext_net_name=ext_net_name, use_keystone=use_keystone,
365         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
366         log_level=log_level))
367     suite.addTest(OSIntegrationTestCase.parameterize(
368         CreateInstancePortManipulationTests, os_creds=os_creds,
369         ext_net_name=ext_net_name, use_keystone=use_keystone,
370         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
371         log_level=log_level))
372     suite.addTest(OSIntegrationTestCase.parameterize(
373         InstanceSecurityGroupTests, os_creds=os_creds,
374         ext_net_name=ext_net_name, use_keystone=use_keystone,
375         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
376         log_level=log_level))
377     suite.addTest(OSIntegrationTestCase.parameterize(
378         CreateInstanceOnComputeHost, os_creds=os_creds,
379         ext_net_name=ext_net_name, use_keystone=use_keystone,
380         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
381         log_level=log_level))
382     suite.addTest(OSIntegrationTestCase.parameterize(
383         CreateInstanceFromThreePartImage, os_creds=os_creds,
384         ext_net_name=ext_net_name, use_keystone=use_keystone,
385         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
386         log_level=log_level))
387     suite.addTest(OSIntegrationTestCase.parameterize(
388         CreateStackSuccessTests, os_creds=os_creds, ext_net_name=ext_net_name,
389         use_keystone=use_keystone,
390         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
391         log_level=log_level))
392     suite.addTest(OSIntegrationTestCase.parameterize(
393         CreateStackNegativeTests, os_creds=os_creds, ext_net_name=ext_net_name,
394         use_keystone=use_keystone,
395         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
396         log_level=log_level))
397
398     if use_floating_ips:
399         suite.addTest(OSIntegrationTestCase.parameterize(
400             CreateInstanceSingleNetworkTests, os_creds=os_creds,
401             ext_net_name=ext_net_name, use_keystone=use_keystone,
402             flavor_metadata=flavor_metadata, image_metadata=image_metadata,
403             log_level=log_level))
404         suite.addTest(OSIntegrationTestCase.parameterize(
405             CreateInstancePubPrivNetTests, os_creds=os_creds,
406             ext_net_name=ext_net_name, use_keystone=use_keystone,
407             flavor_metadata=flavor_metadata, image_metadata=image_metadata,
408             log_level=log_level))
409         suite.addTest(OSIntegrationTestCase.parameterize(
410             AnsibleProvisioningTests, os_creds=os_creds,
411             ext_net_name=ext_net_name, use_keystone=use_keystone,
412             flavor_metadata=flavor_metadata, image_metadata=image_metadata,
413             log_level=log_level))
414
415
416 def add_openstack_ci_tests(
417         suite, os_creds, ext_net_name, use_keystone=True, flavor_metadata=None,
418         image_metadata=None, use_floating_ips=True, log_level=logging.INFO):
419     """
420     Adds tests written for a CI server to run the tests to validate code
421     changes
422     :param suite: the unittest.TestSuite object to which to add the tests
423     :param os_creds: and instance of OSCreds that holds the credentials
424                      required by OpenStack
425     :param ext_net_name: the name of an external network on the cloud under
426                          test
427     :param use_keystone: when True, tests requiring direct access to Keystone
428                          are added as these need to be running on a host that
429                          has access to the cloud's private network
430     :param image_metadata: dict() object containing metadata for creating an
431                            image with custom config
432                            (see YAML files in examples/image-metadata)
433     :param flavor_metadata: dict() object containing the metadata required by
434                             your flavor based on your configuration:
435                             (i.e. {'hw:mem_page_size': 'large'})
436     :param use_floating_ips: when true, all tests requiring Floating IPs will
437                              be added to the suite
438     :param log_level: the logging level
439     :return: None as the tests will be adding to the 'suite' parameter object
440     """
441
442     add_unit_tests(suite)
443
444     add_openstack_client_tests(suite, os_creds, ext_net_name, use_keystone,
445                                log_level)
446
447     add_openstack_api_tests(suite, os_creds, ext_net_name, use_keystone,
448                             image_metadata, log_level)
449
450     suite.addTest(OSIntegrationTestCase.parameterize(
451         SimpleHealthCheck, os_creds=os_creds, ext_net_name=ext_net_name,
452         use_keystone=use_keystone,
453         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
454         log_level=log_level))
455
456     if use_floating_ips:
457         suite.addTest(OSIntegrationTestCase.parameterize(
458             CreateInstanceSingleNetworkTests, os_creds=os_creds,
459             ext_net_name=ext_net_name, use_keystone=use_keystone,
460             flavor_metadata=flavor_metadata, image_metadata=image_metadata,
461             log_level=log_level))
462
463     suite.addTest(OSIntegrationTestCase.parameterize(
464         CreateStackSuccessTests, os_creds=os_creds, ext_net_name=ext_net_name,
465         use_keystone=use_keystone,
466         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
467         log_level=log_level))
468     suite.addTest(OSIntegrationTestCase.parameterize(
469         CreateStackNegativeTests, os_creds=os_creds, ext_net_name=ext_net_name,
470         use_keystone=use_keystone,
471         flavor_metadata=flavor_metadata, image_metadata=image_metadata,
472         log_level=log_level))
473
474
475 def add_openstack_staging_tests(suite, os_creds, ext_net_name,
476                                 log_level=logging.INFO):
477     """
478     Adds tests that are still in development have not been designed to run
479     successfully against all OpenStack pods
480     :param suite: the unittest.TestSuite object to which to add the tests
481     :param os_creds: Instance of OSCreds that holds the credentials
482                     required by OpenStack
483     :param ext_net_name: the name of an external network on the cloud under
484                          test
485     :param log_level: the logging level
486     :return: None as the tests will be adding to the 'suite' parameter object
487     """
488     suite.addTest(OSComponentTestCase.parameterize(
489         CreateNetworkTypeTests, os_creds=os_creds, ext_net_name=ext_net_name,
490         log_level=log_level))
491     suite.addTest(OSComponentTestCase.parameterize(
492         CreateInstanceMockOfflineTests, os_creds=os_creds,
493         ext_net_name=ext_net_name, log_level=log_level))