push addional code
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / test / resources / extractServiceComposition / substitution / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5   NeutronPortGlobalTypes:
6     file: NeutronPortGlobalTypesServiceTemplate.yaml
7   NeutronNetGlobalTypes:
8     file: NeutronNetGlobalTypesServiceTemplate.yaml
9   CommonGlobalTypes:
10     file: CommonGlobalTypesServiceTemplate.yaml
11   CinderVolumeGlobalTypes:
12     file: CinderVolumeGlobalTypesServiceTemplate.yaml
13   ContrailNetworkRuleGlobalType:
14     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
15   NeutronSecurityRulesGlobalTypes:
16     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
17   NovaServerGlobalTypes:
18     file: NovaServerGlobalTypesServiceTemplate.yaml
19   ContrailVirtualNetworkGlobalType:
20     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
21   AbstractSubstituteGlobalTypes:
22     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
23 topology_template:
24   inputs:
25     shared_network_id1:
26       hidden: false
27       immutable: false
28       type: string
29       description: network name of jsa log network
30     shared_network_id2:
31       hidden: false
32       immutable: false
33       type: string
34       description: network name of jsa log network
35     jsa_net_name:
36       hidden: false
37       immutable: false
38       type: string
39       description: network name of jsa log network
40   node_templates:
41     test_net2:
42       type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
43       properties:
44         shared: true
45         network_name:
46           get_input: jsa_net_name
47     test_nested2:
48       type: org.openecomp.resource.abstract.nodes.heat.nested2
49       directives:
50       - substitutable
51       properties:
52         p1:
53           get_input: shared_network_id1
54         service_template_filter:
55           substitute_service_template: nested2ServiceTemplate.yaml
56       requirements:
57       - link_cmaui_port_1:
58           capability: tosca.capabilities.network.Linkable
59           node: test_net1
60           relationship: tosca.relationships.network.LinksTo
61     test_nested3:
62       type: org.openecomp.resource.abstract.nodes.heat.nested1
63       directives:
64       - substitutable
65       properties:
66         p1:
67           get_input: shared_network_id1
68         service_template_filter:
69           substitute_service_template: nested1ServiceTemplate.yaml
70         p2:
71           get_input: shared_network_id2
72       requirements:
73       - link_cmaui_port_2:
74           capability: tosca.capabilities.network.Linkable
75           node: test_net2
76           relationship: tosca.relationships.network.LinksTo
77       - link_abc_port_1:
78           capability: tosca.capabilities.network.Linkable
79           node: test_net2
80           relationship: tosca.relationships.network.LinksTo
81       - link_cmaui_port_1:
82           capability: tosca.capabilities.network.Linkable
83           node: test_net1
84           relationship: tosca.relationships.network.LinksTo
85     test_net1:
86       type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
87       properties:
88         shared: true
89         network_name:
90           get_input: jsa_net_name
91     test_nested1:
92       type: org.openecomp.resource.abstract.nodes.heat.nested1
93       directives:
94       - substitutable
95       properties:
96         p1:
97           get_input: shared_network_id1
98         service_template_filter:
99           substitute_service_template: nested1ServiceTemplate.yaml
100         p2:
101           get_input: shared_network_id2
102       requirements:
103       - link_cmaui_port_2:
104           capability: tosca.capabilities.network.Linkable
105           node: test_net2
106           relationship: tosca.relationships.network.LinksTo
107       - link_abc_port_1:
108           capability: tosca.capabilities.network.Linkable
109           node: test_net2
110           relationship: tosca.relationships.network.LinksTo
111       - link_cmaui_port_1:
112           capability: tosca.capabilities.network.Linkable
113           node: test_net1
114           relationship: tosca.relationships.network.LinksTo
115   groups:
116     addOn:
117       type: org.openecomp.groups.heat.HeatStack
118       properties:
119         heat_file: ../Artifacts/addOn.yml
120         description: |
121           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
122       members:
123       - test_nested2
124       - test_nested3
125       - test_nested1
126     main:
127       type: org.openecomp.groups.heat.HeatStack
128       properties:
129         heat_file: ../Artifacts/main.yml
130         description: |
131           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
132       members:
133       - test_net2
134       - test_net1
135   outputs:
136     shared_network_id1:
137       value: test_net1
138     shared_network_id2:
139       value: test_net2