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