push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / resourceGroupIndexVar / inputs / mvs.vfmodule.heat.yaml
1 heat_template_version: 2013-05-23
2
3 description: >
4   Metaswitch MVS (Metaview Server)
5
6 parameters:
7   cloud_zone_id:
8     type: string
9     description: The cloud zone for this VF instance
10   vf_name:
11     type: string
12     description: The VF Name; defaults to VMVM for the virtual MVM VNF.
13     constraints:
14       - allowed_pattern: "[a-zA-Z0-9]+"
15       - length: { min: 4, max: 4 }
16         description: Each VF will have a 4-character alphanumeric identifier
17   vf_instance_num:
18     type: string
19     description: The number for this VF instance
20     constraints:
21       - allowed_pattern: "[0-9]+"
22       - length: { min: 2, max: 2 }
23         description: VF instance number must be a two-digit numeric value
24   vf_component:
25     type: string
26     description: The component that this VF instance is running
27     constraints:
28       - allowed_pattern: "[a-zA-Z0-9]+"
29       - length: { min: 3, max: 3 }
30         description: Each VF component will have a 3-character alphanumeric identifier
31   vm_instance_num:
32     type: comma_delimited_list
33     description: VM instance number list must be a list of three-digit numeric value
34   vnf_id:
35     type: string
36     description: Unique ID for this VF instance
37   vf_module_id:
38     type: string
39     description: Unique ID for this VF_MODULE instance
40   bootimage:
41     type: string
42     description: Master bootimage volume id
43   flavor:
44     type: string
45     description: Server flavor
46     constraints:
47       - custom_constraint: nova.flavor
48   key_name:
49     type: string
50     description: SSH key name
51     constraints:
52       - custom_constraint: nova.keypair
53   type_name:
54     type: string
55   availability_zone_0:
56     type: comma_delimited_list
57     description: List of Availability Zone IDs or Names
58
59   sec_groups:
60     type: comma_delimited_list
61     description: Security groups
62   mgmt_net_id:
63     type: string
64     description: Neutron UUID for the Management network
65     constraints:
66     - custom_constraint: neutron.network
67   virtual_mgmt_ip_0:
68     type: string
69     description: Virtual management network ip address
70
71   mvs_mgmt_ip_0:
72     type: comma_delimited_list
73     description: List of Management network IP addresses for IPv4
74
75   num_instances:
76     type: number
77     description: number of instance of the VF_module
78
79   compute_image_name:
80     type: string
81
82 resources:
83   mvs_modules_defaultIndexVar:
84     type: OS::Heat::ResourceGroup
85     properties:
86       count: 3
87       resource_def:
88         type: mvs.nested.heat.yaml
89         properties:
90           cloud_zone_id: cloud_zone_id_%index%
91           vf_name: "%index%vf_name"
92           vf_instance_num: "vf_instance_num_%index%_bbbb"
93           vf_component: "%index%"
94           vm_instance_num: "%index%_vm_instance_num_%index%_hhh_%index%%index%%index%_pppp%index%"
95           vnf_id:
96           vf_module_id: [{ get_param: vf_module_id }, "%index%", fff%index% ]
97           bootimage: { get_param: bootimage }
98           flavor:
99             a: a
100             b:
101              aa: [sss,dddd%index%ppp, sd]
102              ppp: "%index%_pppp___%index%"
103              eeee: eeeeeee
104             e: "%index%"
105             w: "%index%_pp"
106           key_name: [a,b,"%index%",p%index%]
107           availability_zone_0: { get_param: availability_zone_0 }
108           sec_groups: { get_param: sec_groups }
109           mgmt_net_id: { get_param: mgmt_net_id }
110           virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
111           mvs_mgmt_ip_0: mvs_mgmt_ip_0
112           indx: "%index%"
113
114   mvs_modules_custIndexVar1:
115     type: OS::Heat::ResourceGroup
116     properties:
117       count: 2
118       index_var: myIndex
119       resource_def:
120         type: mvs.nested.heat.yaml
121         properties:
122           cloud_zone_id: cloud_zone_id_myIndex
123           vf_name: "myIndexvf_name"
124           vf_instance_num: "vf_instance_num_myIndex_bbbb"
125           vf_component: "myIndex"
126           vm_instance_num: "myIndex_vm_instance_num_myIndex_hhh_myIndexmyIndexmyIndex_ppppmyIndex"
127           vnf_id:
128           vf_module_id: [{ get_param: vf_module_id }, "myIndex", fffmyIndex ]
129           bootimage: { get_param: bootimage }
130           flavor:
131             a: a
132             b: b
133             e: myIndex
134             w: myIndex_pp
135           key_name: [a,b,myIndex,pmyIndex]
136           availability_zone_0: { get_param: availability_zone_0 }
137           sec_groups: { get_param: sec_groups }
138           mgmt_net_id: { get_param: mgmt_net_id }
139           virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
140           mvs_mgmt_ip_0: mvs_mgmt_ip_0
141           indx: "myIndex"
142
143   mvs_modules_custIndexVar2:
144     type: OS::Heat::ResourceGroup
145     properties:
146       count: 2
147       index_var: "%myIndex%"
148       resource_def:
149         type: mvs.nested.heat.yaml
150         properties:
151           cloud_zone_id: cloud_zone_id_%myIndex%
152           vf_name: "%myIndex%vf_name"
153           vf_instance_num: "vf_instance_num_%myIndex%_bbbb"
154           vf_component: "%myIndex%"
155           vm_instance_num: "%myIndex%_vm_instance_num_%myIndex%_hhh_%myIndex%%myIndex%%myIndex%_pppp%myIndex%"
156           vnf_id:
157           vf_module_id: [{ get_param: vf_module_id }, "%myIndex%", fff%myIndex% ]
158           bootimage: { get_param: bootimage }
159           flavor:
160             a: a
161             b: b
162             e: "%myIndex%"
163             w: "%myIndex%_pp"
164           key_name: [a,b,"%myIndex%",p%myIndex%]
165           availability_zone_0: { get_param: availability_zone_0 }
166           sec_groups: { get_param: sec_groups }
167           mgmt_net_id: { get_param: mgmt_net_id }
168           virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
169           mvs_mgmt_ip_0: mvs_mgmt_ip_0
170           indx: "%myIndex%"
171
172   not_supported_resourceGroup1:
173     type: OS::Heat::ResourceGroup
174     properties:
175       count: 3
176       resource_def:
177         type: OS::Heat::ResourceGroup
178         properties:
179           cloud_zone_id: { get_param: cloud_zone_id }
180           vf_name:  { get_param: vf_name }
181           vf_instance_num: { get_param: vf_instance_num }
182           vf_component: { get_param: vf_component }
183           vm_instance_num: { get_param: vm_instance_num }
184           vnf_id: { get_param: vnf_id }
185           vf_module_id: { get_param: vf_module_id }
186           bootimage: { get_param: bootimage }
187           flavor: { get_param: flavor }
188           key_name: { get_param: key_name }
189           availability_zone_0: { get_param: availability_zone_0 }
190           sec_groups: { get_param: sec_groups }
191           mgmt_net_id: { get_param: mgmt_net_id }
192           virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
193           mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
194           indx: "%index%"
195
196   not_supported_resourceGroup2:
197     type: OS::Heat::ResourceGroup
198     properties:
199       count: 3
200       resource_def:
201         type: { get_param: type_name }
202         properties:
203           cloud_zone_id: { get_param: cloud_zone_id }
204           vf_name:  { get_param: vf_name }
205           vf_instance_num: { get_param: vf_instance_num }
206           vf_component: { get_param: vf_component }
207           vm_instance_num: { get_param: vm_instance_num }
208           vnf_id: { get_param: vnf_id }
209           vf_module_id: { get_param: vf_module_id }
210           bootimage: { get_param: bootimage }
211           flavor: { get_param: flavor }
212           key_name: { get_param: key_name }
213           availability_zone_0: { get_param: availability_zone_0 }
214           sec_groups: { get_param: sec_groups }
215           mgmt_net_id: { get_param: mgmt_net_id }
216           virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 }
217           mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 }
218           indx: "%index%"
219
220   server_compute_get_attr_test:
221     type: OS::Nova::Server
222     properties:
223       config_drive: {get_attr: [mvs_modules_defaultIndexVar]}
224       name:  compute_name
225       image: { get_param: compute_image_name }
226       flavor:  compute_flavor_name
227       user_data_format: { get_attr: [mvs_modules_defaultIndexVar , resource.1.vnfci_id_1] }
228       user_data: { get_attr: [mvs_modules_defaultIndexVar, resource.vnfci_id_2]}