OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC

 View Only

Default values in property definitions

  • 1.  Default values in property definitions

    Posted 10-19-2018 10:31
    Hi,   We spent a good part of the call on Oct 16 th discussing the use of the default keyname in property definitions. I would like to leave a note of the conclusions, as this information will be used by SOL001:   1. For mandatory properties (required: true), if a default value is provided in the property definition, it is valid not to have a property assignment in a node template using the property, because the default value will be applied.   2. For optional properties (required: false), it is of no use to provide a default value in the property definition, since a node template will either:    - use the property, and in that case, it will include a property assignment which necessarily has to assign a value    - or not use the property, and in that case there will not be a property assignment and the property will not exist for the node   3.  There are properties whose values are not known at service template design time, or where the service template author would prefer to leave it up to the orchestrator to assign a value at run time (e.g. ip_address_type). However with the current TOSCA mechanisms, this scenario may require use of the use of an intrinsic function like get_input. Not including a property assignment of an optional property in a node template means “the property does not exist”, it doesn’t mean “I don’t care which value it is assigned”.   Best regards, Arturo