push addional code
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / test / resources / invalidTypes / cmaui.yml
1 heat_template_version: 2013-05-23
2
3 #################################
4 #
5 #  Changes from MSO 01/26/2016
6 #  Updated per ECOMP feedback
7 #
8 #################################
9
10 description: cmaui server template for vMMSC
11
12 parameters:
13   vnf_id:
14     type: string
15     description: Unique ID for this VNF instance
16     default: This_is_ths_MMSC-CMAUI_id
17   cmaui_names:
18     type: comma_delimited_list
19     description: CMAUI1, CMAUI2 server names
20   cmaui_image:
21     type: string
22     description: Image for CMAUI server
23   cmaui_flavor:
24     type: string
25     description: Flavor for CMAUI server
26   cmaui_cinder_volume_size:
27      type: number
28      label: CMAUI Cinder volume size
29      description: the size of the CMAUI Cinder volume
30   availability_zone_0:
31     type: string
32     label: availabilityzone name
33     description: availabilityzone name
34   oam_net_name:
35     type: string
36     description: UID of OAM network
37   oam_network_netmask:
38     type: string
39     label: oam network netmask
40     description: oam network gateway
41   oam_network_gateway:
42     type: string
43     label: oam network gateway
44     description: oam network gateway
45   external_dns:
46     type: string
47     label: dns server
48     description: dns server
49   external_ntp:
50     type: string
51     label: ntp server 
52     description: ntp server
53   security_group_name:
54     type: string
55     label: security group name
56     description: the name of security group
57   timezone:
58     type: string
59     label: timezone
60     description: timezone
61   cmaui_oam_ips:
62     type: comma_delimited_list
63     label: CMAUI oam_net IP addresses
64     description: CMAUI oam_net IP addresses
65   CMAUI_volume_type:
66     type: string
67     label: CMAUI vm volume type
68     description: the name of the target volume backend
69
70 resources:
71   server_cmaui:
72     type: eca_oam.yaml
73     properties:
74       name: { get_param: [cmaui_names, 0]}
75       image: { get_param: cmaui_image }
76       availability_zone: { get_param: availability_zone_0 }
77       flavor: { get_param: cmaui_flavor }
78       networks:
79       - port: { get_resource: cmaui_port_0 }
80       metadata:
81         vnf_id: { get_param: vnf_id }
82       user_data:
83         str_replace:
84           template: |
85             cmaui.mgmt.ip=${cmaui.mgmt.ip}
86             cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
87             cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
88             cmaui.external.dns=${cmaui.external.dns}
89             cmaui.external.ntp=${cmaui.external.ntp}
90             cmaui.node=${cmaui.node}
91             cmaui.timezone=${cmaui.timezone}
92           params:
93             ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]} 
94             ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
95             ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
96             ${cmaui.external.dns}: {get_param: external_dns}
97             ${cmaui.external.ntp}: {get_param: external_ntp}
98             ${cmaui.node}: {get_param: [cmaui_names, 0]} 
99             ${cmaui.timezone}: {get_param: timezone}
100       user_data_format: RAW 
101
102   server_cmaui_2:
103     type: eca_oam_2.yaml
104     properties:
105       name: { get_param: [cmaui_names, 0]}
106       image: { get_param: cmaui_image }
107       availability_zone: { get_param: availability_zone_0 }
108       flavor: { get_param: cmaui_flavor }
109       networks:
110       - port: { get_resource: cmaui_port_0 }
111       metadata:
112         vnf_id: { get_param: vnf_id }
113       user_data:
114         str_replace:
115           template: |
116             cmaui.mgmt.ip=${cmaui.mgmt.ip}
117             cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
118             cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
119             cmaui.external.dns=${cmaui.external.dns}
120             cmaui.external.ntp=${cmaui.external.ntp}
121             cmaui.node=${cmaui.node}
122             cmaui.timezone=${cmaui.timezone}
123           params:
124             ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]} 
125             ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
126             ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
127             ${cmaui.external.dns}: {get_param: external_dns}
128             ${cmaui.external.ntp}: {get_param: external_ntp}
129             ${cmaui.node}: {get_param: [cmaui_names, 0]} 
130             ${cmaui.timezone}: {get_param: timezone}
131       user_data_format: RAW 
132
133   cmaui_volume:
134      type: OS::Cinder::Volume
135      properties:
136        size: {get_param: cmaui_cinder_volume_size}
137        volume_type: {get_param: CMAUI_volume_type}
138
139   cmaui_volume_attachment:
140      type: OS::Cinder::VolumeAttachment
141      properties:
142        volume_id: {get_resource: cmaui_volume}
143        instance_uuid: {get_resource: server_cmaui}
144
145   cmaui_port_0:
146     type: OS::Neutron::Port
147     properties:
148       network: { get_param: oam_net_name }
149       fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
150       security_groups: [{get_param: security_group_name}]
151       replacement_policy: AUTO
152
153   server_cmaui1:
154     type: OS::Nova::Server
155     properties:
156       name: { get_param: [cmaui_names, 1]}
157       image: { get_param: cmaui_image }
158       availability_zone: { get_param: availability_zone_0 }
159       flavor: { get_param: cmaui_flavor }
160       networks:
161       - port: { get_resource: cmaui1_port_0 }
162       metadata:
163         vnf_id: { get_param: vnf_id }
164       user_data:
165         str_replace:
166           template: |
167             cmaui.mgmt.ip=${cmaui.mgmt.ip}
168             cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
169             cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
170             cmaui.external.dns=${cmaui.external.dns}
171             cmaui.external.ntp=${cmaui.external.ntp}
172             cmaui.node=${cmaui.node}
173             cmaui.timezone=${cmaui.timezone}
174           params:
175             ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 1]} 
176             ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
177             ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
178             ${cmaui.external.dns}: {get_param: external_dns}
179             ${cmaui.external.ntp}: {get_param: external_ntp}
180             ${cmaui.node}: {get_param: [cmaui_names, 1]} 
181             ${cmaui.timezone}: {get_param: timezone}
182       user_data_format: RAW 
183
184   cmaui1_volume:
185      type: OS::Cinder::Volume
186      properties:
187        size: {get_param: cmaui_cinder_volume_size}
188        volume_type: {get_param: CMAUI_volume_type}
189
190   cmaui1_volume_attachment:
191      type: OS::Cinder::VolumeAttachment
192      properties:
193        volume_id: {get_resource: cmaui1_volume}
194        instance_uuid: {get_resource: server_cmaui1}
195
196   cmaui1_port_0:
197     type: OS::Neutron::Port
198     properties:
199       network: { get_param: oam_net_name }
200       fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 1]}}]
201       security_groups: [{get_param: security_group_name}]
202       replacement_policy: AUTO