Debian Codegraph @

heatclient/tests/inline_templates.py

raw symbols SCIP
1 #
2 # Copyright 2016 IBM Corp.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15
16 FULL_TEMPLATE = '''
17 heat_template_version: 2016-04-08
18
19 description: a template
20
21 parameter_groups:
22 - label: param_group_1
23 description: parameter group 1
24 parameters:
25 - param1
26 - param2
27 - label: param_group_2
28 description: parameter group 2
29 parameters:
30 - param3
31
32 parameters:
33 param1:
34 type: string
35 label: parameter 5
36 description: parameter 5
37 default: foo
38 hidden: false
39 constraints:
40 - allowed_values: ['foo', 'bar', 'bax']
41 param2:
42 type: number
43 default: 0
44 constraints:
45 - range: {min: 0, max: 10}
46 description: must be between 0 and 10
47 param3:
48 type: boolean
49
50 resources:
51 resource1:
52 type: OS::Heat::None
53 properties:
54 prop1: { get_param: param1 }
55 prop2: { get_param: param2 }
56 prop3: value
57 resource2:
58 type: OS::Heat::None
59 properties:
60 prop1: { get_param: param3 }
61 depends_on: resource1
62
63 outputs:
64 output1:
65 description: resource 1 prop 3
66 value: { get_attr: [resource1, prop3] }
67 output2:
68 description: resource 2 prop 1
69 value: { get_attr: [resource2, prop1] }
70 '''
71
72 SHORT_TEMPLATE = '''
73 heat_template_version: 2016-04-08
74
75 resources:
76 res1:
77 type: OS::Heat::None
78 '''