-import os
+#!/usr/bin/env python
+import os
import yaml
-import env
+import six
+
+from functest.utils import env
class Config(object):
self._set_others()
def _parse(self, attr_now, left_parametes):
- for param_n, param_v in left_parametes.iteritems():
+ for param_n, param_v in six.iteritems(left_parametes):
attr_further = self._get_attr_further(attr_now, param_n)
if attr_further:
self.__setattr__(attr_further, param_v)
CONF = Config()
-
-if __name__ == "__main__":
- print CONF.vnf_cloudify_ims
- print CONF.vnf_cloudify_ims_tenant_images
- print CONF.vnf_cloudify_ims_tenant_images_centos_7
-import config
-import env
+#!/usr/bin/env python
+
+import six
+
+from functest.utils import config
+from functest.utils import env
class Constants(object):
def __init__(self):
- for attr_n, attr_v in config.CONF.__dict__.iteritems():
+ for attr_n, attr_v in six.iteritems(config.CONF.__dict__):
self.__setattr__(attr_n, attr_v)
- for env_n, env_v in env.ENV.__dict__.iteritems():
+ for env_n, env_v in six.iteritems(env.ENV.__dict__):
self.__setattr__(env_n, env_v)
CONST = Constants()
-
-if __name__ == '__main__':
- print CONST.__dict__
- print CONST.NODE_NAME
- print CONST.vIMS_clearwater_blueprint_url
- print CONST.vIMS_clearwater_blueprint_file_name
- print CONST.vIMS_clearwater_blueprint_name
+#!/usr/bin/env python
+
import os
import re
+import six
+
+
default_envs = {
'NODE_NAME': 'unknown_pod',
'CI_DEBUG': 'false',
class Environment(object):
def __init__(self):
- for k, v in os.environ.iteritems():
+ for k, v in six.iteritems(os.environ):
self.__setattr__(k, v)
- for k, v in default_envs.iteritems():
+ for k, v in six.iteritems(default_envs):
if k not in os.environ:
self.__setattr__(k, v)
self._set_ci_run()