aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/env.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/utils/env.py')
-rw-r--r--functest/utils/env.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/functest/utils/env.py b/functest/utils/env.py
index ed09d9f0..5ad870ed 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -11,6 +11,8 @@
import os
+import prettytable
+
INPUTS = {
'EXTERNAL_NETWORK': None,
'CI_LOOP': 'daily',
@@ -31,3 +33,12 @@ def get(env_var):
if env_var not in INPUTS.keys():
return os.environ.get(env_var, None)
return os.environ.get(env_var, INPUTS[env_var])
+
+
+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