Fix spacing issues in YAML files in heat
[demo.git] / heat / vLB_CDS / base_template.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4 #
5 #
6 # Copyright (c) 2019 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 common resources
28
29 ##############
30 #            #
31 # PARAMETERS #
32 #            #
33 ##############
34
35 parameters:
36
37   vlb_private_net_id:
38     type: string
39     label: vLoadBalancer private network name or ID
40     description: Private network that connects vLoadBalancer with vDNSs
41   pktgen_private_net_id:
42     type: string
43     label: vPacketGen private network name or ID
44     description: Private network that connects vLoadBalancer with vPacketGen
45   vlb_private_net_cidr:
46     type: string
47     label: vLoadBalancer private network CIDR
48     description: The CIDR of the vLoadBalancer private network
49   pktgen_private_net_cidr:
50     type: string
51     label: vPacketGen private network CIDR
52     description: The CIDR of the vPacketGen private network
53   vnf_id:
54     type: string
55     label: VNF ID
56     description: The VNF ID is provided by ONAP
57   vnf_name:
58     type: string
59     label: VNF NAME
60     description: The VNF NAME is provided by ONAP
61   vlb_0_int_pktgen_private_port_0_mac:
62     type: string
63     label: vLB MAC address
64     description: MAC address of the vLB used by the vPacketGen VM
65   vpg_0_int_pktgen_private_port_0_mac:
66     type: string
67     label: vPacketGen MAC address
68     description: MAC address of the vPacketGen used by the vLB VM
69   key_name:
70     type: string
71     label: Key pair name
72     description: Public/Private key pair name
73   pub_key:
74     type: string
75     label: Public key
76     description: Public key to be installed on the compute instance
77
78
79 #############
80 #           #
81 # RESOURCES #
82 #           #
83 #############
84
85 resources:
86
87   random-str_0:
88     type: OS::Heat::RandomString
89     properties:
90       length: 4
91
92   my_keypair_0:
93     type: OS::Nova::KeyPair
94     properties:
95       name:
96         str_replace:
97           template: vnfname_base_rand
98           params:
99             base: { get_param: key_name }
100             rand: { get_resource: random-str_0 }
101             vnfname: { get_param: vnf_name }
102       public_key: { get_param: pub_key }
103       save_private_key: false
104
105   # NETWORK_ROLE: private
106   int_private_network:
107     type: OS::Neutron::Net
108     properties:
109       name:
110         str_replace:
111           template: vnfname_privatenetid
112           params:
113             privatenetid: { get_param: vlb_private_net_id }
114             vnfname: { get_param: vnf_name }
115
116   # NETWORK_ROLE: private
117   int_private_subnet_0:
118     type: OS::Neutron::Subnet
119     properties:
120       name:
121         str_replace:
122           template: vnfname_privatenetid_subnet
123           params:
124             privatenetid: { get_param: vlb_private_net_id }
125             vnfname: { get_param: vnf_name }
126       network: { get_resource: int_private_network }
127       cidr: { get_param: vlb_private_net_cidr }
128
129   # NETWORK_ROLE: pktgen_private
130   int_pktgen_private_network:
131     type: OS::Neutron::Net
132     properties:
133       name:
134         str_replace:
135           template: vnfname_privatenetid
136           params:
137             privatenetid: { get_param: pktgen_private_net_id }
138             vnfname: { get_param: vnf_name }
139
140   # NETWORK_ROLE: pktgen_private
141   int_pktgen_private_subnet_0:
142     type: OS::Neutron::Subnet
143     properties:
144       name:
145         str_replace:
146           template: vnfname_privatenetid_subnet
147           params:
148             privatenetid: { get_param: pktgen_private_net_id }
149             vnfname: { get_param: vnf_name }
150       network: { get_resource: int_pktgen_private_network }
151       cidr: { get_param: pktgen_private_net_cidr }
152
153
154 outputs:
155   int_private_subnet_id:
156     value: { get_resource: int_private_subnet_0 }
157   int_private_net_id:
158     value: { get_resource: int_private_network }
159   int_pktgen_private_subnet_id:
160     value: { get_resource: int_pktgen_private_subnet_0 }
161   int_pktgen_private_net_id:
162     value: { get_resource: int_pktgen_private_network }
163   keypair:
164     value: { get_resource: my_keypair_0 }
165   vnf_id:
166     value: { get_param: vnf_id }
167   vnf_name:
168     value: { get_param: vnf_name }
169   vlb_0_mac_address:
170     value: { get_param: vlb_0_int_pktgen_private_port_0_mac }
171   vpg_0_mac_address:
172     value: { get_param: vpg_0_int_pktgen_private_port_0_mac }