Scenario runner can print the the generated configuration

Print the generated YAML configuration when the verbose mode
is enabled.

Change-Id: Ia84f12fa3c833b4db84c4842e57083f074f381e9
This commit is contained in:
Luigi Toscano 2019-01-03 14:40:28 +01:00
parent e4e5e315de
commit 23af1543a2
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
features:
- |
The fully generated YAML file is printed when the verbose mode is enabled.

View File

@ -125,6 +125,12 @@ def generate_config(files, template_variables, auth_values, verbose_run):
else:
raise ValueError('Job flow exist')
config['credentials'].update(auth_values['credentials'])
if verbose_run:
six.print_("Generated configuration:\n%s" % (
yaml.safe_dump(config,
allow_unicode=True,
default_flow_style=False)),
flush=True)
return config