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