Increase default for 'max_nested_stack_depth' to 5

Increase current value due to several requests from users who
use provider resources or services like Sahara, who wants to use
nested resource groups.

Closes-Bug: #1331227

Change-Id: Iaa2c8d4bf125a9b1059ccfb2b31db8a7b18331ce
This commit is contained in:
Sergey Kraynev 2015-02-26 09:59:48 -05:00
parent 5ded08aa19
commit 39b5db82c4
2 changed files with 18 additions and 27 deletions

View File

@ -77,7 +77,7 @@ service_opts = [
default=524288,
help=_('Maximum raw byte size of any template.')),
cfg.IntOpt('max_nested_stack_depth',
default=3,
default=5,
help=_('Maximum depth allowed when using nested stacks.')),
cfg.IntOpt('num_engine_workers',
default=1,

View File

@ -121,41 +121,26 @@ Resources:
self.validate_stack(root_template)
self.m.VerifyAll()
def test_nested_stack_four_deep(self):
root_template = '''
def test_nested_stack_six_deep(self):
template = '''
HeatTemplateFormatVersion: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth1.template'
TemplateURL: 'https://server.test/depth%i.template'
'''
depth1_template = '''
HeatTemplateFormatVersion: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth2.template'
'''
depth2_template = '''
HeatTemplateFormatVersion: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth3.template'
'''
depth3_template = '''
HeatTemplateFormatVersion: 2012-12-12
Resources:
Nested:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: 'https://server.test/depth4.template'
root_template = template % 1
depth1_template = template % 2
depth2_template = template % 3
depth3_template = template % 4
depth4_template = template % 5
depth5_template = template % 6
depth5_template += '''
Parameters:
KeyName: foo
'''
urlfetch.get(
'https://server.test/depth1.template').AndReturn(
depth1_template)
@ -167,6 +152,12 @@ Resources:
depth3_template)
urlfetch.get(
'https://server.test/depth4.template').AndReturn(
depth4_template)
urlfetch.get(
'https://server.test/depth5.template').AndReturn(
depth5_template)
urlfetch.get(
'https://server.test/depth6.template').AndReturn(
self.nested_template)
self.m.ReplayAll()
t = template_format.parse(root_template)