import os
-import six
+import prettytable
+from xtesting.utils import env
INPUTS = {
'EXTERNAL_NETWORK': None,
- 'CI_LOOP': 'daily',
- 'DEPLOY_SCENARIO': 'os-nosdn-nofeature-noha',
- 'INSTALLER_TYPE': None,
+ 'CI_LOOP': env.INPUTS['CI_LOOP'],
+ 'DEPLOY_SCENARIO': env.INPUTS['DEPLOY_SCENARIO'],
+ 'INSTALLER_TYPE': env.INPUTS['INSTALLER_TYPE'],
'SDN_CONTROLLER_IP': None,
- 'BUILD_TAG': None,
- 'NODE_NAME': None,
+ 'SDN_CONTROLLER_USER': 'admin',
+ 'SDN_CONTROLLER_PASSWORD': 'admin',
+ 'SDN_CONTROLLER_WEBPORT': '8080',
+ 'SDN_CONTROLLER_RESTCONFPORT': '8181',
+ 'BUILD_TAG': env.INPUTS['BUILD_TAG'],
+ 'NODE_NAME': env.INPUTS['NODE_NAME'],
'POD_ARCH': None,
- 'TEST_DB_URL': 'http://testresults.opnfv.org/test/api/v1/results',
- 'ENERGY_RECORDER_API_URL': 'http://energy.opnfv.fr/resources',
- 'ENERGY_RECORDER_API_USER': '',
- 'ENERGY_RECORDER_API_PASSWORD': ''
+ 'TEST_DB_URL': env.INPUTS['TEST_DB_URL'],
+ 'ENERGY_RECORDER_API_URL': env.INPUTS['ENERGY_RECORDER_API_URL'],
+ 'ENERGY_RECORDER_API_USER': env.INPUTS['ENERGY_RECORDER_API_USER'],
+ 'ENERGY_RECORDER_API_PASSWORD': env.INPUTS['ENERGY_RECORDER_API_PASSWORD'],
+ 'VOLUME_DEVICE_NAME': 'vdb',
+ 'NAMESERVER': '8.8.8.8',
+ 'NEW_USER_ROLE': 'Member'
}
return os.environ.get(env_var, INPUTS[env_var])
-class Environment(object): # pylint: disable=too-few-public-methods
-
- # Backward compatibilty (waiting for SDNVPN and SFC)
- def __init__(self):
- for key, _ in six.iteritems(INPUTS):
- setattr(self, key, get(key))
-
-# Backward compatibilty (waiting for SDNVPN and SFC)
-ENV = Environment()
+def string():
+ msg = prettytable.PrettyTable(
+ header_style='upper', padding_width=5,
+ field_names=['env var', 'value'])
+ for env_var in INPUTS:
+ msg.add_row([env_var, get(env_var) if get(env_var) else ''])
+ return msg