push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / multi / inputs / nested-pcm_v0.1_2.yaml
1 heat_template_version: 2013-05-23
2
3 description: heat template that creates PCRF Cluman stack
4
5 parameters:
6   pcm_server_name:
7     type: string
8     label: PCRF CM server name
9     description: PCRF CM server name
10   pcm_image_name:
11     type: string
12     label: image name
13     description: PCRF CM image name
14   pcm_flavor_name:
15     type: string
16     label: PCRF CM flavor name
17     description: flavor name of PCRF CM instance
18   availabilityzone_name:
19     type: string
20     label: availabilityzone name
21     description: availabilityzone name
22   cps_net_name:
23     type: string
24     label: CPS network name
25     description: CPS network name
26   cps_net_ip:
27     type: string
28     label: CPS network ip
29     description: CPS network ip
30   cps_net_mask:
31     type: string
32     label: CPS network mask
33     description: CPS network mask
34   pcm_vol:
35     type: string
36     label: CPS Cluman Cinder Volume
37     description: CPS Cluman Cinder Volume
38   security_group_name:
39     type: string
40     label: security group name
41     description: the name of security group
42   oam_net_name:
43     type: string
44     label: OAM network name
45     description: OAM network name
46   oam_net_ip:
47     type: string
48 resources:
49   network:
50     type: OS::Heat::CloudConfig
51     properties:
52       cloud_config:
53         write_files:
54           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
55             permissions: "0644"
56             content:
57               str_replace:
58                 template: { get_file: "file:///nimbus-ethernet" }
59                 params:
60                   $dev: eth0
61                   $ip: { get_param: cps_net_ip }
62                   $netmask: { get_param: cps_net_mask }
63         runcmd:
64           - ifdown eth0 && ifup eth0
65           - ifdown eth1 && ifup eth1
66   script_init:
67     type: OS::Heat::SoftwareConfig
68     properties:
69       group: ungrouped
70   server_init:
71     type: OS::Heat::MultipartMime
72     properties:
73       parts:
74       - config: { get_resource: network}
75       - config: { get_resource: script_init}
76
77   server_pcm:
78     type: OS::Nova::Server
79     properties:
80       config_drive: "True"
81       name: { get_param: pcm_server_name }
82       image: { get_param: pcm_image_name }
83       flavor: { get_param: pcm_flavor_name }
84       availability_zone: { get_param: availabilityzone_name }
85       networks:
86         - port: { get_resource: pcm_port_0}
87         - port: { get_resource: pcm_port_1}
88       block_device_mapping:
89         - device_name: vdb
90           volume_id: { get_param: pcm_vol}
91       user_data_format: RAW
92       user_data:
93         get_resource: server_init
94
95   pcm_port_0:
96     type: OS::Neutron::Port
97     properties:
98       network: { get_param: cps_net_name }
99       fixed_ips:
100         - ip_address: { get_param: cps_net_ip }
101       security_groups: [{ get_param: security_group_name }]
102
103   pcm_port_1:
104     type: OS::Neutron::Port
105     properties:
106       network: { get_param: oam_net_name }
107       fixed_ips:
108         - ip_address: { get_param: oam_net_ip }
109       security_groups: [{ get_param: security_group_name }]
110
111   #pcm_vol_attachment:
112   #  type: OS:: Cinder::VolumeAttachment
113   #  properties:
114   #    volume_id: { get_param: pcm_vol }
115   #    mountpoint: /dev/vdb
116   #    instance_uuid: { get_resource: server_pcm }
117 outputs:
118   server_pcm_id:
119     description: the pcm nova service id
120     value: { get_resource: server_pcm }