summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template
diff options
context:
space:
mode:
authorzhipengh <zhipengh512@gmail.com>2015-12-22 15:04:53 +0800
committerzhipengh <zhipengh512@gmail.com>2015-12-22 15:04:53 +0800
commitb678c5bfea0f1b142c2a4a5bdee1e3309a021887 (patch)
tree493ec289254370057daaaded00fd1b4761783c86 /tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template
parent828f613ea0c3e334eacf3f7857252246708d1c88 (diff)
JIRA:PARSER-15 Provide Standalone Heat-Translator Liberty Pypi Packages
Diffstat (limited to 'tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template')
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/definitions.yaml54
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/subsystem.yaml85
-rw-r--r--tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/system.yaml51
3 files changed, 190 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/definitions.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/definitions.yaml
new file mode 100644
index 0000000..083ee75
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/definitions.yaml
@@ -0,0 +1,54 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+node_types:
+ example.TransactionSubsystem:
+ properties:
+ mq_server_ip:
+ type: string
+ receiver_port:
+ type: integer
+ attributes:
+ receiver_ip:
+ type: string
+ receiver_port:
+ type: integer
+ capabilities:
+ message_receiver:
+ type: example.capabilities.Receiver
+ requirements:
+ - database_endpoint:
+ capability: tosca.capabilities.Endpoint.Database
+ node: tosca.nodes.Database
+ relationship: tosca.relationships.ConnectsTo
+
+ example.QueuingSubsystem:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - receiver1:
+ node: example.TransactionSubsystem
+ relationship: tosca.relationships.ConnectsTo
+ - receiver2:
+ node: example.TransactionSubsystem
+ relationship: tosca.relationships.ConnectsTo
+
+ example.DatabaseSubsystem:
+ derived_from: tosca.nodes.Database
+
+ example.SomeApp:
+ derived_from: tosca.nodes.SoftwareComponent
+ properties:
+ admin_user:
+ type: string
+ pool_size:
+ type: integer
+ capabilities:
+ message_receiver:
+ type: example.capabilities.Receiver
+
+capability_types:
+ example.capabilities.Receiver:
+ derived_from: tosca.capabilities.Endpoint
+ properties:
+ server_ip:
+ type: string
+
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/subsystem.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/subsystem.yaml
new file mode 100644
index 0000000..ddbc94e
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/subsystem.yaml
@@ -0,0 +1,85 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Service template with topology_template, act as a nested system inside another system.
+
+imports:
+ - definitions.yaml
+
+topology_template:
+ description: Template of a database including its hosting stack.
+
+ inputs:
+ mq_server_ip:
+ type: string
+ description: IP address of the message queuing server to receive messages from.
+ receiver_port:
+ type: string
+ description: Port to be used for receiving messages.
+ my_cpus:
+ type: integer
+ description: Number of CPUs for the server.
+ constraints:
+ - valid_values: [ 1, 2, 4, 8 ]
+
+ substitution_mappings:
+ node_type: example.TransactionSubsystem
+ capabilities:
+ message_receiver: [ app, message_receiver ]
+ requirements:
+ database_endpoint: [ app, database ]
+
+ node_templates:
+ app:
+ type: example.SomeApp
+ properties:
+ admin_user: foo
+ pool_size: 10
+ capabilities:
+ message_receiver:
+ properties:
+ server_ip: { get_input: mq_server_ip }
+ requirements:
+ - host:
+ node: websrv
+
+ websrv:
+ type: tosca.nodes.WebServer
+ capabilities:
+ data_endpoint:
+ properties:
+ port_name: { get_input: receiver_port }
+ requirements:
+ - host:
+ node: server
+
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ disk_size: 10 GB
+ num_cpus: { get_input: my_cpus }
+ mem_size: 4096 MB
+ os:
+ properties:
+ architecture: x86_64
+ type: Linux
+ distribution: Ubuntu
+ version: 14.04
+
+ outputs:
+ receiver_ip:
+ description: private IP address of the message receiver application
+ value: { get_attribute: [ server, private_address ] }
+# It seems current _process_intrisic_function can not handle more than 2 arguments, save it for later
+# receiver_port:
+# description: Port of the message receiver endpoint
+# value: { get_attribute: [ app, data_endpoint, port_name ] }
+
+ groups:
+ webserver_group:
+ members: [ websrv, server ]
+ policies:
+ - policy_name: none
+
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/system.yaml b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/system.yaml
new file mode 100644
index 0000000..99aee0d
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/data/topology_template/system.yaml
@@ -0,0 +1,51 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+ - definitions.yaml
+
+topology_template:
+ description: Template of online transaction processing service.
+
+ node_templates:
+ mq:
+ type: example.QueuingSubsystem
+ # properties:
+ # to be updated when substitution_mapping is implemented
+ # capabilities:
+ # message_queue_endpoint:
+ # to be updated when substitution_mapping is implemented
+ requirements:
+ - receiver1: trans1
+ - receiver2: trans2
+
+ trans1:
+ type: example.TransactionSubsystem
+ properties:
+ # to be updated when substitution_mapping is implemented
+ # mq_server_ip: { get_attribute: [ mq, server_ip ] }
+ receiver_port: 8080
+ # capabilities:
+ # message_receiver:
+ # to be updated when substitution_mapping is implemented
+ requirements:
+ - database_endpoint: dbsys
+
+ trans2:
+ type: example.TransactionSubsystem
+ properties:
+ # to be updated when substitution_mapping is implemented
+ # mq_server_ip: { get_attribute: [ mq, server_ip ] }
+ receiver_port: 8080
+ # capabilities:
+ # message_receiver:
+ # to be updated when substitution_mapping is implemented
+ requirements:
+ - database_endpoint: dbsys
+
+ dbsys:
+ type: example.DatabaseSubsystem
+ # properties:
+ # to be updated when substitution_mapping is implemented
+ # capabilities:
+ # database_endpoint:
+ # to be updated when substitution_mapping is implemented \ No newline at end of file