summaryrefslogtreecommitdiffstats
path: root/ci/genBundle.py
diff options
context:
space:
mode:
authorDavid Blaisonneau <david.blaisonneau@orange.com>2016-08-04 17:37:15 +0200
committerDavid Blaisonneau <david.blaisonneau@orange.com>2016-08-05 16:50:35 +0200
commit5cc5559348a8a18a41cfd25cce446955d63afb83 (patch)
tree75d5434688d3d4dbcc467581205c5fe4a40c2e60 /ci/genBundle.py
parenteae61f596efd44095dbb78db6e7dd45d249cf77e (diff)
New scripts for configs generation, based on jinja2
Signed-off-by: David Blaisonneau <david.blaisonneau@orange.com>
Diffstat (limited to 'ci/genBundle.py')
-rw-r--r--ci/genBundle.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/ci/genBundle.py b/ci/genBundle.py
index 8648ac3a..9c6781b5 100644
--- a/ci/genBundle.py
+++ b/ci/genBundle.py
@@ -34,7 +34,7 @@ labconfig_file = options.lab
scenarioconfig_file = 'default_deployment_config.yaml'
# Capture our current directory
-TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/bundle_tpl'
+TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/bundle_tpl'
#
# Prepare variables
@@ -186,8 +186,6 @@ if 'trusty' in extra:
if 'liberty' in extra:
config['os']['release'] = 'liberty'
-# pp(config)
-
#
# Transform template to bundle.yaml according to config
#
@@ -204,4 +202,13 @@ env.globals.update(unit_ceph_qty=unit_ceph_qty)
env.globals.update(to_select=to_select)
# Render the template
-print(template.render(**config))
+output = template.render(**config)
+
+# Check output syntax
+try:
+ yaml.load(output)
+except yaml.YAMLError as exc:
+ print(exc)
+
+# print output
+print(output)