Tal Liron created ARIA-271:
------------------------------

             Summary: Parameter.value should verify the type of an evaluation
                 Key: ARIA-271
                 URL: https://issues.apache.org/jira/browse/ARIA-271
             Project: AriaTosca
          Issue Type: Story
            Reporter: Tal Liron


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:
{code}
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 ] }
{code}
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.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to