67cd9415ee5a0e2f0b6d38e7c147b30e74b2b37d
[functest.git] / functest / opnfv_tests / openstack / snaps / snaps_test_runner.py
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
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7
8 from functest.core.pytest_suite_runner import PyTestSuiteRunner
9 from functest.opnfv_tests.openstack.snaps import snaps_utils
10 from functest.utils import functest_utils
11
12 from snaps.openstack import create_flavor
13
14
15 class SnapsTestRunner(PyTestSuiteRunner):
16     """
17     This test executes the SNAPS Python Test case SimpleHealthCheck which
18     creates a VM with a single port with an IPv4 address that is assigned by
19     DHCP. This test then validates the expected IP with the actual
20     """
21     def __init__(self):
22         super(SnapsTestRunner, self).__init__()
23
24         self.ext_net_name = snaps_utils.get_ext_net_name()
25
26         scenario = functest_utils.get_scenario()
27
28         self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_ANY
29         if 'ovs' in scenario or 'fdio' in scenario:
30             self.flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE