1 # Copyright (c) 2015 All rights reserved
2 # This program and the accompanying materials
3 # are made available under the terms of the Apache License, Version 2.0
4 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
10 from functest.opnfv_tests.openstack.snaps.snaps_test_runner import \
12 from functest.utils.constants import CONST
14 from snaps.openstack.tests.os_source_file_test import OSIntegrationTestCase
15 from snaps.openstack.tests.create_instance_tests import SimpleHealthCheck
18 class HealthCheck(SnapsTestRunner):
20 This test executes the SNAPS Python Test case SimpleHealthCheck which
21 creates a VM with a single port with an IPv4 address that is assigned by
22 DHCP. This test then validates the expected IP with the actual
24 def __init__(self, **kwargs):
25 if "case_name" not in kwargs:
26 kwargs["case_name"] = "snaps_health_check"
27 super(HealthCheck, self).__init__(**kwargs)
29 self.suite = unittest.TestSuite()
31 image_custom_config = None
32 if hasattr(CONST, 'snaps_health_check'):
33 image_custom_config = CONST.__getattribute__('snaps_health_check')
35 OSIntegrationTestCase.parameterize(
36 SimpleHealthCheck, os_creds=self.os_creds,
37 ext_net_name=self.ext_net_name,
38 use_keystone=self.use_keystone,
39 flavor_metadata=self.flavor_metadata,
40 image_metadata=image_custom_config))