Details
-
Story
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Currently, it is possible to have a parameter with an intrinsic function that return a type which is different from what the parameter has been configured for. Example:
node_types: WebApp: derived_from: tosca.nodes.WebApplication properties: port: type: integer interfaces: Standard: start: inputs: arg1: type: string topology_template: node_templates: web_app: type: WebApp properties: port: 9090 interfaces: Standard: start: scripts/start.sh inputs: arg1: { get_property: [ SELF, port ] }
This can lead to subtle errors. In the above, arg1 is a string, but the get_property function returns an int. No error is currently reported. (In many cases Python will coerce the value dynamically, but in some cases it may not.)