Merge "[Heat] Fix default values displaying for "Launch Stack""

This commit is contained in:
Jenkins 2015-04-05 20:29:28 +00:00 committed by Gerrit Code Review
commit 7b61b6125b
2 changed files with 5 additions and 1 deletions

View File

@ -327,6 +327,10 @@ class CreateStackForm(forms.SelfHandlingForm):
field_args['choices'] = choices
field = forms.ChoiceField(**field_args)
elif param_type == 'Json' and 'Default' in param:
field_args['initial'] = json.dumps(param['Default'])
field = forms.CharField(**field_args)
elif param_type in ('CommaDelimitedList', 'String', 'Json'):
if 'MinLength' in param:
field_args['min_length'] = int(param['MinLength'])

View File

@ -60,7 +60,7 @@ downloadcache = ~/cache/pip
exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject
# H405 multi line docstring summary not separated with an empty line
ignore = H405
max-complexity = 19
max-complexity = 20
[hacking]
import_exceptions = collections.defaultdict,