Comment 15 for bug 1652928

Revision history for this message
Sahdev Zala (spzala) wrote :

@Sridhar: thanks for looking at it and update, I really appreciate it.

AS Bharath commented above, there seems no problem in resolving custom types. The implicit references you mentioned are working fine. About the second issue of translated template not providing expected result is due to the fact that the Tacker template (https://github.com/openstack/tacker/blob/master/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml) is not correct in providing 'targets' field syntax as expected by TOSCA specification. The 'targets' key name seats at the same level as 'properties' (i.e. it is one of the main sections of policies) but the template has provided it as property so the parser treats it as property and the translation can't make use of it. If you correct template as Bharath mentioned above and as given below snippet, it seems working fine. Bharath has tested it with Tacker.

Correct syntax:
  policies:
    - SP1:
        type: tosca.policies.tacker.Scaling
        targets: [VDU1, VDU2]
        properties:
          increment: 1
          cooldown: 120
          min_instances: 1
          max_instances: 3
          default_instances: 2
Incorrect syntax as provided in the https://github.com/openstack/tacker/blob/master/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml
  policies:
    - SP1:
        type: tosca.policies.tacker.Scaling
        properties:
          increment: 1
          cooldown: 120
          min_instances: 1
          max_instances: 3
          default_instances: 2
          targets: [VDU1, VDU2]