9184fdafcbe51e438e897bfa243789f7ffaccb67
[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   unprotected_private_net_id:
37     type: string
38     label: Unprotected private network name or ID
39     description: Private network that connects vPacketGenerator with vFirewall
40   unprotected_private_subnet_id:
41     type: string
42     label: Unprotected private subnetwork name or ID
43     description: Private subnetwork of the protected network
44   unprotected_private_net_cidr:
45     type: string
46     label: Unprotected private network CIDR
47     description: The CIDR of the unprotected private network
48   protected_private_net_id:
49     type: string
50     label: Protected private network name or ID
51     description: Private network that connects vFirewall with vSink
52   protected_private_subnet_id:
53     type: string
54     label: Protected private subnetwork name or ID
55     description: Private subnetwork of the unprotected network
56   protected_private_net_cidr:
57     type: string
58     label: Protected private network CIDR
59     description: The CIDR of the protected private network
60   key_name:
61     type: string
62     label: Key pair name
63     description: Public/Private key pair name
64   pub_key:
65     type: string
66     label: Public key
67     description: Public key to be installed on the compute instance
68
69
70 #############
71 #           #
72 # RESOURCES #
73 #           #
74 #############
75
76 resources:
77   my_keypair:
78     type: OS::Nova::KeyPair
79     properties:
80       name: { get_param: key_name }
81       public_key: { get_param: pub_key }
82       save_private_key: false
83
84   unprotected_private_network:
85     type: OS::Neutron::Net
86     properties:
87       name: { get_param: unprotected_private_net_id }
88
89   unprotected_private_subnet:
90     type: OS::Neutron::Subnet
91     properties:
92       name: { get_param: unprotected_private_subnet_id }
93       network_id: { get_resource: unprotected_private_network }
94       cidr: { get_param: unprotected_private_net_cidr }
95
96   protected_private_network:
97     type: OS::Neutron::Net
98     properties:
99       name: { get_param: protected_private_net_id }
100
101   protected_private_subnet:
102     type: OS::Neutron::Subnet
103     properties:
104       name: { get_param: protected_private_subnet_id }
105       network_id: { get_resource: protected_private_network }
106       cidr: { get_param: protected_private_net_cidr }