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: [tosca] Questions on the TOSCA model


Hello,

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 ?

    appserver:

        type: tosca.Nodes.Compute

        properties: 

         num_cpus:

        type: integer

        description: Number of CPUs

        default: 1

        required: true

        constraints:

        - 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 

linux_property_list:

derived_from: tosca.Nodes.Root


properties:

VirtualMachine.admin.ThinProvision: true

VMware.SCSI.Type: pvscsi

MonitoringOptions: true

MonitoringOptions.HasAlerting: true

ProjectCode:


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)


appserver:

        type: tosca.Nodes.Compute


properties:

- linux_property_list

        num_cpus:

        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]