Closed lauwers closed 1 year ago
I believe we all decided the use case above is valid. Here is what this would look like after converting to TOSCA Version 2:
tosca_definitions_version: tosca_2_0
node_types:
NodeType:
properties:
minimum_instances:
type: integer
validation: { $greater_or_equal: [ $value, 0 ] } # positive integer
maximum_instances:
type: integer
validation: { $greater_or_equal: [ $value, { $get_property: [ SELF, minimum_instances ] } ] }
default_instances:
type: integer
validation:
$and:
- { $greater_or_equal: [ $value, { $get_property: [ SELF, minimum_instances ] } ] }
- { $less_or_equal: [ $value, { $get_property: [ SELF, maximum_instances ] } ] }
required: false
The example above is deemed valid and is shown in Section 5.4.6.3 of https://docs.oasis-open.org/tosca/TOSCA/v2.0/csd05/TOSCA-v2.0-csd05.html
I believe we all agree that functions are allowed in filter definitions (which in v1.3 were defined using constraint clauses). But what about regular constraint clauses in property definitions? Are functions allowed in those definitions? For example, is the following valid?