[sdc] rebase update
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / fulltest / nestedSingleCompute / multipleReferencesToSameNestedFilesWithSameComputeType / in / nested_vson_server_with_vol_dual_ip_stack.yaml
1 heat_template_version: 2015-04-30
2 #################################
3 # Author: Dmitry Orzhehovsky
4 # Email:  dorzheho@cisco.com
5 #################################
6 description: >
7   The template intended for deploying vSON VM instance.
8
9 parameters:
10
11   instance_index:
12     type: number
13     label: Instance Index
14     description: Index of the instance.
15
16   vnf_name:
17     type: string
18     label: VF name
19     description: Unique name for this VF instance.
20
21   vnf_id:
22     type: string
23     label: VF ID
24     description: Unique ID for this VF instance.
25
26   vf_module_name:
27     type: string
28     label: VF module name
29     description: Unique name for this VF module instance.
30
31   vf_module_id:
32     type: string
33     label: VF module ID
34     description: Unique ID for this VF Module instance
35
36   vfc_role:
37     type: string
38     label: VF module ID
39     description: Unique ID for this VF Module instance
40
41   oam_net_id:
42     type: string
43     label: OAM network ID
44     description: The ID of the OAM network.
45
46   oam_net_subnet_prefix_length:
47     type: string
48     label: OAM net subnet prefix length
49     description: Prefix length of the subnet on the OAM network.
50
51   oam_net_subnet_v6_prefix_length:
52     type: string
53     label: OAM net IPv6 subnet prefix length
54     description: OAM network IPv6 subnet prefix length.
55
56   default_gateway:
57     type: string
58     label: Default gateway
59     description: Default gateway.
60
61   default_gateway_v6:
62     type: string
63     label: Default IPv6 gateway
64     description: Default IPv6 gateway.
65
66   dns_servers:
67     type: comma_delimited_list
68     label: DNS servers
69     description: List of DNS servers.
70
71   ntp_servers:
72     type: comma_delimited_list
73     label: NTP servers
74     description: List of NTP servers.
75
76   oam_net_security_group_id:
77     type: string
78     label: OAM network security group ID
79     description: >
80       The ID of Security group applied on the port
81       bound to the vSON OAM network.
82
83   volume_ids:
84     type: comma_delimited_list
85     label: Volumes IDs
86     description: List of Volumes IDs.
87
88   availability_zones:
89     type: comma_delimited_list
90     label: Availability zones
91     description: List of availability zones.
92
93   vson_server_group_id:
94     type: string
95     label: vSON server group ID
96     description: >
97       Tells what policy should be applied to the ServerGroup.
98       Affinity policy will force instances to share the same hypervisor.
99       Anti-affinity will force instances to run in different hypervisors.
100
101   vson_vm_names:
102     type: comma_delimited_list
103     label: vSON Cluster leader names
104     description: A list of unique names to be issued to the vSON Cluster leaders.
105
106   oam_net_ips:
107     type: comma_delimited_list
108     label: vSON OAM network IPv4 addresses
109     description: Fixed IPv4 assignments for vSON instances on the OAM network.
110
111   oam_net_v6_ips:
112     type: comma_delimited_list
113     label: vSON OAM network IPv6 addresses
114     description: Fixed IPv6 assignments for vSON instances on the OAM network.
115
116   vson_vm_image_name:
117     type: string
118     label: vSON base VM image name
119     description: VM Image name the vSON instance will be created from.
120
121   vson_vm_flavor_name:
122     type: string
123     label: Flavor name
124     description: The ID or name of the flavor to boot onto.
125
126   vson_dc_unit:
127     type: string
128     label: vSON Data Center name
129     description: Name of the vSON Data Center.
130
131   vson_clm_oam_net_ip:
132     type: string
133     label: vSON Cluster Manager IP
134     description: IP of the vSON Cluster Manager.
135
136   vson_join_cluster_auth_token:
137     type: string
138     label: vSON join cluster auth token
139     description: >
140       Authentication Token generated for the user permitted to add
141       a new Datacenter/vSON member to existing vSON Cluster.
142
143   swift_account_auth_token:
144     type: string
145     label: Swift account auth token
146     description: >
147       Swift account auth token.
148       Example:  041a5187bb4641f9b89583e2539776b0
149
150 resources:
151
152   wait_condition:
153     type: OS::Heat::SwiftSignal
154     properties:
155       handle: {get_resource: wait_handle}
156       count: 1
157       timeout: 800
158
159   wait_handle:
160     type: OS::Heat::SwiftSignalHandle
161
162 # vSON server OAM network port
163   vson_server_oam_net_port_0:
164     type: OS::Neutron::Port
165     properties:
166       name:
167         str_replace:
168           template: VNF_NAME_VNF_ID_SERVER_NAME_oam_net_port_0
169           params:
170             VNF_NAME: {get_param: vnf_name}
171             VNF_ID: {get_param: vnf_id}
172             SERVER_NAME: {get_param: [vson_vm_names, {get_param: instance_index}]}
173       network_id: {get_param: oam_net_id}
174       fixed_ips:
175         - ip_address: {get_param: [oam_net_ips, {get_param: instance_index}]}
176         - ip_address: {get_param: [oam_net_v6_ips, {get_param: instance_index}]}
177       security_groups:
178       - {get_param: oam_net_security_group_id}
179
180 # Attach Cinder volume to the server
181   vson_server_volume_attach:
182     type: OS::Cinder::VolumeAttachment
183     depends_on: vson_server
184     properties:
185       instance_uuid: {get_resource: vson_server}
186       volume_id: {get_param: [volume_ids, {get_param: instance_index}]}
187
188 # Create vSON server
189   vson_server:
190     type: OS::Nova::Server
191     depends_on: [vson_server_oam_net_port_0]
192     properties:
193       name: {get_param: [vson_vm_names, {get_param: instance_index}]}
194       availability_zone: {get_param: [availability_zones, {get_param: instance_index}]}
195       image: {get_param: vson_vm_image_name}
196       flavor: {get_param: vson_vm_flavor_name}
197       config_drive: True
198       metadata:
199         vnf_name: {get_param: vnf_name}
200         vnf_id: {get_param: vnf_id}
201         vf_module_name: {get_param: vf_module_name}
202         vf_module_id: {get_param: vf_module_id}
203         vm_role: {get_param: vfc_role}
204       networks:
205       - port: {get_resource: vson_server_oam_net_port_0}
206       scheduler_hints:
207         group: {get_param: vson_server_group_id}
208       user_data_format: RAW
209       user_data:
210         str_replace:
211           template: {get_file: deploy.sh}
212           params:
213             $HOT_INSTANCE_INDEX: {get_param: instance_index}
214             $HOT_VOLUME_ID: {get_param: [volume_ids, {get_param: instance_index}]}
215             $HOT_VOLUME_ATTACH: "False"
216             $HOT_VFC_ROLE: {get_param: vfc_role}
217             $HOT_CLM_SERVER_IP: {get_param: vson_clm_oam_net_ip}
218             $HOT_THIS_INSTANCE_OAM_NET_IP: {get_param: [oam_net_ips, {get_param: instance_index}]}
219             $HOT_THIS_INSTANCE_OAM_NET_PREFIX: {get_param: oam_net_subnet_prefix_length}
220             $HOT_THIS_INSTANCE_OAM_V6_NET_IP: {get_param: [oam_net_v6_ips, {get_param: instance_index}]}
221             $HOT_THIS_INSTANCE_OAM_V6_NET_PREFIX: {get_param: oam_net_subnet_v6_prefix_length}
222             $HOT_THIS_INSTANCE_DEFAULT_GATEWAY: {get_param: default_gateway}
223             $HOT_THIS_INSTANCE_DEFAULT_GATEWAY_V6: {get_param: default_gateway_v6}
224             $HOT_DNS_SERVERS: {list_join: [',', {get_param: dns_servers}]}
225             $HOT_DC_NAME: {get_param: vson_dc_unit}
226             $HOT_NTP_SERVERS: {list_join: [' ', {get_param: ntp_servers}]}
227             $HOT_SWIFT_AUTH_TOKEN: {get_param: swift_account_auth_token}
228             $HOT_VSON_JOIN_CLUSTER_AUTH_TOKEN: {get_param: vson_join_cluster_auth_token}
229             $HOT_WC_NOTIFY: { get_attr: ['wait_handle', 'curl_cli'] }