Debian Codegraph @

heat_tempest_plugin/tests/scenario/templates/test_base_resources.yaml

raw
1 heat_template_version: 2014-10-16
2
3 description: >
4 This HOT template that just defines a single server.
5 Contains just base features to verify base heat support.
6
7 parameters:
8 key_name:
9 type: string
10 default: key-01
11 description: Name of the key pair to use for the server
12 flavor:
13 type: string
14 description: Flavor for the server to be created
15 default: m1.small
16 constraints:
17 - custom_constraint: nova.flavor
18 image:
19 type: string
20 description: Image ID or image name to use for the server
21 constraints:
22 - custom_constraint: glance.image
23 vol_size:
24 type: number
25 description: The size of the Cinder volume
26 default: 1
27 private_net_name:
28 type: string
29 default: private-net-01
30 description: Name of private network to be created
31 private_net_cidr:
32 type: string
33 default: 192.168.101.0/24
34 description: Private network address (CIDR notation)
35 private_net_gateway:
36 type: string
37 default: 192.168.101.1
38 description: Private network gateway address
39 private_net_pool_start:
40 type: string
41 default: 192.168.101.2
42 description: Start of private network IP address allocation pool
43 private_net_pool_end:
44 type: string
45 default: 192.168.101.127
46 description: End of private network IP address allocation pool
47 echo_foo:
48 default: fooooo
49 type: string
50
51 resources:
52 private_net:
53 type: OS::Neutron::Net
54 properties:
55 name: { get_param: private_net_name }
56
57 private_subnet:
58 type: OS::Neutron::Subnet
59 properties:
60 network_id: { get_resource: private_net }
61 cidr: { get_param: private_net_cidr }
62 gateway_ip: { get_param: private_net_gateway }
63 allocation_pools:
64 - start: { get_param: private_net_pool_start }
65 end: { get_param: private_net_pool_end }
66
67 server_port:
68 type: OS::Neutron::Port
69 properties:
70 network_id: { get_resource: private_net }
71 fixed_ips:
72 - subnet_id: { get_resource: private_subnet }
73
74 key:
75 type: OS::Nova::KeyPair
76 properties:
77 name: { get_param: key_name }
78 public_key: { get_file: id_ed25519.pub }
79
80 server:
81 type: OS::Nova::Server
82 properties:
83 key_name: { get_resource: key }
84 image: { get_param: image }
85 flavor: { get_param: flavor }
86 networks:
87 - port: { get_resource: server_port }
88 user_data:
89 str_replace:
90 template: |
91 #!/bin/bash
92 echo echo_foo
93 params:
94 echo_foo: { get_param: echo_foo }
95
96 vol:
97 type: OS::Cinder::Volume
98 properties:
99 size: { get_param: vol_size }
100
101 vol_att:
102 type: OS::Cinder::VolumeAttachment
103 properties:
104 instance_uuid: { get_resource: server }
105 volume_id: { get_resource: vol }
106 mountpoint: /dev/vdb
107
108 outputs:
109 server_networks:
110 description: The networks of the deployed server
111 value: { get_attr: [server, networks] }