Merge "Fix SoftwareDeployments validation"
This commit is contained in:
commit
991c890650
@ -195,7 +195,10 @@ class ResourceGroup(stack_resource.StackResource):
|
||||
# Only validate the resource definition (which may be a
|
||||
# nested template) if count is non-zero, to enable folks
|
||||
# to disable features via a zero count if they wish
|
||||
if self.properties[self.COUNT]:
|
||||
# Use self._resource_names() to determine if any resources will
|
||||
# be created, not the COUNT property, because this doesn't exist
|
||||
# in the SoftwareDeployments subclass properties schema.
|
||||
if self._resource_names():
|
||||
res_inst.validate()
|
||||
|
||||
def _name_blacklist(self):
|
||||
|
@ -943,3 +943,9 @@ class SoftwareDeploymentsTest(common.HeatTestCase):
|
||||
mock.call('deploy_stderr'),
|
||||
mock.call('deploy_status_code'),
|
||||
])
|
||||
|
||||
def test_validate(self):
|
||||
stack = utils.parse_stack(self.template)
|
||||
snip = stack.t.resource_definitions(stack)['deploy_mysql']
|
||||
resg = sd.SoftwareDeployments('test', snip, stack)
|
||||
self.assertIsNone(resg.validate())
|
||||
|
Loading…
Reference in New Issue
Block a user