aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/env.py
blob: 86b2be3dc8a21062848445edd7dec977566ef042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os

default_envs = {
    'NODE_NAME': 'unknown_pod',
    'CI_DEBUG': 'true',
    'DEPLOY_SCENARIO': 'os-nosdn-nofeature-noha',
    'DEPLOY_TYPE': 'virt',
    'INSTALLER_TYPE': None,
    'INSTALLER_IP': None,
    'BUILD_TAG': None
}


class Environment(object):

    def __init__(self):
        for k, v in os.environ.iteritems():
            self.__setattr__(k, v)
        for k, v in default_envs.iteritems():
            if k not in os.environ:
                self.__setattr__(k, v)


ENV = Environment()