[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 / referenced_artifacts_exist / positive_test / input / artifact.sh
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     label: PCRF PS server name
9     description: PCRF PS server name
10   pcrf_pps_image_name:
11     type: string
12     label: PCRF PS image name
13     description: PCRF PS image name
14   pcrf_pps_flavor_name:
15     type: string
16     label: PCRF PS flavor name
17     description: flavor name of PCRF PS 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   script_init:
45     type: OS::Heat::SoftwareConfig
46     properties:
47       group: ungrouped
48       config:
49         str_replace:
50           template: { get_file: cloud-nimbus.sh }
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                 template: { get_file: nimbus-ethernet }
63                 params:
64                   $dev: eth0
65                   $ip: { get_param: pcrf_cps_net_ip }
66                   $netmask: { get_param: pcrf_cps_net_mask }
67         runcmd:
68           - ifdown eth0 && ifup eth0
69
70   pcrf_server_init:
71     type: OS::Heat::MultipartMime
72     properties:
73       parts:
74       - config: { get_resource: network}
75       - config: { get_resource: script_init}
76
77   pcrf_server_pps:
78     type: OS::Nova::Server
79     properties:
80       config_drive: "True"
81       name: { get_param: pcrf_pps_server_name }
82       image: { get_param: pcrf_pps_image_name }
83       flavor: { get_param: pcrf_pps_flavor_name }
84       availability_zone: { get_param: availabilityzone_name }
85       networks:
86         - port: { get_resource: pcrf_pps_port_0}
87       user_data_format: RAW
88       user_data:
89         get_resource: pcrf_server_init
90       metadata:
91         vnf_id: {get_param: pcrf_vnf_id}
92
93   pcrf_pps_port_0:
94     type: OS::Neutron::Port
95     properties:
96       network: { get_param: pcrf_cps_net_name }
97       fixed_ips:
98         - ip_address: { get_param: pcrf_cps_net_ip }
99       security_groups: [{ get_param: pcrf_security_group_name }]