3 # Copyright (c) 2017 Cable Television Laboratories, Inc. and others.
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
9 # http://www.apache.org/licenses/LICENSE-2.0
11 """snaps_health_check test case implementation"""
15 from snaps.openstack.tests.create_instance_tests import SimpleHealthCheck
16 from snaps.openstack.tests.os_source_file_test import OSIntegrationTestCase
18 from functest.opnfv_tests.openstack.snaps.snaps_test_runner import (
22 class HealthCheck(SnapsTestRunner):
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
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)
33 self.suite = unittest.TestSuite()
35 def run(self, **kwargs):
37 Builds the test suite then calls super.run()
38 :param kwargs: the arguments to pass on
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()