Properties translations depend on HOT and Cfn template formats
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Peter Razumovsky |
Bug Description
The properties translation code is replete with special cases for specific functions in the HOT and CloudFormation template formats:
http://
http://
http://
This makes it impossible for third-party template format plugins to be first-class citizens in Heat, as they are liable to break whenever someone adds a translation rule.
It's also inconceivable that the code is actually correct. It totally fails to take into account such subtleties as the fact that the specific functions it's looking for may in fact be present but buried inside the arguments to other functions.
It's very difficult to determine what the edge cases that this code was designed to catch were, and thus to suggest a better implementation. An obvious one that springs to mind is that checking for dependencies returned by function.
Finally, (and this might be the reason for the edge cases) the whole thing operates by modifying data behind the scenes, which is fairly unsafe. It would be much better if it returned a copy of the data incorporating the modifications.
Fix proposed to branch: master /review. openstack. org/366491
Review: https:/