push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-validation-lib / openecomp-sdc-validation-impl / src / test / resources / openecomp / org / validation / validators / heat_validator / two_resources_does_not_hold_same_id / negative_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_server_name:
11     type: string
12     label: PCRF SM server name
13     description: PCRF SM server name
14   pcrf_psm_image_name:
15     type: string
16     label: image name
17     description: PCRF SM image name
18   pcrf_psm_flavor_name:
19     type: string
20     label: PCRF SM flavor name
21     description: flavor name of PCRF SM instance 
22   availabilityzone_name:
23     type: string
24     label: availabilityzone name
25     description: availabilityzone name
26   pcrf_cps_net_name:
27     type: string
28     label: CPS network name
29     description: CPS network name
30   pcrf_cps_net_ip:
31     type: string
32     label: CPS network ip
33     description: CPS network ip
34   pcrf_cps_net_mask:
35     type: string
36     label: CPS network mask
37     description: CPS network mask
38   pcrf_security_group_name:
39     type: string
40     label: security group name
41     description: the name of security group
42   pcrf_vnf_id:
43     type: string
44     label: PCRF VNF Id
45     description: PCRF VNF Id
46
47 resources:
48   network:
49     type: OS::Heat::CloudConfig
50     properties:
51       cloud_config:
52         write_files:
53           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
54             permissions: "0644"
55             content:
56               str_replace:
57                 template: { get_file: nimbus-ethernet }
58                 params:
59                   $dev: eth0
60                   $ip: { get_param: pcrf_cps_net_ip }
61                   $netmask: { get_param: pcrf_cps_net_mask }
62         runcmd:
63           - ifdown eth0 && ifup eth0
64   script_init:
65     type: OS::Heat::SoftwareConfig
66     properties:
67       group: ungrouped
68       config:
69         str_replace:
70           template: { get_file: cloud-nimbus.sh }
71           params:
72             $vm_name: { get_param: pcrf_psm_server_name }
73   pcrf_server_init:
74     type: OS::Heat::MultipartMime
75     properties:
76       parts:
77       - config: { get_resource: network}
78       - config: { get_resource: script_init}
79
80   pcrf_server_psm:
81     type: OS::Nova::Server
82     properties:
83       config_drive: "True"
84       name: { get_param: pcrf_psm_server_name }
85       image: { get_param: pcrf_psm_image_name }
86       flavor: { get_param: pcrf_psm_flavor_name }
87       availability_zone: { get_param: availabilityzone_name }
88       networks:
89         - port: { get_resource: psm01_port_0}
90       user_data_format: RAW
91       user_data:
92         get_resource: pcrf_server_init
93       metadata:
94         vnf_id: {get_param: pcrf_vnf_id}
95       #scheduler_hints: {group: { get_resource: servergroup_nimbus }}
96   
97   psm01_port_0:
98     type: OS::Neutron::Port
99     properties:
100       network: { get_param: pcrf_cps_net_name }
101       fixed_ips:
102         - ip_address: { get_param: pcrf_cps_net_ip }
103       security_groups: [{ get_param: pcrf_security_group_name }]