VNF Software Version parameter added to CDS Heat templates
[demo.git] / heat / vFW_NextGen / templates / base_template.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4 #
5 #
6 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #        http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #==================LICENSE_END============================================
20 #
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 #
23 ##########################################################################
24
25 heat_template_version: 2013-05-23
26
27 description: Heat template that deploys a private network for ONAP VNFs
28
29 ##############
30 #            #
31 # PARAMETERS #
32 #            #
33 ##############
34
35 parameters:
36   int_private1_net_cidr:
37     type: string
38     label: Unprotected private network CIDR
39     description: The CIDR of the unprotected private network
40   int_private2_net_cidr:
41     type: string
42     label: Protected private network CIDR
43     description: The CIDR of the protected private network
44   pub_key:
45     type: string
46     label: Public key
47     description: Public key to be installed on the compute instance
48   vnf_name:
49     type: string
50     description: VNF_NAME
51   vnf_software_version:
52     type: string
53     label: VNF software version
54     description: VNF software version
55     default: 1.0.0
56
57 #############
58 #           #
59 # RESOURCES #
60 #           #
61 #############
62
63 resources:
64   my_keypair:
65     type: OS::Nova::KeyPair
66     properties:
67       name:
68         str_replace:
69           template: vnfname_key_name
70           params:
71             vnfname: { get_param: vnf_name }
72       public_key: { get_param: pub_key }
73       save_private_key: false
74
75   int_private1_network:
76     type: OS::Neutron::Net
77     properties:
78       name:
79         str_replace:
80           template: vnfname_int_private1_net
81           params:
82             vnfname: { get_param: vnf_name }
83
84   int_private1_subnet:
85     type: OS::Neutron::Subnet
86     properties:
87       name:
88         str_replace:
89           template: vnfname_int_private1_subnet
90           params:
91             vnfname: { get_param: vnf_name }
92       network: { get_resource: int_private1_network }
93       cidr: { get_param: int_private1_net_cidr }
94
95   int_private2_network:
96     type: OS::Neutron::Net
97     properties:
98       name:
99         str_replace:
100           template: vnfname_int_private2_net
101           params:
102             vnfname: { get_param: vnf_name }
103
104   int_private2_subnet:
105     type: OS::Neutron::Subnet
106     properties:
107       name:
108         str_replace:
109           template: vnfname_int_private2_subnet
110           params:
111             vnfname: { get_param: vnf_name }
112       network: { get_resource: int_private2_network }
113       cidr: { get_param: int_private2_net_cidr }
114
115 outputs:
116   int_private1_net_id:
117     value: { get_resource: int_private1_network }
118   int_private1_subnet_id:
119     value: { get_resource: int_private1_subnet }
120   int_private2_net_id:
121     value: { get_resource: int_private2_network }
122   int_private2_subnet_id:
123     value: { get_resource: int_private2_subnet }
124   int_private2_net_cidr:
125     value: { get_param: int_private2_net_cidr }
126   int_private1_net_cidr:
127     value: { get_param: int_private1_net_cidr }
128   key_name:
129     value: { get_resource: my_keypair }