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