-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_with_nic.yaml
46 lines (43 loc) · 1.14 KB
/
server_with_nic.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
heat_template_version: 2013-05-23
description:
create a instance and some net ,for test a instance can associate how many nic
parameters:
ext_net:
type: string
description: external net for router
default: ext_net
availability_zone:
type: string
default: default_availability_zone
image_id:
type: string
instance_type:
type: string
resources:
instance:
type: OS::Nova::Server
properties:
availability_zone: { get_param: availability_zone }
metadata:
admin_pass: aaaaaa
image: { get_param: image_id}
flavor: { get_param: instance_type }
networks:
- port: { get_resource: 0_port }
{% for arg in arg_list %}
{{ arg }}_private_net:
type: OS::Neutron::Net
properties:
name: heat1_net
{{ arg }}_private_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: {{ arg }}_private_net }
cidr: 11.{{ arg }}.0.0/24
{{ arg }}_port:
type: OS::Neutron::Port
properties:
network_id: { get_resource: {{ arg }}_private_net }
fixed_ips:
- subnet_id: { get_resource: {{ arg }}_private_subnet }
{% endfor %}