bf66e1957983374b8b2c0e5f1a29038509f7a67d
[sdc.git] /
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5 - openecomp_heat_index:
6     file: openecomp-heat/_index.yml
7 - GlobalSubstitutionTypes:
8     file: GlobalSubstitutionTypesServiceTemplate.yaml
9 node_types:
10   org.openecomp.resource.vfc.nodes.heat.smp:
11     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
12 topology_template:
13   inputs:
14     image_smp_name:
15       hidden: false
16       immutable: false
17       type: string
18       description: SCP SMP image
19       default: asc_base_image_smp
20     lab_name:
21       hidden: false
22       immutable: false
23       type: string
24       description: Lab name
25     vnf_name:
26       hidden: false
27       immutable: false
28       type: string
29       description: Unique name for this VNF instance
30       default: This_is_the_SCP_name
31     vnf_id:
32       hidden: false
33       immutable: false
34       type: string
35       description: Unique ID for this VNF instance
36       default: This_is_ths_SCP_id
37     flavor_smp_name:
38       hidden: false
39       immutable: false
40       type: string
41       description: SCP SMP Flavor
42       default: a1.Small
43     availability_zone_0:
44       hidden: false
45       immutable: false
46       type: string
47     port_name:
48       hidden: false
49       immutable: false
50       type: string
51       description: port name
52       default: port_name
53   node_templates:
54     port_1:
55       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
56       properties:
57         replacement_policy: AUTO
58         network:
59           get_input: port_name
60         subinterface_indicator: false
61       requirements:
62       - binding:
63           capability: tosca.capabilities.network.Bindable
64           node: server_smp1
65           relationship: tosca.relationships.network.BindsTo
66     server_smp1:
67       type: org.openecomp.resource.vfc.nodes.heat.smp
68       properties:
69         flavor:
70           get_input: flavor_smp_name
71         availability_zone:
72           get_input: availability_zone_0
73         image:
74           get_input: image_smp_name
75         metadata:
76           jx_vm_role: smp2
77           vnf_id:
78             get_input: vnf_id
79           jx_lab_name:
80             get_input: lab_name
81         user_data_format: RAW
82         name:
83           get_input: smp_name_1
84         scheduler_hints:
85           group: BE_Affinity_group
86     port_2:
87       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
88       properties:
89         replacement_policy: AUTO
90         network:
91           get_input: port_name
92         subinterface_indicator: false
93       requirements:
94       - binding:
95           capability: tosca.capabilities.network.Bindable
96           node: server_smp1
97           relationship: tosca.relationships.network.BindsTo
98     abstract_smp:
99       type: org.openecomp.resource.abstract.nodes.smp
100       directives:
101       - substitutable
102       properties:
103         compute_smp_availability_zone:
104         - get_input: availability_zone_0
105         vm_flavor_name:
106           get_input: flavor_smp_name
107         compute_smp_user_data_format:
108         - RAW
109         vm_image_name:
110           get_input: image_smp_name
111         port_port_1_subinterface_indicator:
112         - false
113         port_port_2_replacement_policy:
114         - AUTO
115         compute_smp_name:
116         - get_input: smp_name_1
117         port_port_1_replacement_policy:
118         - AUTO
119         port_port_1_network:
120         - get_input: port_name
121         port_port_2_subinterface_indicator:
122         - false
123         port_port_2_network:
124         - get_input: port_name
125         compute_smp_metadata:
126         - jx_vm_role: smp2
127           vnf_id:
128             get_input: vnf_id
129           jx_lab_name:
130             get_input: lab_name
131         compute_smp_scheduler_hints:
132         - group: BE_Affinity_group
133         service_template_filter:
134           substitute_service_template: Nested_smpServiceTemplate.yaml
135           count: 1
136         index_value:
137           get_property:
138           - SELF
139           - service_template_filter
140           - index_value
141   groups:
142     FE_SMP_Affinity_group:
143       type: tosca.groups.Root
144       members:
145       - abstract_smp
146     hot_template_group:
147       type: org.openecomp.groups.heat.HeatStack
148       properties:
149         heat_file: ../Artifacts/hot_template.yml
150         description: ASC Template
151       members:
152       - port1
153       - server_smp1
154       - port2
155     BE_Affinity_group:
156       type: tosca.groups.Root
157       members:
158       - abstract_smp
159   policies:
160     BE_Affinity_policy:
161       type: org.openecomp.policies.placement.Colocate
162       properties:
163         name: def
164         affinity: host
165       targets:
166       - BE_Affinity_group
167     FE_SMP_Affinity_policy:
168       type: org.openecomp.policies.placement.Colocate
169       properties:
170         name: abc
171         affinity: host
172       targets:
173       - FE_SMP_Affinity_group