[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-validation-lib / openecomp-sdc-validation-impl / src / test / resources / org / openecomp / validation / validators / attGuideLineValidator / baseHeatExposeResourceUsingGetResource / positive / nested_virc.yaml
1 heat_template_version: 2015-04-30
2
3 description: virc_nested
4
5 parameters:
6   vnf_id:
7     type: string
8     description: Unique ID for this VF instance
9   vnf_name:
10     type: string
11     description: Unique name for this VF instance
12   vf_module_id:
13     type: string
14     description: Unique ID for this VF Module instance
15   vf_module_name:
16     type: string
17     description: Unique name for this VF Module instance
18   vm_roles:
19     type: comma_delimited_list
20     description: Unique roles for this group of instances
21   virc_names:
22     type: comma_delimited_list
23     description: name of virc instances
24   virc_image_name:
25     type: string
26     description: name of virc image
27   virc_flavor_name:
28     type: string
29     description: flavor of instance to use
30   virc_keypair:
31     type: string
32     description: Key pair containing public SSH key for vIRC instances
33   availability_zone_0:
34     type: string
35     description: Availability zone used for this resource group
36   management_net_name:
37     type: string
38     description: virc management network name
39   virc_management_dhcp:
40     type: string
41     description: yes if port configured by dhcp, otherwise no
42   virc_management_ips:
43     type: comma_delimited_list
44     description: virc management network fixed ips
45   virc_management_netmask:
46     type: string
47     description: virc management netmask
48   virc_management_gateway:
49     type: string
50     description: virc management gateway
51   virc_management_default_route:
52     type: string
53     description: yes if this default route is that of this nic
54   data_net_name:
55     type: string
56     description: virc data network name
57   virc_data_dhcp:
58     type: string
59     description: yes if port configured by dhcp, otherwise no
60   virc_data_ips:
61     type: comma_delimited_list
62     description: virc data network fixed ips
63   virc_data_netmask:
64     type: string
65     description: virc data netmask
66   virc_data_gateway:
67     type: string
68     description: virc data gateway
69   virc_data_default_route:
70     type: string
71     description: yes if this default route is that of this nic
72   signaling_net_name:
73     type: string
74     description: virc signaling network name
75   virc_signaling_dhcp:
76     type: string
77     description: yes if port configured by dhcp, otherwise no
78   virc_signaling_ips:
79     type: comma_delimited_list
80     description: virc signaling network fixed ips
81   virc_signaling_netmask:
82     type: string
83     description: virc signaling netmask
84   virc_signaling_gateway:
85     type: string
86     description: virc signaling gateway
87   virc_signaling_default_route:
88     type: string
89     description: yes if this default route is that of this nic
90   virc_sg:
91     type: string
92     description: virc security group
93   virc_domain:
94     type: string
95     description: domain of the virc instance
96   virc_dns1:
97     type: string
98     description: first dns nameserver for virc instance
99   virc_dns2:
100     type: string
101     description: second dns nameserver for virc instance
102   virc_default_gateway:
103     type: string
104     description: default gateway for VM
105   virc_version:
106     type: string
107     description: virc deployment version
108   virc_environment:
109     type: string
110     description: virc deployment environment
111   virc_version_file:
112     type: string
113     description: vIRC CC version file name
114   index_num:
115     type: number
116     description: Current index value of the resource group
117     constraints:
118       - range: { min: 0, max: 18 }
119
120 resources:
121   virc_0:
122     type: OS::Nova::Server
123     properties:
124       name: {get_param: [virc_names, {get_param: index_num}]}
125       metadata:
126         vnf_id: { get_param: vnf_id }
127         vnf_name: { get_param: vnf_name }
128         vf_module_id: { get_param: vf_module_id }
129         vf_module_name: { get_param: vf_module_name }
130         vm_role: { get_param: [vm_roles, {get_param: index_num}]}
131       key_name: {get_param: virc_keypair}
132       image: {get_param: virc_image_name}
133       flavor: {get_param: virc_flavor_name} 
134       availability_zone: {get_param: availability_zone_0}
135       networks:
136         - port: { get_resource: virc_management_0_port}
137         - port: { get_resource: virc_data_1_port}
138         - port: { get_resource: virc_signaling_2_port}
139       user_data_format: RAW
140       user_data:
141         str_replace:
142           template: {get_file: user_data.sh}
143           params:
144             __hostname__: {get_param: [virc_names, {get_param: index_num}]} 
145             __domain__: {get_param: virc_domain}
146             __dns1__: {get_param: virc_dns1}
147             __dns2__: {get_param: virc_dns2}
148             __default_gateway__: {get_param: virc_default_gateway}
149             __port_mac_0__: {get_attr: [virc_management_0_port, mac_address]}
150             __port_ip_0__: {get_param: [virc_management_ips, {get_param: index_num}]}
151             __port_netmask_0__: {get_param: virc_management_netmask}
152             __port_gateway_0__: {get_param: virc_management_gateway}
153             __port_def_route_0__: {get_param: virc_management_default_route}
154             __port_dhcp_0__: {get_param: virc_management_dhcp}
155             __port_mac_1__: {get_attr: [virc_data_1_port, mac_address]}
156             __port_ip_1__: {get_param: [virc_data_ips, {get_param: index_num}]}
157             __port_netmask_1__: {get_param: virc_data_netmask}
158             __port_gateway_1__: {get_param: virc_data_gateway}
159             __port_def_route_1__: {get_param: virc_data_default_route}
160             __port_dhcp_1__: {get_param: virc_data_dhcp}
161             __port_ip6_1__: {get_param: [virc_data_ips, {get_param: index_num}]}
162             __port_mac_2__: {get_attr: [virc_signaling_2_port, mac_address]}
163             __port_ip_2__: {get_param: [virc_signaling_ips, {get_param: index_num}]}
164             __port_netmask_2__: {get_param: virc_signaling_netmask}
165             __port_gateway_2__: {get_param: virc_signaling_gateway}
166             __port_def_route_2__: {get_param: virc_signaling_default_route}
167             __port_dhcp_2__: {get_param: virc_signaling_dhcp}
168             __virc_environment__: {get_param: virc_environment}
169             __virc_version__: {get_param: virc_version}
170             __virc_version_file__: {get_param: virc_version_file}
171
172   virc_management_0_port:
173     type: OS::Neutron::Port
174     properties:
175       network: { get_param: management_net_name }
176       fixed_ips:
177        - ip_address: { get_param: [virc_management_ips, {get_param: index_num}]}
178       security_groups:
179        - { get_param: virc_sg }
180   virc_data_1_port:
181     type: OS::Neutron::Port
182     properties:
183       network: { get_param: data_net_name }
184       fixed_ips:
185         - ip_address: { get_param: [virc_data_ips, {get_param: index_num}]}
186       security_groups:
187         - { get_param: virc_sg }
188   virc_signaling_2_port:
189     type: OS::Neutron::Port
190     properties:
191       network: { get_param: signaling_net_name }
192       fixed_ips:
193         - ip_address: { get_param: [virc_signaling_ips, {get_param: index_num}]}
194       security_groups:
195         - { get_param: virc_sg }
196   virc_volume:
197     type: OS::Cinder::Volume
198     properties:
199 #      name: {get_param: [virc_names, {get_param: index_num}]}
200       availability_zone: nova
201 #      availability_zone: {get_param: availability_zone_0}
202       size: 1
203   virc_volumeattachment:
204     type: OS::Cinder::VolumeAttachment
205     properties:
206       instance_uuid: { get_resource: virc_0 }
207       volume_id: { get_resource: virc_volume }