summaryrefslogtreecommitdiffstats
path: root/docs/yang2tosca
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2015-12-31 16:23:16 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2016-01-12 13:10:34 +0800
commit8a81851ef6b96f342b2fc83844df708e4403dcbe (patch)
tree92ca1f18abb19db2d3cff4f72f027f955a2162bc /docs/yang2tosca
parenta83cb309a399fd3043695e6620441d8d8ec7727d (diff)
Yang to TOSCA output template for test case.
As a test engineer,I want to understand how to verify the output of yang-to-tosca based specific input.so that I can define output template. JIRA:PARSER-16 Change-Id: Id17e86db9667715e43615195570854ae1ead5e8b Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'docs/yang2tosca')
-rw-r--r--docs/yang2tosca/clearwater_tosca.yaml151
1 files changed, 151 insertions, 0 deletions
diff --git a/docs/yang2tosca/clearwater_tosca.yaml b/docs/yang2tosca/clearwater_tosca.yaml
new file mode 100644
index 0000000..2b4dd52
--- /dev/null
+++ b/docs/yang2tosca/clearwater_tosca.yaml
@@ -0,0 +1,151 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+description: >
+ This module defines a VNF Deployment Unit.
+
+metadata:
+ template_name: clearwater
+ template_author: HP
+
+dsl_definitions:
+ compute_props_host_ellis: &compute_props_host_ellis
+ num_cpu: 4
+ mem_size: 4096
+ compute_props_host_bono: &compute_props_host_bono
+ num_cpu: 3
+ mem_size: 2048
+
+node_types:
+ tosca.nodes.compute.ellis:
+ derived_from: tosca.nodes.compute
+
+ tosca.nodes.compute.bono:
+ derived_from: tosca.nodes.compute
+
+topology_template:
+ # a description of the topology template
+ description: >
+
+
+ inputs:
+ storage_size:
+ type: scalar-unit.size
+ default: 2048 M
+ description: The required storage resource
+
+ storage_location:
+ type: string
+ description: >
+ Block storage mount point (filesystem path).
+
+ node_templates:
+ ellis:
+ type: tosca.nodes.compute.ellis
+ capabilities:
+ host:
+ properties: *compute_props_host_ellis
+ scalable:
+ properties:
+ min_instances: 1
+ default_instances: 1
+ requirements:
+ - local_storage:
+ node: ellis_BlockStorage
+ relationship:
+ type: AttachesTo
+ properties:
+ location: { get_input: storage_location }
+ interfaces:
+ Standard:
+ start:
+ implementation: start.sh
+ delete:
+ implementaion: stop.sh
+ stop:
+ implementaion: shutdown.sh
+
+ ellis_BlockStorage:
+ type: tosca.nodes.BlockStorage
+ properties:
+ size: { get_input: storage_size }
+
+ bono:
+ type: tosca.nodes.compute.bono
+ capabilities:
+ host:
+ properties: *compute_props_host_bono
+ scalable:
+ properties:
+ min_instances: 3
+ default_instances: 3
+ requirements:
+ - local_storage:
+ node: bono_BlockStorage
+ relationship:
+ type: AttachesTo
+ properties:
+ location: { get_input: storage_location }
+ interfaces:
+ Standard:
+ start:
+ implementation: start.sh
+ delete:
+ implementaion: stop.sh
+ stop:
+ implementaion: shutdown.sh
+
+ bono_BlockStorage:
+ type: tosca.nodes.BlockStorage
+ properties:
+ size: { get_input: storage_size }
+
+ clearwater_network1:
+ type: tosca.nodes.network.Network
+ properties:
+ ip_version: 4
+
+ ellis_port1:
+ type: tosca.nodes.network.Port
+ requirements:
+ - binding:
+ node: ellis
+ - link:
+ node: clearwater_network1
+
+ clearwater_network2:
+ type: tosca.nodes.network.Network
+ properties:
+ ip_version: 4
+
+ ellis_port2:
+ type: tosca.nodes.network.Port
+ requirements:
+ - binding:
+ node: ellis
+ - link:
+ node: clearwater_network2
+
+ clearwater_network1:
+ type: tosca.nodes.network.Network
+ properties:
+ ip_version: 4
+
+ bono_port1:
+ type: tosca.nodes.network.Port
+ requirements:
+ - binding:
+ node: bono
+ - link:
+ node: clearwater_network1
+
+ clearwater_network2:
+ type: tosca.nodes.network.Network
+ properties:
+ ip_version: 4
+
+ bono_port2:
+ type: tosca.nodes.network.Port
+ requirements:
+ - binding:
+ node: bono
+ - link:
+ node: clearwater_network2