blob: 50f333756f45357ef510bf9149439aa00c8ac2ef [file] [log] [blame]
Dennis Dmitriev6f59add2016-10-18 13:45:27 +03001# Copyright 2016 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14import os
Dennis Dmitriev6f59add2016-10-18 13:45:27 +030015import time
16
17_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
18 '0': False, 'no': False, 'false': False, 'off': False}
19
Dennis Dmitriev6f59add2016-10-18 13:45:27 +030020
21def get_var_as_bool(name, default):
22 value = os.environ.get(name, '')
23 return _boolean_states.get(value.lower(), default)
24
25
26LOGS_DIR = os.environ.get('LOGS_DIR', os.getcwd())
27TIMESTAT_PATH_YAML = os.environ.get(
28 'TIMESTAT_PATH_YAML', os.path.join(
29 LOGS_DIR, 'timestat_{}.yaml'.format(time.strftime("%Y%m%d"))))
30
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030031VIRTUAL_ENV = os.environ.get("VIRTUAL_ENV", None)
32ENV_NAME = os.environ.get("ENV_NAME", None)
Dennis Dmitriev411dd102017-09-15 16:04:47 +030033MAKE_SNAPSHOT_STAGES = get_var_as_bool("MAKE_SNAPSHOT_STAGES", True)
34SHUTDOWN_ENV_ON_TEARDOWN = get_var_as_bool('SHUTDOWN_ENV_ON_TEARDOWN', True)
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030035
Dennis Dmitriev2a13a132016-11-04 00:56:23 +020036LAB_CONFIG_NAME = os.environ.get('LAB_CONFIG_NAME', 'mk22-lab-basic')
Dina Belovae6fdffb2017-09-19 13:58:34 -070037# LAB_CONFIGS_NAME = os.environ.get('LAB_NAME', 'mk22-lab-advanced')
Dennis Dmitriev2a13a132016-11-04 00:56:23 +020038
Dennis Dmitriev95126792016-10-18 17:03:30 +030039SSH_LOGIN = os.environ.get('SSH_LOGIN', 'root')
40SSH_PASSWORD = os.environ.get('SSH_PASSWORD', 'r00tme')
Dennis Dmitriev6f59add2016-10-18 13:45:27 +030041SSH_NODE_CREDENTIALS = {"login": SSH_LOGIN,
42 "password": SSH_PASSWORD}
43
Dennis Dmitrievd2604512018-06-04 05:34:44 +030044# http://docs.paramiko.org/en/2.4/api/transport.html\
45# #paramiko.transport.Transport.set_keepalive
46# If this is set, after interval seconds without sending any data over the
47# connection, a "keepalive" packet will be sent (and ignored by the remote
48# host). Similar to ServerAliveInterval for ssh_config.
49# '0' to disable keepalives.
50SSH_SERVER_ALIVE_INTERVAL = int(
51 os.environ.get('SSH_SERVER_ALIVE_INTERVAL', 60))
52
Dennis Dmitriev6f59add2016-10-18 13:45:27 +030053# public_iface = IFACES[0]
54# private_iface = IFACES[1]
55IFACES = [
56 os.environ.get("IFACE_0", "eth0"),
57 os.environ.get("IFACE_1", "eth1"),
58]
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030059
60SALT_USER = os.environ.get('SALT_USER', 'salt')
61SALT_PASSWORD = os.environ.get('SALT_PASSWORD', 'hovno12345!')
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030062
63DOCKER_REGISTRY = os.environ.get('DOCKER_REGISTRY',
Dennis Dmitriev257a9382018-02-15 04:00:46 +020064 'docker-prod-local.artifactory.mirantis.com')
ibumarskoved91a0d2017-11-21 10:17:53 +030065DOCKER_NAME = os.environ.get('DOCKER_NAME',
66 'mirantis/oscore/rally-tempest:latest')
Dennis Dmitriev257a9382018-02-15 04:00:46 +020067DOCKER_IMAGES_SL_TAG = os.environ.get('DOCKER_IMAGES_SL_TAG', 'latest')
Tatyana Leontovichf8ec90d2017-07-18 16:36:16 +030068
Tatyana Leontovich53bd1f92017-09-08 13:04:42 +030069PATTERN = os.environ.get('PATTERN', None)
70RUN_TEMPEST = get_var_as_bool('RUN_TEMPEST', False)
sgudzf5a51222018-05-11 14:20:50 +030071RUN_SL_TESTS = get_var_as_bool('RUN_SL_TESTS', False)
Dmitry Tyzhnenkoc56b77e2018-05-21 11:01:43 +030072
73TEMPEST_IMAGE = os.environ.get(
74 'TEMPEST_IMAGE',
75 'docker-prod-virtual.docker.mirantis.net/mirantis/cicd/ci-tempest') # noqa
Oleksii Butenko71d76f32018-06-05 17:46:34 +030076TEMPEST_IMAGE_VERSION = os.environ.get('TEMPEST_IMAGE_VERSION', 'pike')
Dmitry Tyzhnenkoc56b77e2018-05-21 11:01:43 +030077TEMPEST_PATTERN = os.environ.get('TEMPEST_PATTERN', 'tempest')
Oleksii Butenko71d76f32018-06-05 17:46:34 +030078TEMPEST_TIMEOUT = int(os.environ.get('TEMPEST_TIMEOUT', 60 * 60 * 5))
Oleksii Butenkoe82441d2018-06-12 16:01:33 +030079TEMPEST_THREADS = int(os.environ.get('TEMPEST_THREADS', 2))
80TEMPEST_EXCLUDE_TEST_ARGS = os.environ.get(
81 'TEMPEST_EXCLUDE_TEST_ARGS',
82 '--blacklist-file mcp_pike_lvm_skip.list')
83TEMPEST_TARGET = os.environ.get('TEMPEST_TARGET', 'gtw01')