output-show for parameter accessing incorrect attribute returns 'null'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-heatclient |
Fix Released
|
Medium
|
Unmesh Gurjar |
Bug Description
Branch: master
Description:
For resources like ResourceGroup, the output parameters are not validated during stack creation (bug #1368039). When a stack has an output parameter which accesses an incorrect attribute of a ResourceGroup resource, the output-show command returns the string 'null'. Returning a 'null' value for an output parameter will convey incorrect information to the user. Instead, returning an error indicating the invalid attribute access would be helpful.
Scenario:
1. Create a stack (named 'mystack') using the attached template (which has an output accessing an incorrect attribute of resource OS::Nova::Server).
2. Upon completion of stack, issue the 'heat output-show mystack instance1_ip' and observe the output.
Actual result:
The text 'null' gets displayed.
Expected behavior:
The command should return an error indicating the incorrect attribute being accessed. As in this case, returning a 'null' would convey incorrect meaning that the server resource was not allocated an IP address.
Changed in python-heatclient: | |
importance: | Undecided → Medium |
tags: | added: juno-rc-potential |
Changed in python-heatclient: | |
milestone: | none → v0.3.0 |
Changed in python-heatclient: | |
status: | Fix Committed → Fix Released |
The problem is that some attributes appear dynamically later in the resource's life-cycle, so raising an error for an attribute which isn't there *yet* isn't appropriate.