push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / multiple_resource_groups / inputs / mvs.nested.heat.yaml
1 heat_template_version: 2013-05-23
2
3 description: >
4   Metaswitch MVS (Metaview Server)
5
6 parameters:
7   cloud_zone_id:
8     type: string
9     description: The cloud zone for this VF instance
10   vf_name:
11     type: string
12     description: The VF Name; defaults to VMVM for the virtual MVM VNF.
13     constraints:
14       - allowed_pattern: "[a-zA-Z0-9]+"
15       - length: { min: 4, max: 4 }
16         description: Each VF will have a 4-character alphanumeric identifier
17   vf_instance_num:
18     type: string
19     description: The number for this VF instance
20     constraints:
21       - allowed_pattern: "[0-9]+"
22       - length: { min: 2, max: 2 }
23         description: VF instance number must be a two-digit numeric value
24   vf_component:
25     type: string
26     description: The component that this VF instance is running
27     constraints:
28       - allowed_pattern: "[a-zA-Z0-9]+"
29       - length: { min: 3, max: 3 }
30         description: Each VF component will have a 3-character alphanumeric identifier
31   vm_instance_num:
32     type: comma_delimited_list
33     description: VM instance number list must be a list of three-digit numeric value
34   vnf_id:
35     type: string
36     description: Unique ID for this VF instance
37   vf_module_id:
38     type: string
39     description: Unique ID for this VF_MODULE instance
40   bootimage:
41     type: string
42     description: Master bootimage volume id
43   flavor:
44     type: string
45     description: Server flavor
46     constraints:
47       - custom_constraint: nova.flavor
48   key_name:
49     type: string
50     description: SSH key name
51     constraints:
52       - custom_constraint: nova.keypair
53
54   availability_zone_0:
55     type: comma_delimited_list
56     description: List of Availability Zone IDs or Names
57
58   sec_groups:
59     type: comma_delimited_list
60     description: Security groups
61   mgmt_net_id:
62     type: string
63     description: Neutron UUID for the Management network
64     constraints:
65     - custom_constraint: neutron.network
66   virtual_mgmt_ip_0:
67     type: string
68     description: Virtual management network ip address
69
70   mvs_mgmt_ip_0:
71     type: comma_delimited_list
72     description: List of Management network IP addresses for IPv4
73
74   indx:
75     type: number
76     description: Index of the current instance
77
78 resources:
79   mgmt_port:
80     type: OS::Neutron::Port
81     properties:
82       name:
83         str_replace:
84           template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port
85           params:
86             $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
87             $VF_NAME: { get_param: vf_name }
88             $VF_INSTANCE_NUM: { get_param: vf_instance_num }
89             $VF_COMPONENT: { get_param: vf_component }
90             $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
91       network_id: { get_param: mgmt_net_id }
92       security_groups: [{ get_param: sec_groups }]
93
94       fixed_ips:
95         - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] }
96
97       allowed_address_pairs:
98         - ip_address: { get_param: virtual_mgmt_ip_0 }
99
100   boot_volume:
101     type: OS::Cinder::Volume
102     properties:
103       size: 35
104       name:
105         str_replace:
106           template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
107           params:
108             $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
109             $VF_NAME: { get_param: vf_name }
110             $VF_INSTANCE_NUM: { get_param: vf_instance_num }
111             $VF_COMPONENT: { get_param: vf_component }
112             $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
113
114       image: { get_param: bootimage }
115
116
117       availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
118
119
120   data_volume:
121     type: OS::Cinder::Volume
122     properties:
123       size: 265
124       name:
125         str_replace:
126           template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
127           params:
128             $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
129             $VF_NAME: { get_param: vf_name }
130             $VF_INSTANCE_NUM: { get_param: vf_instance_num }
131             $VF_COMPONENT: { get_param: vf_component }
132             $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
133
134       availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
135
136
137   vnfci:
138     type: OS::Nova::Server
139     properties:
140       name:
141         str_replace:
142           template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
143           params:
144             $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
145             $VF_NAME: { get_param: vf_name }
146             $VF_INSTANCE_NUM: { get_param: vf_instance_num }
147             $VF_COMPONENT: { get_param: vf_component }
148             $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
149       block_device_mapping:
150         - device_name: vda
151           volume_id: { get_resource: boot_volume }
152           delete_on_termination: false
153         - device_name: vdb
154           volume_id: { get_resource: data_volume }
155           delete_on_termination: false
156       flavor: { get_param: flavor }
157       key_name: { get_param: key_name }
158       networks:
159         - port: { get_resource: mgmt_port }
160
161       availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
162
163     metadata:
164       vnf_id: { get_param: vnf_id }
165       vf_module_id: { get_param: vf_module_id }