Use of the TOSCA Service Template inputs section to declare a configurable value the template user may supply at runtime. In this case, the property named (of type integer) is declared. “cpus” Use of a property constraint to the allowed integer values for the property to a “cpus” specific list supplied in the property declaration. Use of the TOSCA Service Template outputs section to declare a value the template user may request at runtime. In this case, the property named is declared “instance_ip” The output property is programmatically retrieved from the Compute node’s “instance_ip” property using the TOSCA Service Template-level get_property function. “ip_address” Logical Diagram TBD Sample YAML tosca_definitions_version: tosca_simple_ description: > TOSCA simple profile that just defines a single compute instance. Note, this example does not include default values on inputs properties. inputs: cpus: type: integer description: Number of CPUs for the server. constraints: - valid_values: [ 1, 2, 4, 8 ] node_templates: my_server: type: tosca.nodes.Compute properties: # compute properties disk_size: 10 # in GB { get_input: cpus } num_cpus: mem_size: 4 # in MB # host image properties os_arch: x86_64 os_type: linux os_distribution: ubuntu os_version: 12.04 outputs: instance_ip:
Use of the TOSCA Service Template inputs section to declare a configurable value the template user may supply at runtime. In this case, the property named “cpus” (of type integer) is declared. Use of a property constraint to the allowed integer values for the “cpus” property to a specific list supplied in the property declaration. Use of the TOSCA Service Template outputs section to declare a value the template user may request at runtime. In this case, the property named “instance_ip” is declared The “instance_ip” output property is programmatically retrieved from the Compute node’s “ip_address” property using the TOSCA Service Template-level get_property function. Logical Diagram TBD Sample YAML tosca_definitions_version: tosca_simple_ description: > TOSCA simple profile that just defines a single compute instance. Note, this example does not include default values on inputs properties. inputs: cpus: type: integer description: Number of CPUs for the server. constraints: - valid_values: [ 1, 2, 4, 8 ] node_templates: my_server: type: tosca.nodes.Compute properties: # compute properties disk_size: 10 # in GB num_cpus: { get_input: cpus } mem_size: 4 # in MB # host image properties os_arch: x86_64 os_type: linux os_distribution: ubuntu os_version: 12.04 outputs: instance_ip:
TOSCA-Simple-Profile-YAML-v1.0-wd02-Rev-04-JD.docx