From e405b66cb91871c88b0f6b6089f692aa82995c29 Mon Sep 17 00:00:00 2001 From: Tal Liron Date: Wed, 21 Apr 2021 12:59:55 -0500 Subject: [PATCH] Improve data types example --- examples/tosca/data-types.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/tosca/data-types.yaml b/examples/tosca/data-types.yaml index 80bb8a9e..7c191b34 100644 --- a/examples/tosca/data-types.yaml +++ b/examples/tosca/data-types.yaml @@ -164,6 +164,12 @@ data_types: topology_template: + inputs: + + number: + type: integer + default: 4 + node_templates: data: @@ -177,11 +183,12 @@ topology_template: # The "null" type can have only the null value 'null': null - integer_list: [ 1, 2, 3 ] + integer_list: [ 1, 2, 3, { get_input: number } ] string_map: Greeting: Hello - # Note that map keys could be function calls + # Note that values as well map keys could be function calls + Message: { concat: [ Good, ' ', Day ] } { concat: [ Recip, ient ] }: Puccini lowercase_string_map: @@ -226,7 +233,7 @@ topology_template: # Note that some YAML environments may support a !!timestamp type: # http://yaml.org/type/timestamp.html # Normally Puccini will not allow it, but it could be enabled via a quirk: - # puccini-tosca compile --quirk=data_types.string.permissive + # puccini-tosca compile --quirk=data_types.timestamp.permissive # (In this case the YAML parser parses the timestamp, not Puccini's TOSCA parser) #timestamp: !!timestamp 1975-09-15t12:34:56.7+02:00