/
stacks.yaml
179 lines (158 loc) · 3.94 KB
/
stacks.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
fixtures:
- AuthenticationFixture
defaults:
request_headers:
X-Auth-Token: $ENVIRON['OS_TOKEN']
tests:
- name: stack list
desc: 39c0245e-6055-41cf-9f0e-15adfe55ded6
GET: /stacks
status: 200
response_headers:
content-type: application/json
- name: create empty stack
desc: bde1b827-65fb-47ea-909f-82537e6260d3
POST: /stacks
request_headers:
content-type: application/json
data:
files: {}
disable_rollback: true
parameters: {}
stack_name: $ENVIRON['PREFIX']-empty
environment: {}
template:
heat_template_version: '2016-04-08'
status: 201
response_headers:
location: //stacks/$ENVIRON['PREFIX']-empty/[a-f0-9-]+/
- name: poll for empty CREATE_COMPLETE
desc: f575e5c4-2aed-4381-9f0d-2dfcb0640c4b
GET: $LOCATION
redirects: True
poll:
count: 10
delay: 2.0
response_json_paths:
$.stack.stack_status: CREATE_COMPLETE
- name: show empty stack
desc: 89b233fe-0d55-4959-9289-0b5dabe4e4c9
GET: $LAST_URL
redirects: True
status: 200
- name: delete empty stack
desc: 7eca55fe-8300-43b6-a6b8-fb2d99b51911
DELETE: $LAST_URL
redirects: True
status: 204
- name: create stack
desc: 56ac2173-97c5-4347-bd32-529a260cfac3
POST: /stacks
request_headers:
content-type: application/json
data:
files: {}
disable_rollback: true
parameters: {'test_val': value}
stack_name: $ENVIRON['PREFIX']-stack
template:
heat_template_version: pike
parameters:
test_val:
type: string
resources:
test:
type: OS::Heat::TestResource
properties:
value: {get_param: test_val}
outputs:
output_value:
value: {get_attr: [test, output]}
status: 201
response_headers:
location: //stacks/$ENVIRON['PREFIX']-stack/[a-f0-9-]+/
- name: poll for stack CREATE_COMPLETE
desc: 6a0fe2dc-2822-4af3-b606-321ff7ad3de9
GET: $LOCATION
redirects: True
poll:
count: 10
delay: 2.0
response_json_paths:
$.stack.stack_status: CREATE_COMPLETE
- name: show stack
desc: 9b268607-0335-4667-a613-bccf81e66f8f
GET: $LAST_URL
redirects: True
status: 200
- name: update stack
desc: 6bb1ec02-dd19-4b2c-9a6d-866ce666650f
PUT: $LAST_URL
request_headers:
content-type: application/json
data:
files: {}
disable_rollback: true
parameters: {'test_val': new_value}
stack_name: $ENVIRON['PREFIX']-stack
template:
heat_template_version: pike
parameters:
test_val:
type: string
resources:
test:
type: OS::Heat::TestResource
properties:
value: {get_param: test_val}
action_wait_secs:
update: 1
outputs:
output_value:
value: {get_attr: [test, output]}
status: 202
- name: poll for stack UPDATE_COMPLETE
desc: 3e280fb3-02b6-44fb-84dd-e04921d47733
GET: $LAST_URL
redirects: True
poll:
count: 10
delay: 2.0
response_json_paths:
$.stack.stack_status: UPDATE_COMPLETE
- name: patch update stack
desc: 927cea42-a35b-4664-b209-ab2cb34e6ef4
PATCH: $LAST_URL
request_headers:
content-type: application/json
data:
parameters: {'test_val': new_patched_value}
status: 202
- name: poll for stack patch UPDATE_COMPLETE
desc: a1cfd3b4-2536-4c54-94f4-12093f2ccf3b
GET: $LAST_URL
redirects: True
poll:
count: 10
delay: 2.0
response_json_paths:
$.stack.stack_status: UPDATE_COMPLETE
- name: list stack outputs
desc: bbd98b50-b75b-44a1-b7e8-0a68fd7c6d33
GET: $LAST_URL/outputs
redirects: True
status: 200
response_json_paths:
$.outputs[0].output_key: output_value
- name: get stack output
desc: e761f5d7-70f6-4d95-a11b-e5fa0ecb43d2
GET: $LAST_URL/output_value
redirects: True
status: 200
response_json_paths:
$.output.output_value: new_patched_value
- name: delete stack
desc: bcf4c359-0a64-4652-b465-df3f688a9d4d
DELETE: /stacks/$ENVIRON['PREFIX']-stack
redirects: True
status: 204