Skip to content

Commit 960c926

Browse files
author
Clark Perkins
committed
Support adding title in map files
1 parent c2a0db5 commit 960c926

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_python_version():
4545
LONG_DESCRIPTION = f.read()
4646

4747
requirements = [
48-
'Jinja2==2.7.3',
48+
'Jinja2>=2.7',
4949
'PyYAML>=3.10',
5050
'click>=6.0,<7.0',
5151
'click-shell>=0.4',

stackdio/cli/mixins/blueprints.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def list_templates(client):
7474
_recurse_dir(os.path.join(blueprint_dir, 'var_files'), ['yaml', 'yml'])
7575

7676

77-
def _create_single_blueprint(config, template_file, var_files, no_prompt):
77+
def _create_single_blueprint(config, template_file, var_files, no_prompt, extra_vars=None):
7878
blueprint_dir = os.path.expanduser(config['blueprint_dir'])
7979

8080
gen = BlueprintGenerator([os.path.join(blueprint_dir, 'templates')])
@@ -102,6 +102,7 @@ def _create_single_blueprint(config, template_file, var_files, no_prompt):
102102
# Generate the JSON for the blueprint
103103
return gen.generate(template_file,
104104
final_var_files, # Pass in a list
105+
variables=extra_vars,
105106
prompt=no_prompt)
106107

107108

@@ -172,7 +173,7 @@ def create_all_blueprints(client):
172173
for name, vals in mapping.items():
173174
try:
174175
bp_json = _create_single_blueprint(client.config, vals['template'],
175-
vals['var_file'], False)
176+
vals['var_files'], False, {'title': name})
176177
client.create_blueprint(bp_json)
177178
click.secho('Created blueprint {0}'.format(name), fg='green')
178179
except BlueprintException:

0 commit comments

Comments
 (0)