Enable E122, E126 and E128 style checks
Improper indent of continued lines. Change-Id: Iea32ef7dddb5f75681aa4992d8270391e038a1c8
This commit is contained in:
parent
46e5897c3e
commit
9b70d30386
@ -212,8 +212,8 @@ class CloudLoadBalancer(resource.Resource):
|
|||||||
properties.Schema.LIST,
|
properties.Schema.LIST,
|
||||||
required=True,
|
required=True,
|
||||||
description=(_("IP addresses for the load balancer "
|
description=(_("IP addresses for the load balancer "
|
||||||
"node. Must have at least one "
|
"node. Must have at least one "
|
||||||
"address.")),
|
"address.")),
|
||||||
schema=properties.Schema(
|
schema=properties.Schema(
|
||||||
properties.Schema.STRING
|
properties.Schema.STRING
|
||||||
)
|
)
|
||||||
|
@ -105,10 +105,10 @@ class KeystoneClientV3(object):
|
|||||||
if self.stack_domain:
|
if self.stack_domain:
|
||||||
if not (self.domain_admin_user and self.domain_admin_password):
|
if not (self.domain_admin_user and self.domain_admin_password):
|
||||||
raise exception.Error(_('heat.conf misconfigured, cannot '
|
raise exception.Error(_('heat.conf misconfigured, cannot '
|
||||||
'specify "stack_user_domain_id" or '
|
'specify "stack_user_domain_id" or '
|
||||||
'"stack_user_domain_name" without '
|
'"stack_user_domain_name" without '
|
||||||
'"stack_domain_admin" and '
|
'"stack_domain_admin" and '
|
||||||
'"stack_domain_admin_password"'))
|
'"stack_domain_admin_password"'))
|
||||||
else:
|
else:
|
||||||
LOG.warn(_LW('stack_user_domain_id or stack_user_domain_name not '
|
LOG.warn(_LW('stack_user_domain_id or stack_user_domain_name not '
|
||||||
'set in heat.conf falling back to using default'))
|
'set in heat.conf falling back to using default'))
|
||||||
|
@ -87,7 +87,7 @@ class TemplateResource(stack_resource.StackResource):
|
|||||||
return ((properties.Properties.schema_from_params(
|
return ((properties.Properties.schema_from_params(
|
||||||
tmpl.param_schemata(param_defaults))),
|
tmpl.param_schemata(param_defaults))),
|
||||||
(attributes.Attributes.schema_from_outputs(
|
(attributes.Attributes.schema_from_outputs(
|
||||||
tmpl[tmpl.OUTPUTS])))
|
tmpl[tmpl.OUTPUTS])))
|
||||||
|
|
||||||
def _generate_schema(self, definition):
|
def _generate_schema(self, definition):
|
||||||
self._parsed_nested = None
|
self._parsed_nested = None
|
||||||
|
@ -264,20 +264,20 @@ class CfnStackControllerTest(common.HeatTestCase):
|
|||||||
u'DBRootPassword': u'admin',
|
u'DBRootPassword': u'admin',
|
||||||
u'DBPassword': u'admin',
|
u'DBPassword': u'admin',
|
||||||
u'DBName': u'wordpress'},
|
u'DBName': u'wordpress'},
|
||||||
u'outputs':
|
u'outputs':
|
||||||
[{u'output_key': u'WebsiteURL',
|
[{u'output_key': u'WebsiteURL',
|
||||||
u'description': u'URL for Wordpress wiki',
|
u'description': u'URL for Wordpress wiki',
|
||||||
u'output_value': u'http://10.0.0.8/wordpress'}],
|
u'output_value': u'http://10.0.0.8/wordpress'}],
|
||||||
u'stack_status_reason': u'Stack successfully created',
|
u'stack_status_reason': u'Stack successfully created',
|
||||||
u'creation_time': u'2012-07-09T09:12:45Z',
|
u'creation_time': u'2012-07-09T09:12:45Z',
|
||||||
u'stack_name': u'wordpress',
|
u'stack_name': u'wordpress',
|
||||||
u'notification_topics': [],
|
u'notification_topics': [],
|
||||||
u'stack_action': u'CREATE',
|
u'stack_action': u'CREATE',
|
||||||
u'stack_status': u'COMPLETE',
|
u'stack_status': u'COMPLETE',
|
||||||
u'description': u'blah',
|
u'description': u'blah',
|
||||||
u'disable_rollback': 'true',
|
u'disable_rollback': 'true',
|
||||||
u'timeout_mins':60,
|
u'timeout_mins':60,
|
||||||
u'capabilities':[]}]
|
u'capabilities':[]}]
|
||||||
|
|
||||||
self.m.StubOutWithMock(rpc_client.EngineClient, 'call')
|
self.m.StubOutWithMock(rpc_client.EngineClient, 'call')
|
||||||
rpc_client.EngineClient.call(
|
rpc_client.EngineClient.call(
|
||||||
|
@ -839,7 +839,7 @@ class StackControllerTest(ControllerTest, common.HeatTestCase):
|
|||||||
req.context,
|
req.context,
|
||||||
('create_stack',
|
('create_stack',
|
||||||
{'stack_name': identity.stack_name,
|
{'stack_name': identity.stack_name,
|
||||||
'template': template,
|
'template': template,
|
||||||
'params': {'parameters': parameters,
|
'params': {'parameters': parameters,
|
||||||
'parameter_defaults': {},
|
'parameter_defaults': {},
|
||||||
'resource_registry': {}},
|
'resource_registry': {}},
|
||||||
|
@ -667,9 +667,9 @@ class StackServiceCreateUpdateDeleteTest(common.HeatTestCase):
|
|||||||
generic_rsrc.GenericResource)
|
generic_rsrc.GenericResource)
|
||||||
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'A': {'Type': 'GenericResourceType'},
|
'A': {'Type': 'GenericResourceType'},
|
||||||
'B': {'Type': 'GenericResourceType'},
|
'B': {'Type': 'GenericResourceType'},
|
||||||
'C': {'Type': 'GenericResourceType'}}}
|
'C': {'Type': 'GenericResourceType'}}}
|
||||||
|
|
||||||
template = templatem.Template(tpl)
|
template = templatem.Template(tpl)
|
||||||
stack = parser.Stack(self.ctx, stack_name, template,
|
stack = parser.Stack(self.ctx, stack_name, template,
|
||||||
@ -708,9 +708,9 @@ class StackServiceCreateUpdateDeleteTest(common.HeatTestCase):
|
|||||||
generic_rsrc.GenericResource)
|
generic_rsrc.GenericResource)
|
||||||
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'A': {'Type': 'GenericResourceType'},
|
'A': {'Type': 'GenericResourceType'},
|
||||||
'B': {'Type': 'GenericResourceType'},
|
'B': {'Type': 'GenericResourceType'},
|
||||||
'C': {'Type': 'GenericResourceType'}}}
|
'C': {'Type': 'GenericResourceType'}}}
|
||||||
cfg.CONF.set_override('max_resources_per_stack', 2)
|
cfg.CONF.set_override('max_resources_per_stack', 2)
|
||||||
ex = self.assertRaises(dispatcher.ExpectedException,
|
ex = self.assertRaises(dispatcher.ExpectedException,
|
||||||
self.man.create_stack, self.ctx, stack_name,
|
self.man.create_stack, self.ctx, stack_name,
|
||||||
@ -1108,9 +1108,9 @@ class StackServiceCreateUpdateDeleteTest(common.HeatTestCase):
|
|||||||
generic_rsrc.GenericResource)
|
generic_rsrc.GenericResource)
|
||||||
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'A': {'Type': 'GenericResourceType'},
|
'A': {'Type': 'GenericResourceType'},
|
||||||
'B': {'Type': 'GenericResourceType'},
|
'B': {'Type': 'GenericResourceType'},
|
||||||
'C': {'Type': 'GenericResourceType'}}}
|
'C': {'Type': 'GenericResourceType'}}}
|
||||||
|
|
||||||
template = templatem.Template(tpl)
|
template = templatem.Template(tpl)
|
||||||
|
|
||||||
@ -1209,9 +1209,9 @@ class StackServiceCreateUpdateDeleteTest(common.HeatTestCase):
|
|||||||
generic_rsrc.GenericResource)
|
generic_rsrc.GenericResource)
|
||||||
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'A': {'Type': 'GenericResourceType'},
|
'A': {'Type': 'GenericResourceType'},
|
||||||
'B': {'Type': 'GenericResourceType'},
|
'B': {'Type': 'GenericResourceType'},
|
||||||
'C': {'Type': 'GenericResourceType'}}}
|
'C': {'Type': 'GenericResourceType'}}}
|
||||||
|
|
||||||
template = templatem.Template(tpl)
|
template = templatem.Template(tpl)
|
||||||
old_stack = parser.Stack(self.ctx, stack_name, template)
|
old_stack = parser.Stack(self.ctx, stack_name, template)
|
||||||
|
@ -317,7 +317,7 @@ class IdentifierTest(testtools.TestCase):
|
|||||||
|
|
||||||
def test_arn_url_decode_escape_round_trip(self):
|
def test_arn_url_decode_escape_round_trip(self):
|
||||||
enc_arn = "".join(['arn%3Aopenstack%3Aheat%3A%3A%253A%252F%3A',
|
enc_arn = "".join(['arn%3Aopenstack%3Aheat%3A%3A%253A%252F%3A',
|
||||||
'stacks%2F%253A%2525%2F%253A%252F%2F%253A'])
|
'stacks%2F%253A%2525%2F%253A%252F%2F%253A'])
|
||||||
url = self.url_prefix + enc_arn
|
url = self.url_prefix + enc_arn
|
||||||
hi = identifier.HeatIdentifier.from_arn_url(url)
|
hi = identifier.HeatIdentifier.from_arn_url(url)
|
||||||
hi2 = identifier.HeatIdentifier.from_arn_url(self.url_prefix +
|
hi2 = identifier.HeatIdentifier.from_arn_url(self.url_prefix +
|
||||||
|
@ -191,58 +191,60 @@ class ScaleNotificationTest(common.HeatTestCase):
|
|||||||
with_error=None):
|
with_error=None):
|
||||||
|
|
||||||
stack_arn = self.stack.identifier().arn()
|
stack_arn = self.stack.identifier().arn()
|
||||||
expected = [mock.call(self.ctx,
|
expected = [mock.call(
|
||||||
'orchestration.autoscaling.start',
|
self.ctx,
|
||||||
{'state_reason':
|
'orchestration.autoscaling.start',
|
||||||
'Stack CREATE completed successfully',
|
{'state_reason': 'Stack CREATE completed successfully',
|
||||||
'user_id': 'test_username',
|
'user_id': 'test_username',
|
||||||
'stack_identity': stack_arn,
|
'stack_identity': stack_arn,
|
||||||
'tenant_id': 'test_tenant',
|
'tenant_id': 'test_tenant',
|
||||||
'create_at': self.create_at,
|
'create_at': self.create_at,
|
||||||
'adjustment_type': 'ChangeInCapacity',
|
'adjustment_type': 'ChangeInCapacity',
|
||||||
'groupname': group.FnGetRefId(),
|
'groupname': group.FnGetRefId(),
|
||||||
'capacity': start_capacity,
|
'capacity': start_capacity,
|
||||||
'adjustment': adjust,
|
'adjustment': adjust,
|
||||||
'stack_name': self.stack_name,
|
'stack_name': self.stack_name,
|
||||||
'message': 'Start resizing the group %s' %
|
'message': 'Start resizing the group %s' %
|
||||||
group.FnGetRefId(),
|
group.FnGetRefId(),
|
||||||
'state': 'CREATE_COMPLETE'})
|
'state': 'CREATE_COMPLETE'})
|
||||||
]
|
]
|
||||||
if with_error:
|
if with_error:
|
||||||
expected += [mock.call(self.ctx,
|
expected += [mock.call(
|
||||||
'orchestration.autoscaling.error',
|
self.ctx,
|
||||||
{'state_reason':
|
'orchestration.autoscaling.error',
|
||||||
'Stack CREATE completed successfully',
|
{'state_reason':
|
||||||
'user_id': 'test_username',
|
'Stack CREATE completed successfully',
|
||||||
'stack_identity': stack_arn,
|
'user_id': 'test_username',
|
||||||
'tenant_id': 'test_tenant',
|
'stack_identity': stack_arn,
|
||||||
'create_at': self.create_at,
|
'tenant_id': 'test_tenant',
|
||||||
'adjustment_type': 'ChangeInCapacity',
|
'create_at': self.create_at,
|
||||||
'groupname': group.FnGetRefId(),
|
'adjustment_type': 'ChangeInCapacity',
|
||||||
'capacity': start_capacity,
|
'groupname': group.FnGetRefId(),
|
||||||
'adjustment': adjust,
|
'capacity': start_capacity,
|
||||||
'stack_name': self.stack_name,
|
'adjustment': adjust,
|
||||||
'message': with_error,
|
'stack_name': self.stack_name,
|
||||||
'state': 'CREATE_COMPLETE'})
|
'message': with_error,
|
||||||
]
|
'state': 'CREATE_COMPLETE'})
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
expected += [mock.call(self.ctx,
|
expected += [mock.call(
|
||||||
'orchestration.autoscaling.end',
|
self.ctx,
|
||||||
{'state_reason':
|
'orchestration.autoscaling.end',
|
||||||
'Stack CREATE completed successfully',
|
{'state_reason':
|
||||||
'user_id': 'test_username',
|
'Stack CREATE completed successfully',
|
||||||
'stack_identity': stack_arn,
|
'user_id': 'test_username',
|
||||||
'tenant_id': 'test_tenant',
|
'stack_identity': stack_arn,
|
||||||
'create_at': self.create_at,
|
'tenant_id': 'test_tenant',
|
||||||
'adjustment_type': 'ChangeInCapacity',
|
'create_at': self.create_at,
|
||||||
'groupname': group.FnGetRefId(),
|
'adjustment_type': 'ChangeInCapacity',
|
||||||
'capacity': end_capacity,
|
'groupname': group.FnGetRefId(),
|
||||||
'adjustment': adjust,
|
'capacity': end_capacity,
|
||||||
'stack_name': self.stack_name,
|
'adjustment': adjust,
|
||||||
'message': 'End resizing the group %s' %
|
'stack_name': self.stack_name,
|
||||||
group.FnGetRefId(),
|
'message': 'End resizing the group %s' %
|
||||||
'state': 'CREATE_COMPLETE'})
|
group.FnGetRefId(),
|
||||||
]
|
'state': 'CREATE_COMPLETE'})
|
||||||
|
]
|
||||||
|
|
||||||
return expected
|
return expected
|
||||||
|
|
||||||
|
@ -1210,9 +1210,9 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_set_param_id_update(self):
|
def test_set_param_id_update(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Metadata': {'Bar': {'Ref': 'AWS::StackId'}},
|
'Metadata': {'Bar': {'Ref': 'AWS::StackId'}},
|
||||||
'Properties': {'Foo': 'abc'}}}}
|
'Properties': {'Foo': 'abc'}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_stack_arn_test',
|
self.stack = parser.Stack(self.ctx, 'update_stack_arn_test',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -1225,9 +1225,10 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Metadata': {'Bar': {'Ref': 'AWS::StackId'}},
|
'Metadata': {'Bar':
|
||||||
'Properties': {'Foo': 'xyz'}}}}
|
{'Ref': 'AWS::StackId'}},
|
||||||
|
'Properties': {'Foo': 'xyz'}}}}
|
||||||
|
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2))
|
template.Template(tmpl2))
|
||||||
@ -1327,13 +1328,12 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_access_policy_update(self):
|
def test_access_policy_update(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'R1': {'Type': 'GenericResourceType'},
|
'R1': {'Type': 'GenericResourceType'},
|
||||||
'Policy': {
|
'Policy': {
|
||||||
'Type': 'OS::Heat::AccessPolicy',
|
'Type': 'OS::Heat::AccessPolicy',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'AllowedResources': ['R1'],
|
'AllowedResources': ['R1']
|
||||||
},
|
}}}}
|
||||||
}}}
|
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_stack_access_policy_test',
|
self.stack = parser.Stack(self.ctx, 'update_stack_access_policy_test',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -1344,14 +1344,13 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'R1': {'Type': 'GenericResourceType'},
|
'R1': {'Type': 'GenericResourceType'},
|
||||||
'R2': {'Type': 'GenericResourceType'},
|
'R2': {'Type': 'GenericResourceType'},
|
||||||
'Policy': {
|
'Policy': {
|
||||||
'Type': 'OS::Heat::AccessPolicy',
|
'Type': 'OS::Heat::AccessPolicy',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'AllowedResources': ['R1', 'R2'],
|
'AllowedResources': ['R1', 'R2'],
|
||||||
},
|
}}}}
|
||||||
}}}
|
|
||||||
|
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2))
|
template.Template(tmpl2))
|
||||||
@ -2074,8 +2073,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'GenericResourceType'}}}
|
'BResource': {'Type': 'GenericResourceType'}}}
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2))
|
template.Template(tmpl2))
|
||||||
self.stack.update(updated_stack)
|
self.stack.update(updated_stack)
|
||||||
@ -2086,8 +2085,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_update_remove(self):
|
def test_update_remove(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'GenericResourceType'}}}
|
'BResource': {'Type': 'GenericResourceType'}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -2689,8 +2688,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'GenericResourceType'}}}
|
'BResource': {'Type': 'GenericResourceType'}}}
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2))
|
template.Template(tmpl2))
|
||||||
|
|
||||||
@ -2724,8 +2723,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'GenericResourceType'}}}
|
'BResource': {'Type': 'GenericResourceType'}}}
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2))
|
template.Template(tmpl2))
|
||||||
|
|
||||||
@ -2758,8 +2757,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'GenericResourceType'}}}
|
'BResource': {'Type': 'GenericResourceType'}}}
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2),
|
template.Template(tmpl2),
|
||||||
disable_rollback=False)
|
disable_rollback=False)
|
||||||
@ -2909,8 +2908,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'GenericResourceType'}}}
|
'BResource': {'Type': 'GenericResourceType'}}}
|
||||||
|
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(tmpl2),
|
template.Template(tmpl2),
|
||||||
@ -2931,8 +2930,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_update_rollback_remove(self):
|
def test_update_rollback_remove(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'GenericResourceType'},
|
'AResource': {'Type': 'GenericResourceType'},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType'}}}
|
'BResource': {'Type': 'ResourceWithPropsType'}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl),
|
template.Template(tmpl),
|
||||||
@ -2970,8 +2969,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_update_rollback_replace(self):
|
def test_update_rollback_replace(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'foo'}}}}
|
'Properties': {'Foo': 'foo'}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl),
|
template.Template(tmpl),
|
||||||
@ -3011,18 +3010,18 @@ class StackTest(common.HeatTestCase):
|
|||||||
'''
|
'''
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'smelly'}},
|
'Properties': {'Foo': 'smelly'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -3059,17 +3058,17 @@ class StackTest(common.HeatTestCase):
|
|||||||
'''
|
'''
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'CResource': {'Type': 'ResourceWithPropsType',
|
'CResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}}}}
|
'Properties': {'Foo': 'abc'}}}}
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'CResource': {'Type': 'ResourceWithPropsType',
|
'CResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'smelly'}},
|
'Properties': {'Foo': 'smelly'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -3108,18 +3107,18 @@ class StackTest(common.HeatTestCase):
|
|||||||
'''
|
'''
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'smelly'}},
|
'Properties': {'Foo': 'smelly'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl),
|
template.Template(tmpl),
|
||||||
@ -3172,18 +3171,18 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceTypeA',
|
'AResource': {'Type': 'ResourceTypeA',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceTypeA',
|
'AResource': {'Type': 'ResourceTypeA',
|
||||||
'Properties': {'Foo': 'smelly'}},
|
'Properties': {'Foo': 'smelly'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl),
|
template.Template(tmpl),
|
||||||
@ -3238,18 +3237,18 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceTypeA',
|
'AResource': {'Type': 'ResourceTypeA',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl2 = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceTypeA',
|
'AResource': {'Type': 'ResourceTypeA',
|
||||||
'Properties': {'Foo': 'smelly'}},
|
'Properties': {'Foo': 'smelly'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl),
|
template.Template(tmpl),
|
||||||
@ -3420,11 +3419,11 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceTypeA',
|
'AResource': {'Type': 'ResourceTypeA',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {
|
'Properties': {
|
||||||
'Foo': {'Ref': 'AResource'}}}}}
|
'Foo': {'Ref': 'AResource'}}}}}
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl),
|
template.Template(tmpl),
|
||||||
disable_rollback=True)
|
disable_rollback=True)
|
||||||
@ -3496,8 +3495,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_update_deletion_policy(self):
|
def test_update_deletion_policy(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'Bar'}}}}
|
'Properties': {'Foo': 'Bar'}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -3510,9 +3509,9 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
new_tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
new_tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'DeletionPolicy': 'Retain',
|
'DeletionPolicy': 'Retain',
|
||||||
'Properties': {'Foo': 'Bar'}}}}
|
'Properties': {'Foo': 'Bar'}}}}
|
||||||
|
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(new_tmpl))
|
template.Template(new_tmpl))
|
||||||
@ -3532,8 +3531,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithNoUpdate',
|
'AResource': {'Type': 'ResourceWithNoUpdate',
|
||||||
'Properties': {'Foo': 'Bar'}}}}
|
'Properties': {'Foo': 'Bar'}}}}
|
||||||
|
|
||||||
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
self.stack = parser.Stack(self.ctx, 'update_test_stack',
|
||||||
template.Template(tmpl))
|
template.Template(tmpl))
|
||||||
@ -3546,9 +3545,9 @@ class StackTest(common.HeatTestCase):
|
|||||||
|
|
||||||
new_tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
new_tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithNoUpdate',
|
'AResource': {'Type': 'ResourceWithNoUpdate',
|
||||||
'DeletionPolicy': 'Retain',
|
'DeletionPolicy': 'Retain',
|
||||||
'Properties': {'Foo': 'Bar'}}}}
|
'Properties': {'Foo': 'Bar'}}}}
|
||||||
|
|
||||||
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
updated_stack = parser.Stack(self.ctx, 'updated_stack',
|
||||||
template.Template(new_tmpl))
|
template.Template(new_tmpl))
|
||||||
@ -4119,10 +4118,10 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_correct_outputs(self):
|
def test_correct_outputs(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}},
|
'Properties': {'Foo': 'abc'}},
|
||||||
'BResource': {'Type': 'ResourceWithPropsType',
|
'BResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'def'}}},
|
'Properties': {'Foo': 'def'}}},
|
||||||
'Outputs': {
|
'Outputs': {
|
||||||
'Resource_attr': {
|
'Resource_attr': {
|
||||||
'Value': {
|
'Value': {
|
||||||
@ -4149,8 +4148,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_incorrect_outputs(self):
|
def test_incorrect_outputs(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}}},
|
'Properties': {'Foo': 'abc'}}},
|
||||||
'Outputs': {
|
'Outputs': {
|
||||||
'Resource_attr': {
|
'Resource_attr': {
|
||||||
'Value': {
|
'Value': {
|
||||||
@ -4251,8 +4250,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_incorrect_outputs_cfn_get_attr(self):
|
def test_incorrect_outputs_cfn_get_attr(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'AResource': {'Type': 'ResourceWithPropsType',
|
'AResource': {'Type': 'ResourceWithPropsType',
|
||||||
'Properties': {'Foo': 'abc'}}},
|
'Properties': {'Foo': 'abc'}}},
|
||||||
'Outputs': {
|
'Outputs': {
|
||||||
'Resource_attr': {
|
'Resource_attr': {
|
||||||
'Value': {
|
'Value': {
|
||||||
@ -4369,8 +4368,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_incorrect_outputs_hot_get_attr(self):
|
def test_incorrect_outputs_hot_get_attr(self):
|
||||||
tmpl = {'heat_template_version': '2013-05-23',
|
tmpl = {'heat_template_version': '2013-05-23',
|
||||||
'resources': {
|
'resources': {
|
||||||
'AResource': {'type': 'ResourceWithPropsType',
|
'AResource': {'type': 'ResourceWithPropsType',
|
||||||
'properties': {'Foo': 'abc'}}},
|
'properties': {'Foo': 'abc'}}},
|
||||||
'outputs': {
|
'outputs': {
|
||||||
'resource_attr': {
|
'resource_attr': {
|
||||||
'value': {
|
'value': {
|
||||||
@ -4389,8 +4388,8 @@ class StackTest(common.HeatTestCase):
|
|||||||
def test_restore(self):
|
def test_restore(self):
|
||||||
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
tmpl = {'HeatTemplateFormatVersion': '2012-12-12',
|
||||||
'Resources': {
|
'Resources': {
|
||||||
'A': {'Type': 'GenericResourceType'},
|
'A': {'Type': 'GenericResourceType'},
|
||||||
'B': {'Type': 'GenericResourceType'}}}
|
'B': {'Type': 'GenericResourceType'}}}
|
||||||
self.stack = parser.Stack(self.ctx, 'stack_details_test',
|
self.stack = parser.Stack(self.ctx, 'stack_details_test',
|
||||||
parser.Template(tmpl))
|
parser.Template(tmpl))
|
||||||
self.stack.store()
|
self.stack.store()
|
||||||
|
@ -487,7 +487,7 @@ class ResourceGroupTest(common.HeatTestCase):
|
|||||||
reduce_snip = copy.deepcopy(resg.t)
|
reduce_snip = copy.deepcopy(resg.t)
|
||||||
reduce_snip['Properties']['count'] = 2
|
reduce_snip['Properties']['count'] = 2
|
||||||
reduce_snip['Properties']['removal_policies'] = [{'resource_list':
|
reduce_snip['Properties']['removal_policies'] = [{'resource_list':
|
||||||
['1', '2', '3']}]
|
['1', '2', '3']}]
|
||||||
scheduler.TaskRunner(resg.update, reduce_snip)()
|
scheduler.TaskRunner(resg.update, reduce_snip)()
|
||||||
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.state)
|
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.state)
|
||||||
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.nested().state)
|
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.nested().state)
|
||||||
@ -588,7 +588,7 @@ class ResourceGroupTest(common.HeatTestCase):
|
|||||||
reduce_snip = copy.deepcopy(resg.t)
|
reduce_snip = copy.deepcopy(resg.t)
|
||||||
reduce_snip['Properties']['count'] = 2
|
reduce_snip['Properties']['count'] = 2
|
||||||
reduce_snip['Properties']['removal_policies'] = [{'resource_list':
|
reduce_snip['Properties']['removal_policies'] = [{'resource_list':
|
||||||
['1', '2', '3']}]
|
['1', '2', '3']}]
|
||||||
scheduler.TaskRunner(resg.update, reduce_snip)()
|
scheduler.TaskRunner(resg.update, reduce_snip)()
|
||||||
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.state)
|
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.state)
|
||||||
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.nested().state)
|
self.assertEqual((resg.UPDATE, resg.COMPLETE), resg.nested().state)
|
||||||
|
@ -1841,8 +1841,7 @@ class ServersTest(common.HeatTestCase):
|
|||||||
self.assertEqual([{'net-id': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}],
|
self.assertEqual([{'net-id': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}],
|
||||||
server._build_nics(
|
server._build_nics(
|
||||||
[{'network':
|
[{'network':
|
||||||
'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}]
|
'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}]))
|
||||||
))
|
|
||||||
|
|
||||||
self.assertEqual([{'net-id': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}],
|
self.assertEqual([{'net-id': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'}],
|
||||||
server._build_nics([{'network': 'public'}]))
|
server._build_nics([{'network': 'public'}]))
|
||||||
|
@ -170,18 +170,18 @@ class SoftwareComponentValidationTest(common.HeatTestCase):
|
|||||||
err_msg='Property configs not assigned')
|
err_msg='Property configs not assigned')
|
||||||
),
|
),
|
||||||
# do not test until bug #1350840
|
# do not test until bug #1350840
|
||||||
# (
|
#(
|
||||||
# 'empty_configs',
|
# 'empty_configs',
|
||||||
# dict(snippet='''
|
# dict(snippet='''
|
||||||
# component:
|
# component:
|
||||||
# type: OS::Heat::SoftwareComponent
|
# type: OS::Heat::SoftwareComponent
|
||||||
# properties:
|
# properties:
|
||||||
# configs:
|
# configs:
|
||||||
# ''',
|
# ''',
|
||||||
# err=exception.StackValidationFailed,
|
# err=exception.StackValidationFailed,
|
||||||
# err_msg='configs length (0) is out of range '
|
# err_msg='configs length (0) is out of range '
|
||||||
# '(min: 1, max: None)')
|
# '(min: 1, max: None)')
|
||||||
# ),
|
#),
|
||||||
(
|
(
|
||||||
'invalid_configs',
|
'invalid_configs',
|
||||||
dict(snippet='''
|
dict(snippet='''
|
||||||
|
@ -203,8 +203,8 @@ class StructuredDeploymentWithStrictInputTest(common.HeatTestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(StructuredDeploymentWithStrictInputTest, self).setUp()
|
super(StructuredDeploymentWithStrictInputTest, self).setUp()
|
||||||
self.source = {'config':
|
self.source = {'config':
|
||||||
{'foo': [{"get_input": "bar"},
|
{'foo': [{"get_input": "bar"},
|
||||||
{"get_input": "barz"}]}}
|
{"get_input": "barz"}]}}
|
||||||
self.inputs = [{'name': 'bar', 'value': 'baz'},
|
self.inputs = [{'name': 'bar', 'value': 'baz'},
|
||||||
{'name': 'barz', 'value': 'baz2'}]
|
{'name': 'barz', 'value': 'baz2'}]
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ class FakeHTTPClient(base_client.HTTPClient):
|
|||||||
"fa:16:3e:8c:33:bb"}],
|
"fa:16:3e:8c:33:bb"}],
|
||||||
"private": [{"version": 4,
|
"private": [{"version": 4,
|
||||||
"addr": "10.13.12.13",
|
"addr": "10.13.12.13",
|
||||||
"OS-EXT-IPS-MAC:mac_addr":
|
"OS-EXT-IPS-MAC:mac_addr":
|
||||||
"fa:16:3e:8c:44:cc"}]},
|
"fa:16:3e:8c:44:cc"}]},
|
||||||
"metadata": {}},
|
"metadata": {}},
|
||||||
{"id": "9101",
|
{"id": "9101",
|
||||||
"name": "hard-reboot",
|
"name": "hard-reboot",
|
||||||
|
5
tox.ini
5
tox.ini
@ -53,9 +53,6 @@ commands =
|
|||||||
bash tools/config/generate_sample.sh -b . -p heat -o etc/heat
|
bash tools/config/generate_sample.sh -b . -p heat -o etc/heat
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E122 continuation line missing indentation or outdented
|
|
||||||
# E126 continuation line over-indented for hanging indent
|
|
||||||
# E128 continuation line under-indented for visual indent
|
|
||||||
# E251 unexpected spaces around keyword / parameter equals
|
# E251 unexpected spaces around keyword / parameter equals
|
||||||
# E265 block comment should start with '# '
|
# E265 block comment should start with '# '
|
||||||
# F402 import shadowed by loop variable
|
# F402 import shadowed by loop variable
|
||||||
@ -70,7 +67,7 @@ commands =
|
|||||||
# H405 multi line docstring summary not separated with an empty line
|
# H405 multi line docstring summary not separated with an empty line
|
||||||
# H803 no full stop at the end of the commit message
|
# H803 no full stop at the end of the commit message
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
# H904 Wrap long lines in parentheses instead of a backslash
|
||||||
ignore = E122,E126,E128,E251,E265,F402,F812,H101,H202,H233,H305,H307,H402,H404,H405,H803,H904
|
ignore = E251,E265,F402,F812,H101,H202,H233,H305,H307,H402,H404,H405,H803,H904
|
||||||
show-source = true
|
show-source = true
|
||||||
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
||||||
max-complexity=20
|
max-complexity=20
|
||||||
|
Loading…
Reference in New Issue
Block a user