OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

tosca message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [tosca] Questions on the TOSCA model

Hello Chris,

Appreciate your response. 

  1. ​For #1 - Understood your point, But we do have a use-case where we want to specify constraints on the node template. E.g. CentOS is a node type with memory constraints 2 - 8 GB, but when I am using that CentOS to create an application stack, I want the database to have constraints 4 - 8 (Good example is database vendor requires 4 GB minimum) 
  2. For#2 - In your suggestion: 
    1. ​I am missing one thing, how is standard-compute.yaml a topology template ? I thought it is just a node type ?
    2. I couldn't find a reference to the 'copy' keyword in the spec http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/csd02/TOSCA-Simple-Profile-YAML-v1.0-csd02.html#_Toc409427376,​ am I missing something ?

Thanks and Regards,

From: Chris Lauwers <lauwers@ubicity.com>
Sent: Wednesday, April 29, 2015 2:51 PM
To: Nikunj Nemani
Cc: tosca@lists.oasis-open.org
Subject: RE: [tosca] Questions on the TOSCA model

Hi Nikunj,


1.       You can’t specify constraints on properties in a node template. You can think of a node template as an “instance” of a node of a certain Node Type. When you define the node type, you specify all the properties for that type and any constraints on those properties. In the node template, you would assign values to those properties. Said another way: the “properties” key in a node type is used for “property definitions” and the “properties” key in a node template is for “property assignments”. When you assign values to properties, your software should validate whether those values satisfy the constraints specified in the node type.


2.       Two comments on your second question:

a.       If you have Compute nodes that need properties beyond those defined in tosca.nodes.Compute, you will have to create a derived Node Type that adds those properties. You can define your new node type in a separate YAML file that can be imported in the service templates that need it.

b.      If you want to create “standard” values that should be used for all your Compute nodes, you could do the following:

·   Create a separate file (e.g. standard-compute.yaml) that defines a node template (e.g. called standard_compute)  of your Compute type and assign your standard property values to that node template

·   Import this file into the service templates that want to use the standard property values

·   When defining node templates, use the “copy” key to copy all the property values from your standard_compute node templat


Here is sample YAML


tosca_definitions_version: tosca_simple_yaml_1_0_0


   - standard-compute.yaml




      copy: standard_compute


Please be aware that there is one potential problem with this: node templates (including standard_compute) are defined inside a topology_template. It is assumed that there is only one topology_template per service template. The behavior where a service template that has a topology_template includes another file that also has a topology_template is undefined. This is an issue that needs to be resolved in the spec.


c.       Another option might be to put the dsl_definition statement into its own file and import it, but depending on the YAML parser this might not work (since “import” is a Tosca concept, not a YAML concept). Anybody have any opinions about whether this should work or not?



Hope this helps,





From: tosca@lists.oasis-open.org [mailto:tosca@lists.oasis-open.org] On Behalf Of Nikunj Nemani
Sent: Wednesday, April 29, 2015 12:04 AM
To: tosca@lists.oasis-open.org
Subject: [tosca] Questions on the TOSCA model




Recently, I have been trying to model few applications in TOSCA.

I have two questions, appreciate your response and help.


1. Can constraints be specified inline on properties of node template ? In the spec I could find the constraints only defined either in the node template or in the inputs. 

E.g. - Is this a valid TOSCA node template ?



        type: tosca.Nodes.Compute





type: integer


description: Number of CPUs


default: 1


required: true




- in_range: [1, 4] #alternate is to specify as num_cpus: {in_range [1, 4] }


2 . I  have a of a list of properties which I want to use across my nodes in different blueprints. E.g. I have a set of properties which I want to apply to all my linux nodes whether it is CentOS or RedHat in a LAMP stack or in a JavaStack. How can I define that ? I know that I can define a dsl_definition, but that will only be within a blueprint (or application). The other thing I can do is define a  different nodeType, for e.g 


derived_from: tosca.Nodes.Root



VirtualMachine.admin.ThinProvision: true

VMware.SCSI.Type: pvscsi

MonitoringOptions: true

MonitoringOptions.HasAlerting: true



But when I want to use it in my node template, is this valid ? (Note the properties are a combination of the property_list as well as very specific properties for that node)



        type: tosca.Nodes.Compute



- linux_property_list


        type: integer

        description: Number of CPUs

        default: 1

        required: true

        mem_size: 4 MB

        disk_size: 10 GB


Thanks and Regards,

Nikunj Nemani

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]