b78778564367c15f78910831ab123a4cd129ddc3
[sdc.git] /
1 heat_template_version: 2014-10-16
2
3 description: |
4   nested DNS template for a single VM
5   all parameters are passed from calling heat template of resourcegroup
6
7 parameters:
8   dns_image_name: 
9     type: string
10     description: server image
11   dns_flavor_name: 
12     type: string
13     description: server flavor
14   oam_protected_net_name:
15     type: string
16     description: OAM network where instaces will connect
17   int_bearer_net_name:
18     type: string
19     description: Bearer network where instaces will connect
20   dns_oam_protected_ips:
21     type: comma_delimited_list
22     description: DNS OAM IP list
23   dns_oam_protected_v6_ips:
24         type: comma_delimited_list
25         description: DNS OAM IP list
26   dns_int_bearer_ips:
27     type: comma_delimited_list
28     description: DNS Bearer IP list
29   dns_int_bearer_v6_ips:
30     type: comma_delimited_list
31     description: fixed IPv6 assignment for VM's on the Bearer network
32   dns_names:
33     type: comma_delimited_list
34     description: server name
35   security_group:
36     type: string
37     description: security group
38   availability_zone_0:
39     type: string
40     description: availability zone ID or Name
41   availability_zone_1:
42     type: string
43     description: availability zone ID or Name
44   vnf_name:
45     type: string
46     description: Unique name for this VF instance
47 #   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
48   vnf_id:
49     type: string
50     description: Unique ID for this VF instance
51 #   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
52   vf_module_id:
53     type: string
54     description: Unique ID for this VF module instance
55 #   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
56     
57 resources:
58
59   dns_0_oam_protected_port_0:
60     type: OS::Neutron::Port
61     properties:
62       name:
63          str_replace:
64            template: VNF_NAME_dns_0_oam_protected_port_0
65            params:
66                VNF_NAME: {get_param: vnf_name}
67       network: { get_param: oam_protected_net_name }
68       allowed_address_pairs: [{ "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
69       security_groups: [{ get_param: security_group }]
70
71   dns_0_oam_protected_port_1:
72     type: OS::Neutron::Port
73     properties:
74       name:
75          str_replace:
76            template: VNF_NAME_dns_0_oam_protected_port_1
77            params:
78                VNF_NAME: {get_param: vnf_name}
79       network: { get_param: oam_protected_net_name }
80       fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips_v6_ips, 0 ]}}]
81       security_groups: [{ get_param: security_group }]
82  
83   dns_0_int_bearer_port:
84     type: OS::Neutron::Port
85     properties:
86       name:
87         str_replace:
88           template: VNF_NAME_dns_bearer_port
89           params:
90               VNF_NAME: {get_param: vnf_name}
91       network: { get_param: int_bearer_net_name }
92       fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer_v6_ips, 0 ]}}]
93       allowed_address_pairs: [{ "ip_address": { get_param: [ dns_int_bearer, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer, 0 ]}}]
94       security_groups: [{ get_param: security_group }]
95
96   dns_server_0:
97     type: OS::Nova::Server
98     properties:
99       name: { get_param: [ dns_names, 0 ] }
100       image: { get_param: dns_image_name }
101       flavor: { get_param: dns_flavor_name }
102       availability_zone: { get_param: availability_zone_0 }
103       networks:
104         - port: { get_resource: dns_0_oam_protected_port_0 }
105         - port: { get_resource: dns_0_oam_protected_port_1 }
106         - port: { get_resource: dns_0_int_bearer_port }
107       metadata:
108         vnf_id: { get_param: vnf_id }
109         vf_module_id: { get_param: vf_module_id }
110         vnf_name:  {get_param: vnf_name }  
111
112   dns_1_oam_protected_port_0:
113     type: OS::Neutron::Port
114     properties:
115       name:
116          str_replace:
117            template: VNF_NAME_dns_1_oam_protected_port_0
118            params:
119                VNF_NAME: {get_param: vnf_name}
120       network: { get_param: oam_protected_net_name }
121       fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_ips, 6 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 7 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
122       allowed_address_pairs: [{ "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
123       security_groups: [{ get_param: security_group }]
124
125   dns_1_oam_protected_port_1:
126     type: OS::Neutron::Port
127     properties:
128       name:
129          str_replace:
130            template: VNF_NAME_dns_1_oam_protected_port_1
131            params:
132                VNF_NAME: {get_param: vnf_name}
133       network: { get_param: oam_protected_net_name }
134       fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_v6_ips, 6 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 7 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
135       allowed_address_pairs: [{ "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 4 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 5 ]}}]
136       security_groups: [{ get_param: security_group }]
137  
138   dns_1_int_bearer_port:
139     type: OS::Neutron::Port
140     properties:
141       name:
142         str_replace:
143           template: VNF_NAME_dns_bearer_port
144           params:
145               VNF_NAME: {get_param: vnf_name}
146       network: { get_param: int_bearer_net_name }
147       fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer_v6_ips, 0 ]}}]
148       allowed_address_pairs: [{ "ip_address": { get_param: [ dns_int_bearer_floating_v6_ip, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer_floating_v6_ip, 0 ]}}]
149       security_groups: [{ get_param: security_group }]
150
151   dns_server_1:
152     type: OS::Nova::Server
153     properties:
154       name: { get_param: [ dns_names, 1 ] }
155       image: { get_param: dns_image_name }
156       flavor: { get_param: dns_flavor_name }
157       availability_zone: { get_param: availability_zone_1 }
158       networks:
159         - port: { get_resource: dns_1_oam_protected_port_0 }
160         - port: { get_resource: dns_1_oam_protected_port_1 }
161         - port: { get_resource: dns_1_int_bearer_port }
162       metadata:
163         vnf_id: { get_param: vnf_id }
164         vf_module_id: { get_param: vf_module_id }
165         vnf_name:  {get_param: vnf_name }  
166
167