Initial OpenECOMP MSO commit
[so.git] / packages / arquillian-unit-tests / src / test / resources / resource-examples / asdc / simpleNotif-V5 / artifacts / nested-pcm_v1.0.yaml
1 heat_template_version: 2013-05-23\r
2 \r
3 description: heat template that creates PCRF Cluman stack\r
4 \r
5 parameters:\r
6   pcrf_pcm_server_name:\r
7     type: string\r
8     label: PCRF CM server name\r
9     description: PCRF CM server name\r
10   pcrf_pcm_image_name:\r
11     type: string\r
12     label: image name\r
13     description: PCRF CM image name\r
14   pcrf_pcm_flavor_name:\r
15     type: string\r
16     label: PCRF CM flavor name\r
17     description: flavor name of PCRF CM instance\r
18   availabilityzone_name:\r
19     type: string\r
20     label: availabilityzone name\r
21     description: availabilityzone name\r
22   pcrf_cps_net_name:\r
23     type: string\r
24     label: CPS network name\r
25     description: CPS network name\r
26   pcrf_cps_net_ip:\r
27     type: string\r
28     label: CPS network ip\r
29     description: CPS network ip\r
30   pcrf_cps_net_mask:\r
31     type: string\r
32     label: CPS network mask\r
33     description: CPS network mask\r
34   pcrf_oam_net_name:\r
35     type: string\r
36     label: OAM network name\r
37     description: OAM network name\r
38   pcrf_oam_net_ip:\r
39     type: string\r
40     label: OAM network ip\r
41     description: OAM network ip\r
42   pcrf_oam_net_gw:\r
43     type: string\r
44     label: CPS network gateway\r
45     description: CPS network gateway\r
46   pcrf_oam_net_mask:\r
47     type: string\r
48     label: CPS network mask\r
49     description: CPS network mask\r
50   pcrf_pcm_volume_id:\r
51     type: string\r
52     label: CPS Cluman Cinder Volume\r
53     description: CPS Cluman Cinder Volume\r
54   pcrf_security_group_name:\r
55     type: string\r
56     label: security group name\r
57     description: the name of security group\r
58   pcrf_vnf_id:\r
59     type: string\r
60     label: PCRF VNF Id\r
61     description: PCRF VNF Id\r
62 \r
63 resources:\r
64   network:\r
65     type: OS::Heat::CloudConfig\r
66     properties:\r
67       cloud_config:\r
68         write_files:\r
69           - path: /etc/sysconfig/network-scripts/ifcfg-eth0\r
70             permissions: "0644"\r
71             content:\r
72               str_replace:\r
73                 template: { get_file: nimbus-ethernet }\r
74                 params:\r
75                   $dev: eth0\r
76                   $ip: { get_param: pcrf_cps_net_ip }\r
77                   $netmask: { get_param: pcrf_cps_net_mask }\r
78           - path: /etc/sysconfig/network-scripts/ifcfg-eth1\r
79             permissions: "0644"\r
80             content:\r
81               str_replace:\r
82                 template: { get_file: nimbus-ethernet-gw }\r
83                 params:\r
84                   $dev: eth1\r
85                   $ip: { get_param: pcrf_oam_net_ip }\r
86                   $netmask: { get_param: pcrf_oam_net_mask }\r
87                   $gateway: { get_param: pcrf_oam_net_gw }\r
88         runcmd:\r
89           - ifdown eth0 && ifup eth0\r
90           - ifdown eth1 && ifup eth1\r
91   script_init:\r
92     type: OS::Heat::SoftwareConfig\r
93     properties:\r
94       group: ungrouped\r
95       config:\r
96         str_replace:\r
97           template: { get_file: cloud-nimbus.sh }\r
98           params:\r
99             $vm_name: { get_param: pcrf_pcm_server_name }\r
100   pcrf_server_init:\r
101     type: OS::Heat::MultipartMime\r
102     properties:\r
103       parts:\r
104       - config: { get_resource: network}\r
105       - config: { get_resource: script_init}\r
106 \r
107   pcrf_server_pcm:\r
108     type: OS::Nova::Server\r
109     properties:\r
110       config_drive: "True"\r
111       name: { get_param: pcrf_pcm_server_name }\r
112       image: { get_param: pcrf_pcm_image_name }\r
113       flavor: { get_param: pcrf_pcm_flavor_name }\r
114       availability_zone: { get_param: availabilityzone_name }\r
115       networks:\r
116         - port: { get_resource: pcrf_pcm_port_0}\r
117         - port: { get_resource: pcrf_pcm_port_1}\r
118       user_data_format: RAW\r
119       user_data:\r
120         get_resource: pcrf_server_init\r
121       metadata:\r
122         vnf_id: {get_param: pcrf_vnf_id}\r
123 \r
124   pcrf_pcm_port_0:\r
125     type: OS::Neutron::Port\r
126     properties:\r
127       network: { get_param: pcrf_cps_net_name }\r
128       fixed_ips:\r
129         - ip_address: { get_param: pcrf_cps_net_ip }\r
130       security_groups: [{ get_param: pcrf_security_group_name }]\r
131 \r
132   pcrf_pcm_port_1:\r
133     type: OS::Neutron::Port\r
134     properties:\r
135       network: { get_param: pcrf_oam_net_name }\r
136       fixed_ips:\r
137         - ip_address: { get_param: pcrf_oam_net_ip }\r
138       security_groups: [{ get_param: pcrf_security_group_name }]\r
139 \r
140   volume_attachment:\r
141     type: OS::Cinder::VolumeAttachment\r
142     properties:\r
143       volume_id: { get_param: pcrf_pcm_volume_id }\r
144       mountpoint: /dev/vdd\r
145       instance_uuid: { get_resource: pcrf_server_pcm }\r
146 \r
147 outputs:\r
148   pcrf_server_pcm_id:\r
149     description: the pcm server id\r
150     value: { get_resource: pcrf_server_pcm }