47dce5e796ed12fe0ce0a8bd38269c9066de1028
[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
52 #############
53 #           #
54 # RESOURCES #
55 #           #
56 #############
57
58 resources:
59   my_keypair:
60     type: OS::Nova::KeyPair
61     properties:
62       name:
63         str_replace:
64           template: vnfname_key_name
65           params:
66             vnfname: { get_param: vnf_name }
67       public_key: { get_param: pub_key }
68       save_private_key: false
69
70   int_private1_network:
71     type: OS::Neutron::Net
72     properties:
73       name:
74         str_replace:
75           template: vnfname_int_private1_net
76           params:
77             vnfname: { get_param: vnf_name }
78
79   int_private1_subnet:
80     type: OS::Neutron::Subnet
81     properties:
82       name:
83         str_replace:
84           template: vnfname_int_private1_subnet
85           params:
86             vnfname: { get_param: vnf_name }
87       network: { get_resource: int_private1_network }
88       cidr: { get_param: int_private1_net_cidr }
89
90   int_private2_network:
91     type: OS::Neutron::Net
92     properties:
93       name:
94         str_replace:
95           template: vnfname_int_private2_net
96           params:
97             vnfname: { get_param: vnf_name }
98
99   int_private2_subnet:
100     type: OS::Neutron::Subnet
101     properties:
102       name:
103         str_replace:
104           template: vnfname_int_private2_subnet
105           params:
106             vnfname: { get_param: vnf_name }
107       network: { get_resource: int_private2_network }
108       cidr: { get_param: int_private2_net_cidr }
109
110 outputs:
111   int_private1_net_id:
112     value: { get_resource: int_private1_network }
113   int_private1_subnet_id:
114     value: { get_resource: int_private1_subnet }
115   int_private2_net_id:
116     value: { get_resource: int_private2_network }
117   int_private2_subnet_id:
118     value: { get_resource: int_private2_subnet }
119   int_private2_net_cidr:
120     value: { get_param: int_private2_net_cidr }
121   int_private1_net_cidr:
122     value: { get_param: int_private1_net_cidr }
123   key_name:
124     value: { get_resource: my_keypair }