[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / getAttr / getAttrUnsupportedResource / inputfiles / nested_app_server.yaml
1 heat_template_version: 2015-04-30
2
3 description: Pronghorn Openstack Heat Template for the Application Server
4
5 parameters:
6   ###
7   # server group and index
8   ###
9   server_group_id:
10     label: Server Group ID
11     description: ID of the server group
12     type: string
13   deploy_timeout:
14     label: Deployment Timeout
15     description: Timeout before declaring the stack deployment as failed.
16     type: number
17     constraints:
18       - range: { min: 60, max: 3600 }
19
20   ###
21   # vnf info
22   ###
23   vnf_id:
24     label: VNF ID
25     description: Unique ID for this VF instance
26     type: string
27   vf_module_id:
28     label: VF Module ID
29     description: Unique ID for this VF Module instance
30     type: string
31   vm_role:
32     label: App VM Role
33     description: VM Role for the application vms
34     type: string
35
36   ###
37   # availability zone
38   ###
39   availability_zone_0:
40     label: Availability Zone
41     description: Name of the availability zone for this server
42     type: string
43
44   ###
45   # application server networks, ips and hostnames
46   ###
47   app_name:
48     label: Application Hostnames
49     description: Hostnames of the application servers
50     type: string
51   oam_net_name:
52     label: OAM Network Name
53     description: Name of the oam network
54     type: string
55   app_oam_ip_0:
56     label: OAM IP Addresses
57     description: OAM IP Addresses of the application servers
58     type: string
59
60   ###
61   # application common server info (flavor, image, keypair)
62   ###
63   app_flavor_name:
64     label: Flavor
65     description: Flavor to be used for the server
66     type: string
67   app_image_name:
68     label: Image
69     description: Image to be used for the server
70     type: string
71   keypair_id:
72     label: Key Name
73     description: Name of the security key for the server
74     type: string
75
76   ###
77   # security groups
78   ###
79   security_group_ids:
80     label: Security Group IDs
81     description: IDs of the security groups for the server
82     type: comma_delimited_list
83
84
85 resources:
86   ###
87   # software deployment wait conditions
88   ###
89   wait_condition:
90     type: OS::Heat::WaitCondition
91     properties:
92       handle: { get_resource: wait_handle }
93       timeout: { get_param: deploy_timeout }
94
95   wait_handle:
96     type: OS::Heat::WaitConditionHandle
97
98   ###
99   # create the application server
100   ###
101   app_server_0:
102     type: OS::Nova::Server
103     properties:
104       name: { get_attr: [wait_condition, att1] }
105       availability_zone: { get_param: availability_zone_0 }
106       scheduler_hints:
107         group: { get_param: server_group_id }
108       key_name: { get_param: keypair_id }
109       flavor: { get_param: app_flavor_name }
110       image: { get_param: app_image_name }
111       security_groups: { get_param: security_group_ids }
112       metadata:
113         vnf_id: { get_param: vnf_id }
114         vf_module_id: { get_param: vf_module_id }
115         vm_role: { get_param: vm_role }
116       networks:
117         - network: { get_param: oam_net_name }
118           fixed_ip: { get_param: app_oam_ip_0 }
119       user_data_format: RAW
120       user_data:
121         str_replace:
122           params:
123             wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
124           template: |
125             #!/bin/bash
126             ROOT_PW="dan1tom2"
127             (
128             echo "$ROOT_PW"
129             echo "$ROOT_PW"
130             ) | passwd --stdin root
131             wc_notify --data-binary '{"status":"SUCCESS"}'
132
133
134 outputs:
135   ###
136   # No outputs as the base_pronghorn is the only VNF component
137   ###