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