Fix an invalid class name (vGPU)
[functest.git] / functest / opnfv_tests / openstack / snaps / health_check.py
1 #!/usr/bin/env python
2
3 # Copyright (c) 2017 Cable Television Laboratories, Inc. and others.
4 #
5 # This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10
11 """snaps_health_check test case implementation"""
12
13 import unittest
14
15 from snaps.openstack.tests.create_instance_tests import SimpleHealthCheck
16 from snaps.openstack.tests.os_source_file_test import OSIntegrationTestCase
17
18 from functest.opnfv_tests.openstack.snaps.snaps_test_runner import (
19     SnapsTestRunner)
20
21
22 class HealthCheck(SnapsTestRunner):
23     """
24     This test executes the SNAPS Python Test case SimpleHealthCheck which
25     creates a VM with a single port with an IPv4 address that is assigned by
26     DHCP. This test then validates the expected IP with the actual
27     """
28     def __init__(self, **kwargs):
29         if "case_name" not in kwargs:
30             kwargs["case_name"] = "snaps_images_cirros"
31         super(HealthCheck, self).__init__(**kwargs)
32
33         self.suite = unittest.TestSuite()
34
35     def run(self, **kwargs):
36         """
37         Builds the test suite then calls super.run()
38         :param kwargs: the arguments to pass on
39         :return:
40         """
41         self.suite.addTest(
42             OSIntegrationTestCase.parameterize(
43                 SimpleHealthCheck, os_creds=self.os_creds,
44                 ext_net_name=self.ext_net_name,
45                 use_keystone=self.use_keystone,
46                 flavor_metadata=self.flavor_metadata,
47                 image_metadata=self.image_metadata,
48                 netconf_override=self.netconf_override))
49         return super(HealthCheck, self).run()