[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: substitution
Hi all,
I'm confused when I went through the substitution example of simpl yaml v1.1.
According to the specification, the inputs and outputs defined by the topology template should match the properties and attributes of the node type definition, but the inputs of database example obviously doesn't match the properties of Database node type. which is db_user,db_password and user, passord.
Is it a document issue or I misunderstand ?
Thanks for your help.
Huabing
The below sentence is from 2.10.3 Definition of the database stack in a service template
"Further note that no mappings for properties or attributes of the substituted node are defined. Instead, the inputs and outputs defined by the topology template have to match the properties and attributes or the substituted node. If there are more inputs than the substituted node has properties, default values must be defined for those inputs, since no values can be assigned through properties in a substitution case"
The substitution example from 2.10.3
tosca_definitions_version: tosca_simple_yaml_1_0
topology_template:
description: Template of a database including its hosting stack.
inputs:
db_user: (should be 'user' ?)
type: string
db_password:(should be 'password' ?)
type: string
# other inputs omitted for brevity
substitution_mappings:
node_type: tosca.nodes.Database
capabilities:
database_endpoint: [ database, database_endpoint ]
node_templates:
database:
type: tosca.nodes.Database
properties:
user: { get_input: db_user }
# other properties omitted for brevity
requirements:
- host: dbms
dbms:
type: tosca.nodes.DBMS
# details omitted for brevity
server:
type: tosca.nodes.Compute
# details omitted for brevity
The definition of Database nodetype:
tosca.nodes.Database:
derived_from: tosca.nodes.Root
properties:
name:
type: string
description: the logical name of the database
port:
type: integer
description: the port the underlying database service will listen to for data
user:
type: string
description: the optional user account name for DB administration
required: false
password:
type: string
description: the optional password for the DB user account
required: false
requirements:
- host:
capability: tosca.capabilities.Container
node: tosca.nodes.DBMS
relationship: tosca.relationships.HostedOn
capabilities:
database_endpoint:
type: tosca.capabilities.Endpoint.Database
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]