[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / novatovolumeconnection / sharedAddOn / inputfiles / addOn.yml
1 heat_template_version: 2013-05-23
2
3 description: cmaui server template for vMMSC
4
5 parameters:
6   cmaui_volume_param1:
7     type: string
8     description: nova server id
9   cmaui_volume_param2:
10     type: string
11     description: nova server id
12   vnf_id:
13     type: string
14     description: Unique ID for this VNF instance
15     default: This_is_ths_MMSC-CMAUI_id
16   cmaui_names:
17     type: comma_delimited_list
18     description: CMAUI1, CMAUI2 server names
19   cmaui_image:
20     type: string
21     description: Image for CMAUI server
22   cmaui_flavor:
23     type: string
24     description: Flavor for CMAUI server
25   cmaui_cinder_volume_size:
26      type: number
27      label: CMAUI Cinder volume size
28      description: the size of the CMAUI Cinder volume
29   availability_zone_0:
30     type: string
31     label: availabilityzone name
32     description: availabilityzone name
33   oam_net_name:
34     type: string
35     description: UID of OAM network
36   oam_network_netmask:
37     type: string
38     label: oam network netmask
39     description: oam network gateway
40   oam_network_gateway:
41     type: string
42     label: oam network gateway
43     description: oam network gateway
44   external_dns:
45     type: string
46     label: dns server
47     description: dns server
48   external_ntp:
49     type: string
50     label: ntp server
51     description: ntp server
52   security_group_name:
53     type: string
54     label: security group name
55     description: the name of security group
56   timezone:
57     type: string
58     label: timezone
59     description: timezone
60   cmaui_oam_ips:
61     type: comma_delimited_list
62     label: CMAUI oam_net IP addresses
63     description: CMAUI oam_net IP addresses
64   CMAUI_volume_type:
65     type: string
66     label: CMAUI vm volume type
67     description: the name of the target volume backend
68   cmaui_volume:
69     type: string
70     label: CMAUI vm volume type
71     description: the name of the target volume backend
72
73 resources:
74
75   cmaui_port_1:
76     type: OS::Neutron::Port
77     properties:
78       network: { get_param: oam_net_name }
79       fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
80       security_groups: [{get_param: security_group_name}]
81       replacement_policy: AUTO
82   cmaui_port_2:
83     type: OS::Neutron::Port
84     properties:
85       network: { get_param: oam_net_name }
86       fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
87       security_groups: [{get_param: security_group_name}]
88       replacement_policy: AUTO
89
90   cmaui_volume_attachment1:
91     type: OS::Cinder::VolumeAttachment
92     properties:
93       volume_id: {get_param: cmaui_volume_param1}
94       instance_uuid: {get_resource: server_cmaui1}
95
96   cmaui_volume_attachment2:
97     type: OS::Cinder::VolumeAttachment
98     properties:
99       volume_id: {get_param: cmaui_volume_param2}
100       instance_uuid: {get_resource: server_cmaui1}
101
102   cmaui_volume_attachment3:
103     type: OS::Cinder::VolumeAttachment
104     properties:
105       volume_id: {get_param: cmaui_volume_param2}
106       instance_uuid: {get_resource: server_cmaui2}
107
108   cmaui_volume_attachment4:
109     type: OS::Cinder::VolumeAttachment
110     properties:
111       volume_id: {get_param: [cmaui_volume_param1,0]}
112       instance_uuid: {get_resource: server_cmaui2}
113
114   server_cmaui1:
115     type: OS::Nova::Server
116     properties:
117       name: { get_param: [cmaui_names, 0]}
118       image: { get_param: cmaui_image }
119       availability_zone: { get_param: availability_zone_0 }
120       flavor: { get_param: cmaui_flavor }
121       networks:
122       - port: { get_resource: cmaui_port_1 }
123       metadata:
124         vnf_id: { get_param: vnf_id }
125       user_data:
126         str_replace:
127           template: |
128             cmaui.mgmt.ip=${cmaui.mgmt.ip}
129             cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
130             cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
131             cmaui.external.dns=${cmaui.external.dns}
132             cmaui.external.ntp=${cmaui.external.ntp}
133             cmaui.node=${cmaui.node}
134             cmaui.timezone=${cmaui.timezone}
135           params:
136             ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
137             ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
138             ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
139             ${cmaui.external.dns}: {get_param: external_dns}
140             ${cmaui.external.ntp}: {get_param: external_ntp}
141             ${cmaui.node}: {get_param: [cmaui_names, 0]}
142             ${cmaui.timezone}: {get_param: timezone}
143       user_data_format: RAW
144
145   server_cmaui2:
146     type: OS::Nova::Server
147     properties:
148       name: { get_param: [cmaui_names, 0]}
149       image: { get_param: cmaui_image }
150       availability_zone: { get_param: availability_zone_0 }
151       flavor: { get_param: cmaui_flavor }
152       networks:
153       - port: { get_resource: cmaui_port_2 }
154       metadata:
155         vnf_id: { get_param: vnf_id }
156       user_data:
157         str_replace:
158           template: |
159             cmaui.mgmt.ip=${cmaui.mgmt.ip}
160             cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
161             cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
162             cmaui.external.dns=${cmaui.external.dns}
163             cmaui.external.ntp=${cmaui.external.ntp}
164             cmaui.node=${cmaui.node}
165             cmaui.timezone=${cmaui.timezone}
166           params:
167             ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]}
168             ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
169             ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
170             ${cmaui.external.dns}: {get_param: external_dns}
171             ${cmaui.external.ntp}: {get_param: external_ntp}
172             ${cmaui.node}: {get_param: [cmaui_names, 0]}
173             ${cmaui.timezone}: {get_param: timezone}
174       user_data_format: RAW