-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdefine.yaml
39 lines (27 loc) · 843 Bytes
/
define.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
tosca_definitions_version: tosca_simple_yaml_1_3
# Compare these two runs:
# puccini-tosca compile examples/javascript/define.yaml --coerce
# puccini-tosca compile examples/javascript/define.yaml --exec=define
# Also see: exec.yaml, functions.yaml
metadata:
template_name: JavaScript Define Example
template_author: Puccini
# In the functions.yaml example we saw how to define functions declaratively
# Here we will do it programmatically
puccini.scriptlet.import:define: imports/define.js
node_types:
Switch:
properties:
port:
type: integer
topology_template:
inputs:
port:
type: integer
default: 80
node_templates:
host:
type: Switch
properties:
# We will be redefining this function in define.js to double the value
port: { get_input: port }