[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-validation-lib / openecomp-sdc-validation-impl / src / test / resources / org / openecomp / validation / validators / heat_validator / resources_group_with_nested / positive_test / input / nested-psm_v1.0.yaml
1 heat_template_version: 2013-05-23
2
3 description: heat template that creates PCRF Session Manager stack
4
5 parameters:
6   pcrf_psm_server_name:
7     type: string
8     label: PCRF SM server name
9     description: PCRF SM server name
10   pcrf_psm_image_name:
11     type: string
12     label: image name
13     description: PCRF SM image name
14   pcrf_psm_flavor_name:
15     type: string
16     label: PCRF SM flavor name
17     description: flavor name of PCRF SM instance 
18   availabilityzone_name:
19     type: string
20     label: availabilityzone name
21     description: availabilityzone name
22   pcrf_cps_net_name:
23     type: string
24     label: CPS network name
25     description: CPS network name
26   pcrf_cps_net_ip:
27     type: string
28     label: CPS network ip
29     description: CPS network ip
30   pcrf_cps_net_mask:
31     type: string
32     label: CPS network mask
33     description: CPS network mask
34   pcrf_security_group_name:
35     type: string
36     label: security group name
37     description: the name of security group
38   pcrf_vnf_id:
39     type: string
40     label: PCRF VNF Id
41     description: PCRF VNF Id
42
43 resources:
44   network:
45     type: OS::Heat::CloudConfig
46     properties:
47       cloud_config:
48         write_files:
49           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
50             permissions: "0644"
51             content:
52               str_replace:
53                 params:
54                   $dev: eth0
55                   $ip: { get_param: pcrf_cps_net_ip }
56                   $netmask: { get_param: pcrf_cps_net_mask }
57         runcmd:
58           - ifdown eth0 && ifup eth0
59   script_init:
60     type: OS::Heat::SoftwareConfig
61     properties:
62       group: ungrouped
63       config:
64         str_replace:
65           params:
66             $vm_name: { get_param: pcrf_psm_server_name }
67   pcrf_server_init:
68     type: OS::Heat::MultipartMime
69     properties:
70       parts:
71       - config: { get_resource: network}
72       - config: { get_resource: script_init}
73
74   pcrf_server_psm:
75     type: OS::Nova::Server
76     properties:
77       config_drive: "True"
78       name: { get_param: pcrf_psm_server_name }
79       image: { get_param: pcrf_psm_image_name }
80       flavor: { get_param: pcrf_psm_flavor_name }
81       availability_zone: { get_param: availabilityzone_name }
82       networks:
83         - port: { get_resource: psm01_port_0}
84       user_data_format: RAW
85       user_data:
86         get_resource: pcrf_server_init
87       metadata:
88         vnf_id: {get_param: pcrf_vnf_id}
89       #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
90   
91   psm01_port_0:
92     type: OS::Neutron::Port
93     properties:
94       network: { get_param: pcrf_cps_net_name }
95       fixed_ips:
96         - ip_address: { get_param: pcrf_cps_net_ip }
97       security_groups: [{ get_param: pcrf_security_group_name }]