push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / resourceGroupMDNS / inputs / dns_nested_01.yaml
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   dns_key: 
15     type: string
16     description: server key
17   oam_protected_net_name:
18     type: string
19     description: OAM network where instaces will connect
20   int_bearer_net_name:
21     type: string
22     description: Bearer network where instaces will connect
23   dns_oam_protected_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_ipv6_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   route_eth0:
36     type: string
37     description: OAM network routes 
38   index:
39     type: number
40     description: index parameter
41   name_with_index:
42     type: string
43     description: name parameter which will include the index value
44   security_group:
45     type: string
46     description: security group
47   availability_zone_0:
48     type: string
49     description: availability zone ID or Name
50 #  this parameter does not follow the D2 Guidelines.  This value will be az0 or az1.
51   vnf_name:
52     type: string
53     description: Unique name for this VF instance
54 #   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
55   vnf_id:
56     type: string
57     description: Unique ID for this VF instance
58 #   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
59   vf_module_id:
60     type: string
61     description: Unique ID for this VF module instance
62 #   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
63     
64     
65 resources:
66
67   dns_oam_protected_0_port:
68     type: OS::Neutron::Port
69     properties:
70       name:
71          str_replace:
72            template: VNF_NAME_dns_oam_port
73            params:
74                VNF_NAME: {get_param: vnf_name}
75       network: { get_param: oam_protected_net_name }
76       fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_ips, get_param: index ]}}]
77       security_groups: [{ get_param: security_group }]
78  
79   dns_int_bearer_0_port:
80     type: OS::Neutron::Port
81     properties:
82       name:
83         str_replace:
84           template: VNF_NAME_dns_bearer_port
85           params:
86               VNF_NAME: {get_param: vnf_name}
87       network: { get_param: int_bearer_net_name }
88       fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, get_param: index ]}}, { "ip_address": { get_param: [ dns_int_bearer_ipv6_ips, get_param: index ]}}]
89       security_groups: [{ get_param: security_group }]
90
91   dns_servers:
92     type: OS::Nova::Server
93     properties:
94       name: { get_param: [ dns_names, get_param: index ] }
95       image: { get_param: dns_image_name }
96       flavor: { get_param: dns_flavor_name }
97       key_name: { get_param: dns_key }
98       availability_zone: { get_param: availability_zone_0 }
99       networks:
100         - port: { get_resource: dns_oam_protected_0_port }
101         - port: { get_resource: dns_int_bearer_0_port }
102       metadata:
103         vnf_id: { get_param: vnf_id }
104         vf_module_id: { get_param: vf_module_id }
105         vnf_name  {get_param: vnf_name }  
106       user_data_format: RAW
107       user_data: { get_resource: server_interface_config } 
108
109   server_interface_config:
110     type: OS::Heat::CloudConfig
111     properties:
112       cloud_config:
113         write_files:
114           - path: /etc/sysconfig/network-scripts/route-eth0
115             permissions: "0644"
116 #           content: { get_file: route-eth0 }    
117             content: { get_param: route_eth0 }
118  
119 #outputs:
120 #  vm_name:
121 #    description: VM name
122 #    value: { get_attr: [ dns_servers, name] }
123 #  networks:
124 #    description: networks
125 #    value: { get_attr: [ dns_servers, networks ] } 
126
127