YAML template with empty sections
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Undecided
|
Sergey Kraynev |
Bug Description
When I try to create stack using yaml template:
heat_template_
description: >
A very simple template
parameters:
resources:
compute_instance:
type: OS::Nova::Server
properties:
name: Hello1
key_name : heat_key
image : fedora-20.x86_64
flavor: m1.small
outputs:
compute_
value: { get_attr: [compute_instance, networks]}
I get error: "ERROR: 'NoneType' object has no attribute 'iteritems' "
Same behavior you could get, when use template with empty resources or outputs sections (such as parameters in current example).
In other side JSON gives a ability to create such stack (it works without any error):
{
"AWSTemplateF
"Parameters" : {
},
"Resources" : {
},
"Outputs": {
}
}
The cause of problem is:
yaml create dictionary with key "parameters" ("resources", "outputs") and value None.
Existing code catches situation only when section is absent and does not handle example above.
Changed in heat: | |
assignee: | nobody → Sergey Kraynev (skraynev) |
Changed in heat: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | juno-1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/90058
Review: https:/