blob: d73363d982b9dc3af77b1b46d920ac9a137db08a [file] [log] [blame]
huangtianhua99a25de2016-07-26 10:58:33 +08001# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13from heat_integrationtests.functional import functional_base
14
15
16cfn_template = '''
17AWSTemplateFormatVersion: 2010-09-09
18Parameters:
19 env_type:
20 Default: test
21 Type: String
22 AllowedValues: [prod, test]
huangtianhua7bdc7512016-06-17 09:25:38 +080023 zone:
24 Type: String
25 Default: beijing
huangtianhua99a25de2016-07-26 10:58:33 +080026Conditions:
27 Prod: {"Fn::Equals" : [{Ref: env_type}, "prod"]}
huangtianhuabf63fcb2016-07-27 13:02:39 +080028 Test:
29 Fn::Not:
30 - Fn::Equals:
31 - Ref: env_type
32 - prod
huangtianhua7bdc7512016-06-17 09:25:38 +080033 Beijing_Prod:
34 Fn::And:
35 - Fn::Equals:
36 - Ref: env_type
37 - prod
38 - Fn::Equals:
39 - Ref: zone
40 - beijing
huangtianhuae4365742016-08-30 10:27:21 +080041 Xian_Zone:
42 Fn::Equals:
43 - Ref: zone
44 - xian
45 Xianyang_Zone:
46 Fn::Equals:
47 - Ref: zone
48 - xianyang
huangtianhua26da8982016-07-27 18:11:58 +080049 Fujian_Zone:
50 Fn::Or:
51 - Fn::Equals:
52 - Ref: zone
53 - fuzhou
54 - Fn::Equals:
55 - Ref: zone
56 - xiamen
huangtianhuae4365742016-08-30 10:27:21 +080057 Fujian_Prod:
58 Fn::And:
59 - Fujian_Zone
60 - Prod
61 Shannxi_Provice:
62 Fn::Or:
63 - Xian_Zone
64 - Xianyang_Zone
65 Not_Shannxi:
66 Fn::Not: [Shannxi_Provice]
huangtianhua99a25de2016-07-26 10:58:33 +080067Resources:
68 test_res:
69 Type: OS::Heat::TestResource
70 Properties:
huangtianhuafb8b51f2016-02-23 17:03:10 +080071 value: {"Fn::If": ["Prod", "env_is_prod", "env_is_test"]}
huangtianhua99a25de2016-07-26 10:58:33 +080072 prod_res:
73 Type: OS::Heat::TestResource
74 Properties:
75 value: prod_res
76 Condition: Prod
huangtianhuabf63fcb2016-07-27 13:02:39 +080077 test_res1:
78 Type: OS::Heat::TestResource
79 Properties:
80 value: just in test env
81 Condition: Test
huangtianhua7bdc7512016-06-17 09:25:38 +080082 beijing_prod_res:
83 Type: OS::Heat::TestResource
84 Properties:
85 value: beijing_prod_res
86 Condition: Beijing_Prod
huangtianhua26da8982016-07-27 18:11:58 +080087 fujian_res:
88 Type: OS::Heat::TestResource
89 Condition: Fujian_Zone
90 Properties:
91 value: fujian_res
huangtianhuae4365742016-08-30 10:27:21 +080092 fujian_prod_res:
93 Type: OS::Heat::TestResource
94 Condition: Fujian_Prod
95 Properties:
96 value: fujian_prod_res
97 shannxi_res:
98 Type: OS::Heat::TestResource
99 Condition: Shannxi_Provice
100 Properties:
101 value: shannxi_res
102 not_shannxi_res:
103 Type: OS::Heat::TestResource
104 Condition: Not_Shannxi
105 Properties:
106 value: not_shannxi_res
huangtianhua27075a92016-07-26 14:32:40 +0800107Outputs:
108 res_value:
109 Value: {"Fn::GetAtt": [prod_res, output]}
110 Condition: Prod
huangtianhuafb8b51f2016-02-23 17:03:10 +0800111 test_res_value:
112 Value: {"Fn::GetAtt": [test_res, output]}
113 prod_resource:
114 Value: {"Fn::If": [Prod, {Ref: prod_res}, 'no_prod_res']}
huangtianhuabf63fcb2016-07-27 13:02:39 +0800115 test_res1_value:
116 Value: {"Fn::If": [Test, {"Fn::GetAtt": [test_res1, output]},
117 'no_test_res1']}
huangtianhua7bdc7512016-06-17 09:25:38 +0800118 beijing_prod_res:
119 Value: {"Fn::If": [Beijing_Prod, {Ref: beijing_prod_res}, 'no_prod_res']}
huangtianhua99a25de2016-07-26 10:58:33 +0800120'''
121
122hot_template = '''
123heat_template_version: 2016-10-14
124parameters:
125 env_type:
126 default: test
127 type: string
128 constraints:
129 - allowed_values: [prod, test]
huangtianhua7bdc7512016-06-17 09:25:38 +0800130 zone:
131 type: string
132 default: beijing
huangtianhua99a25de2016-07-26 10:58:33 +0800133conditions:
134 prod: {equals : [{get_param: env_type}, "prod"]}
huangtianhuabf63fcb2016-07-27 13:02:39 +0800135 test:
136 not:
137 equals:
138 - get_param: env_type
139 - prod
huangtianhua7bdc7512016-06-17 09:25:38 +0800140 beijing_prod:
141 and:
142 - equals:
143 - get_param: zone
144 - beijing
145 - equals:
146 - get_param: env_type
147 - prod
huangtianhuae4365742016-08-30 10:27:21 +0800148 xian_zone:
149 equals:
150 - get_param: zone
151 - xian
152 xianyang_zone:
153 equals:
154 - get_param: zone
155 - xianyang
huangtianhua26da8982016-07-27 18:11:58 +0800156 fujian_zone:
157 or:
158 - equals:
159 - get_param: zone
160 - fuzhou
161 - equals:
162 - get_param: zone
163 - xiamen
huangtianhuae4365742016-08-30 10:27:21 +0800164 fujian_prod:
165 and:
166 - fujian_zone
167 - prod
168 shannxi_provice:
169 or:
170 - xian_zone
171 - xianyang_zone
172 not_shannxi:
173 not: shannxi_provice
huangtianhua99a25de2016-07-26 10:58:33 +0800174resources:
175 test_res:
176 type: OS::Heat::TestResource
177 properties:
huangtianhuafb8b51f2016-02-23 17:03:10 +0800178 value: {if: ["prod", "env_is_prod", "env_is_test"]}
huangtianhua99a25de2016-07-26 10:58:33 +0800179 prod_res:
180 type: OS::Heat::TestResource
181 properties:
182 value: prod_res
183 condition: prod
huangtianhuabf63fcb2016-07-27 13:02:39 +0800184 test_res1:
185 type: OS::Heat::TestResource
186 properties:
187 value: just in test env
188 condition: test
huangtianhua7bdc7512016-06-17 09:25:38 +0800189 beijing_prod_res:
190 type: OS::Heat::TestResource
191 properties:
192 value: beijing_prod_res
193 condition: beijing_prod
huangtianhua26da8982016-07-27 18:11:58 +0800194 fujian_res:
195 type: OS::Heat::TestResource
196 condition: fujian_zone
197 properties:
198 value: fujian_res
huangtianhuae4365742016-08-30 10:27:21 +0800199 fujian_prod_res:
200 type: OS::Heat::TestResource
201 condition: fujian_prod
202 properties:
203 value: fujian_prod_res
204 shannxi_res:
205 type: OS::Heat::TestResource
206 condition: shannxi_provice
207 properties:
208 value: shannxi_res
209 not_shannxi_res:
210 type: OS::Heat::TestResource
211 condition: not_shannxi
212 properties:
213 value: not_shannxi_res
huangtianhua27075a92016-07-26 14:32:40 +0800214outputs:
215 res_value:
216 value: {get_attr: [prod_res, output]}
217 condition: prod
huangtianhuafb8b51f2016-02-23 17:03:10 +0800218 test_res_value:
219 value: {get_attr: [test_res, output]}
220 prod_resource:
221 value: {if: [prod, {get_resource: prod_res}, 'no_prod_res']}
huangtianhuabf63fcb2016-07-27 13:02:39 +0800222 test_res1_value:
223 value: {if: [test, {get_attr: [test_res1, output]}, 'no_test_res1']}
huangtianhua7bdc7512016-06-17 09:25:38 +0800224 beijing_prod_res:
225 value: {if: [beijing_prod, {get_resource: beijing_prod_res},
226 'no_prod_res']}
huangtianhua99a25de2016-07-26 10:58:33 +0800227'''
228
229
230class CreateUpdateResConditionTest(functional_base.FunctionalTestsBase):
231
232 def setUp(self):
233 super(CreateUpdateResConditionTest, self).setUp()
234
huangtianhuae4365742016-08-30 10:27:21 +0800235 def res_assert_for_prod(self, resources, bj_prod=True, fj_zone=False,
236 shannxi_provice=False):
huangtianhua99a25de2016-07-26 10:58:33 +0800237 res_names = [res.resource_name for res in resources]
huangtianhua7bdc7512016-06-17 09:25:38 +0800238 if bj_prod:
huangtianhuae4365742016-08-30 10:27:21 +0800239 self.assertEqual(4, len(resources))
huangtianhua7bdc7512016-06-17 09:25:38 +0800240 self.assertIn('beijing_prod_res', res_names)
huangtianhuae4365742016-08-30 10:27:21 +0800241 self.assertIn('not_shannxi_res', res_names)
huangtianhua26da8982016-07-27 18:11:58 +0800242 elif fj_zone:
huangtianhuae4365742016-08-30 10:27:21 +0800243 self.assertEqual(5, len(resources))
huangtianhua26da8982016-07-27 18:11:58 +0800244 self.assertIn('fujian_res', res_names)
245 self.assertNotIn('beijing_prod_res', res_names)
huangtianhuae4365742016-08-30 10:27:21 +0800246 self.assertIn('not_shannxi_res', res_names)
247 self.assertIn('fujian_prod_res', res_names)
248 elif shannxi_provice:
249 self.assertEqual(3, len(resources))
250 self.assertIn('shannxi_res', res_names)
huangtianhua7bdc7512016-06-17 09:25:38 +0800251 else:
huangtianhuae4365742016-08-30 10:27:21 +0800252 self.assertEqual(3, len(resources))
253 self.assertIn('not_shannxi_res', res_names)
huangtianhua99a25de2016-07-26 10:58:33 +0800254 self.assertIn('prod_res', res_names)
255 self.assertIn('test_res', res_names)
256
huangtianhuae4365742016-08-30 10:27:21 +0800257 def res_assert_for_test(self, resources, fj_zone=False,
258 shannxi_provice=False):
huangtianhua99a25de2016-07-26 10:58:33 +0800259 res_names = [res.resource_name for res in resources]
huangtianhua26da8982016-07-27 18:11:58 +0800260
261 if fj_zone:
huangtianhuae4365742016-08-30 10:27:21 +0800262 self.assertEqual(4, len(resources))
huangtianhua26da8982016-07-27 18:11:58 +0800263 self.assertIn('fujian_res', res_names)
huangtianhuae4365742016-08-30 10:27:21 +0800264 self.assertIn('not_shannxi_res', res_names)
265 elif shannxi_provice:
266 self.assertEqual(3, len(resources))
huangtianhua26da8982016-07-27 18:11:58 +0800267 self.assertNotIn('fujian_res', res_names)
huangtianhuae4365742016-08-30 10:27:21 +0800268 self.assertIn('shannxi_res', res_names)
269 else:
270 self.assertEqual(3, len(resources))
271 self.assertIn('not_shannxi_res', res_names)
huangtianhua99a25de2016-07-26 10:58:33 +0800272 self.assertIn('test_res', res_names)
huangtianhuabf63fcb2016-07-27 13:02:39 +0800273 self.assertIn('test_res1', res_names)
huangtianhua99a25de2016-07-26 10:58:33 +0800274 self.assertNotIn('prod_res', res_names)
275
huangtianhua7bdc7512016-06-17 09:25:38 +0800276 def output_assert_for_prod(self, stack_id, bj_prod=True):
huangtianhua27075a92016-07-26 14:32:40 +0800277 output = self.client.stacks.output_show(stack_id,
278 'res_value')['output']
279 self.assertEqual('prod_res', output['output_value'])
280
huangtianhuafb8b51f2016-02-23 17:03:10 +0800281 test_res_value = self.client.stacks.output_show(
282 stack_id, 'test_res_value')['output']
283 self.assertEqual('env_is_prod', test_res_value['output_value'])
284
285 prod_resource = self.client.stacks.output_show(
286 stack_id, 'prod_resource')['output']
287 self.assertNotEqual('no_prod_res', prod_resource['output_value'])
288
huangtianhuabf63fcb2016-07-27 13:02:39 +0800289 test_res_output = self.client.stacks.output_show(
290 stack_id, 'test_res1_value')['output']
291 self.assertEqual('no_test_res1', test_res_output['output_value'])
292
huangtianhua7bdc7512016-06-17 09:25:38 +0800293 beijing_prod_res = self.client.stacks.output_show(
294 stack_id, 'beijing_prod_res')['output']
295 if bj_prod:
296 self.assertNotEqual('no_prod_res',
297 beijing_prod_res['output_value'])
298 else:
299 self.assertEqual('no_prod_res', beijing_prod_res['output_value'])
300
huangtianhua27075a92016-07-26 14:32:40 +0800301 def output_assert_for_test(self, stack_id):
302 output = self.client.stacks.output_show(stack_id,
303 'res_value')['output']
304 self.assertIsNone(output['output_value'])
305
huangtianhuafb8b51f2016-02-23 17:03:10 +0800306 test_res_value = self.client.stacks.output_show(
307 stack_id, 'test_res_value')['output']
308 self.assertEqual('env_is_test', test_res_value['output_value'])
309
310 prod_resource = self.client.stacks.output_show(
311 stack_id, 'prod_resource')['output']
312 self.assertEqual('no_prod_res', prod_resource['output_value'])
313
huangtianhuabf63fcb2016-07-27 13:02:39 +0800314 test_res_output = self.client.stacks.output_show(
315 stack_id, 'test_res1_value')['output']
316 self.assertEqual('just in test env',
317 test_res_output['output_value'])
318
huangtianhua7bdc7512016-06-17 09:25:38 +0800319 beijing_prod_res = self.client.stacks.output_show(
320 stack_id, 'beijing_prod_res')['output']
321 self.assertEqual('no_prod_res', beijing_prod_res['output_value'])
322
huangtianhua99a25de2016-07-26 10:58:33 +0800323 def test_stack_create_update_cfn_template_test_to_prod(self):
324 stack_identifier = self.stack_create(template=cfn_template)
325 resources = self.client.resources.list(stack_identifier)
326 self.res_assert_for_test(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800327 self.output_assert_for_test(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800328
huangtianhua26da8982016-07-27 18:11:58 +0800329 parms = {'zone': 'fuzhou'}
330 self.update_stack(stack_identifier,
331 template=cfn_template,
332 parameters=parms)
333
334 resources = self.client.resources.list(stack_identifier)
335 self.res_assert_for_test(resources, fj_zone=True)
336 self.output_assert_for_test(stack_identifier)
337
huangtianhuae4365742016-08-30 10:27:21 +0800338 parms = {'zone': 'xianyang'}
339 self.update_stack(stack_identifier,
340 template=cfn_template,
341 parameters=parms)
342
343 resources = self.client.resources.list(stack_identifier)
344 self.res_assert_for_test(resources, shannxi_provice=True)
345 self.output_assert_for_test(stack_identifier)
346
huangtianhua99a25de2016-07-26 10:58:33 +0800347 parms = {'env_type': 'prod'}
348 self.update_stack(stack_identifier,
349 template=cfn_template,
350 parameters=parms)
351
352 resources = self.client.resources.list(stack_identifier)
353 self.res_assert_for_prod(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800354 self.output_assert_for_prod(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800355
huangtianhua7bdc7512016-06-17 09:25:38 +0800356 parms = {'env_type': 'prod',
357 'zone': 'shanghai'}
358 self.update_stack(stack_identifier,
359 template=cfn_template,
360 parameters=parms)
361
362 resources = self.client.resources.list(stack_identifier)
363 self.res_assert_for_prod(resources, False)
364 self.output_assert_for_prod(stack_identifier, False)
365
huangtianhua26da8982016-07-27 18:11:58 +0800366 parms = {'env_type': 'prod',
367 'zone': 'xiamen'}
368 self.update_stack(stack_identifier,
369 template=cfn_template,
370 parameters=parms)
371
372 resources = self.client.resources.list(stack_identifier)
373 self.res_assert_for_prod(resources, bj_prod=False, fj_zone=True)
374 self.output_assert_for_prod(stack_identifier, False)
375
huangtianhuae4365742016-08-30 10:27:21 +0800376 parms = {'env_type': 'prod',
377 'zone': 'xianyang'}
378 self.update_stack(stack_identifier,
379 template=cfn_template,
380 parameters=parms)
381
382 resources = self.client.resources.list(stack_identifier)
383 self.res_assert_for_prod(resources, bj_prod=False, fj_zone=False,
384 shannxi_provice=True)
385 self.output_assert_for_prod(stack_identifier, False)
386
huangtianhua99a25de2016-07-26 10:58:33 +0800387 def test_stack_create_update_cfn_template_prod_to_test(self):
388 parms = {'env_type': 'prod'}
389 stack_identifier = self.stack_create(template=cfn_template,
390 parameters=parms)
391 resources = self.client.resources.list(stack_identifier)
392 self.res_assert_for_prod(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800393 self.output_assert_for_prod(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800394
huangtianhua26da8982016-07-27 18:11:58 +0800395 parms = {'zone': 'xiamen',
396 'env_type': 'prod'}
397 self.update_stack(stack_identifier,
398 template=cfn_template,
399 parameters=parms)
400
401 resources = self.client.resources.list(stack_identifier)
402 self.res_assert_for_prod(resources, bj_prod=False, fj_zone=True)
403 self.output_assert_for_prod(stack_identifier, bj_prod=False)
404
huangtianhuae4365742016-08-30 10:27:21 +0800405 parms = {'zone': 'xianyang',
406 'env_type': 'prod'}
407 self.update_stack(stack_identifier,
408 template=cfn_template,
409 parameters=parms)
410
411 resources = self.client.resources.list(stack_identifier)
412 self.res_assert_for_prod(resources, bj_prod=False, fj_zone=False,
413 shannxi_provice=True)
414 self.output_assert_for_prod(stack_identifier, bj_prod=False)
415
416 parms = {'zone': 'shanghai',
417 'env_type': 'prod'}
418 self.update_stack(stack_identifier,
419 template=cfn_template,
420 parameters=parms)
421
422 resources = self.client.resources.list(stack_identifier)
423 self.res_assert_for_prod(resources, bj_prod=False, fj_zone=False,
424 shannxi_provice=False)
425 self.output_assert_for_prod(stack_identifier, bj_prod=False)
426
huangtianhua99a25de2016-07-26 10:58:33 +0800427 parms = {'env_type': 'test'}
428 self.update_stack(stack_identifier,
429 template=cfn_template,
430 parameters=parms)
431
432 resources = self.client.resources.list(stack_identifier)
433 self.res_assert_for_test(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800434 self.output_assert_for_test(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800435
huangtianhua26da8982016-07-27 18:11:58 +0800436 parms = {'env_type': 'test',
437 'zone': 'fuzhou'}
438 self.update_stack(stack_identifier,
439 template=cfn_template,
440 parameters=parms)
441
442 resources = self.client.resources.list(stack_identifier)
443 self.res_assert_for_test(resources, fj_zone=True)
444 self.output_assert_for_test(stack_identifier)
445
huangtianhuae4365742016-08-30 10:27:21 +0800446 parms = {'env_type': 'test',
447 'zone': 'xianyang'}
448 self.update_stack(stack_identifier,
449 template=cfn_template,
450 parameters=parms)
451
452 resources = self.client.resources.list(stack_identifier)
453 self.res_assert_for_test(resources, fj_zone=False,
454 shannxi_provice=True)
455 self.output_assert_for_test(stack_identifier)
456
huangtianhua99a25de2016-07-26 10:58:33 +0800457 def test_stack_create_update_hot_template_test_to_prod(self):
458 stack_identifier = self.stack_create(template=hot_template)
459 resources = self.client.resources.list(stack_identifier)
460 self.res_assert_for_test(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800461 self.output_assert_for_test(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800462
huangtianhuae4365742016-08-30 10:27:21 +0800463 parms = {'zone': 'xianyang'}
464 self.update_stack(stack_identifier,
465 template=hot_template,
466 parameters=parms)
467
468 resources = self.client.resources.list(stack_identifier)
469 self.res_assert_for_test(resources, shannxi_provice=True)
470 self.output_assert_for_test(stack_identifier)
471
huangtianhua99a25de2016-07-26 10:58:33 +0800472 parms = {'env_type': 'prod'}
473 self.update_stack(stack_identifier,
474 template=hot_template,
475 parameters=parms)
476
477 resources = self.client.resources.list(stack_identifier)
478 self.res_assert_for_prod(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800479 self.output_assert_for_prod(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800480
huangtianhua7bdc7512016-06-17 09:25:38 +0800481 parms = {'env_type': 'prod',
482 'zone': 'shanghai'}
483 self.update_stack(stack_identifier,
484 template=hot_template,
485 parameters=parms)
486
487 resources = self.client.resources.list(stack_identifier)
488 self.res_assert_for_prod(resources, False)
489 self.output_assert_for_prod(stack_identifier, False)
490
huangtianhuae4365742016-08-30 10:27:21 +0800491 parms = {'env_type': 'prod',
492 'zone': 'xianyang'}
493 self.update_stack(stack_identifier,
494 template=hot_template,
495 parameters=parms)
496
497 resources = self.client.resources.list(stack_identifier)
498 self.res_assert_for_prod(resources, False, shannxi_provice=True)
499 self.output_assert_for_prod(stack_identifier, False)
500
huangtianhua99a25de2016-07-26 10:58:33 +0800501 def test_stack_create_update_hot_template_prod_to_test(self):
502 parms = {'env_type': 'prod'}
503 stack_identifier = self.stack_create(template=hot_template,
504 parameters=parms)
505 resources = self.client.resources.list(stack_identifier)
506 self.res_assert_for_prod(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800507 self.output_assert_for_prod(stack_identifier)
huangtianhua99a25de2016-07-26 10:58:33 +0800508
huangtianhuae4365742016-08-30 10:27:21 +0800509 parms = {'env_type': 'prod',
510 'zone': 'xianyang'}
511 self.update_stack(stack_identifier,
512 template=hot_template,
513 parameters=parms)
514
515 resources = self.client.resources.list(stack_identifier)
516 self.res_assert_for_prod(resources, False, shannxi_provice=True)
517 self.output_assert_for_prod(stack_identifier, False)
518
huangtianhua99a25de2016-07-26 10:58:33 +0800519 parms = {'env_type': 'test'}
520 self.update_stack(stack_identifier,
521 template=hot_template,
522 parameters=parms)
523
524 resources = self.client.resources.list(stack_identifier)
525 self.res_assert_for_test(resources)
huangtianhua27075a92016-07-26 14:32:40 +0800526 self.output_assert_for_test(stack_identifier)
huangtianhuae4365742016-08-30 10:27:21 +0800527
528 parms = {'env_type': 'test',
529 'zone': 'xianyang'}
530 self.update_stack(stack_identifier,
531 template=hot_template,
532 parameters=parms)
533
534 resources = self.client.resources.list(stack_identifier)
535 self.res_assert_for_test(resources, fj_zone=False,
536 shannxi_provice=True)
537 self.output_assert_for_test(stack_identifier)