push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / nested / resource_group / 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
101
102   vnfci:
103     type: OS::Nova::Server
104     properties:
105       name:
106         str_replace:
107           template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM
108           params:
109             $CLOUD_ZONE_ID: { get_param: cloud_zone_id }
110             $VF_NAME: { get_param: vf_name }
111             $VF_INSTANCE_NUM: { get_param: vf_instance_num }
112             $VF_COMPONENT: { get_param: vf_component }
113             $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] }
114       flavor: { get_param: flavor }
115       key_name: { get_param: key_name }
116       networks:
117         - port: { get_resource: mgmt_port }
118
119       availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] }
120
121     metadata:
122       vnf_id: { get_param: vnf_id }
123       vf_module_id: { get_param: vf_module_id }
124
125 outputs:
126   vnfci_id_1:
127     value: { get_resource: vnfci }
128   vnfci_id_2:
129     value: { get_resource: vnfci }