Allow Plugins to provide custom Fn:: functions
The idea here is to be able to extend the templating system with your own functions.
This will be based on the same plugin system as used for resources. However functions are a bit trickier: there are two sets of functions we run at different times - ones dealing with static data and ones dealing with runtime data. We may need to provide a way to register each type separately.
We also currently apply functions in a fixed order, which is likely (although not guaranteed) to result in everything in the template being able to be resolved. We'll probably need to fix this so that all functions are guaranteed to resolve no matter their order of nesting.
Blueprint information
- Status:
- Complete
- Approver:
- Steven Hardy
- Priority:
- High
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- Zane Bitter
- Definition:
- Approved
- Series goal:
- Accepted for icehouse
- Implementation:
- Implemented
- Milestone target:
- 2014.1
- Started by
- Zane Bitter
- Completed by
- Zane Bitter
Related branches
Whiteboard
(stevebaker) It looks like the direction for HOT is for a small focused group of functions, and implementing some function-type behaviour with resources. Should we obsolete this blueprint for now?
(zaneb) There are some possible architectural benefits (especially with supporting multiple template formats) to doing this work. I'm actually playing around with some stuff at the moment, so let's no obsolete it quite yet.
(pafuent) If I got it right, dependencies among resources are now handled considering only a limited set of specific functions (https:/
Gerrit topic: https:/
Addressed by: https:/
Prevent user introspection of Python objects
Addressed by: https:/
Add a base class for pluggable functions
Addressed by: https:/
Refactor re-resolving of templates
Addressed by: https:/
Re-resolve functions during stack update
Addressed by: https:/
Calculate dependencies based on unresolved template
Addressed by: https:/
Evaluate lazy functions in autoscaling launch config
Addressed by: https:/
unit tests: Always resolve static functions
Addressed by: https:/
Fix test_associatio
Addressed by: https:/
unit tests: Fix types in Fn::ResourceFacade tests
Addressed by: https:/
unit tests: Refactor to accomodate lazy evaluation
Addressed by: https:/
Replace function resolution with lazy evaluation
Addressed by: https:/
Move HOT to a separate subpackage
Addressed by: https:/
Provide access to the template version
Addressed by: https:/
Disallow Heat-only functions in CloudFormation templates
Addressed by: https:/
Move built-in functions to separate modules
Addressed by: https:/
Remove Fn::FindInMap from HOT
Addressed by: https:/
Give cfn a separate Template class
Addressed by: https:/
Add a plugin_manager module
Addressed by: https:/
Use PluginManager to load resources
Addressed by: https:/
Load functions from plugins
Addressed by: https:/
Move the code that reads the global environment
Addressed by: https:/
Docs: use the plugin manager to list resources
Gerrit topic: https:/
Work Items
Dependency tree
* Blueprints in grey have been implemented.