how to substitue a node with substitution_mappings in other template
I have defined a topology template as below (file 1) to define a substitution_
File 1:
tosca_definitio
topology_template:
description: Template of a database including its hosting stack.
substitution_
node_type: tosca.nodes.
capabilities:
database_
node_templates:
database:
type: tosca.nodes.
properties:
user: dbuser
password: abcdeft
requirements:
- host: dbms
dbms:
type: tosca.nodes.DBMS
properties:
port: 3306
requirements:
- host: server
server:
type: tosca.nodes.
capabilities:
properties:
image: cirros-0.3.0
But I always failed when I on board another template file (file 2) below where it has requirements of 'database_
what do i missed?
file 2:
tosca_definitio
topology_template:
description: Template of an application connecting to a database.
node_templates:
web_app:
type: tosca.nodes.
requirements:
- host: web_server
- database_endpoint: db
web_server:
type: tosca.nodes.
requirements:
- host: server
server:
type: tosca.nodes.
capabilities:
properties:
image: cirros-0.3.0
db:
type: tosca.nodes.
properties:
user: my_db_user
password: secret
name: my_db_name
it returns:
tosca-parser failed: -
The pre-parsed input failed validation with the following error(s):
UnknownFieldError: "requirements" of template "web_app" contains unknown field "database_
thanks for your kind help.
regards,
futangw
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- tacker Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bob Haddleton
- Solved:
- Last query:
- Last reply: