heat engine : error on resource update with invalid properties

If properties validation fails, raise an error so the resource is
marked as UPDATE_FAILED, we don't want to go ahead and try running
handle_update anyway

Change-Id: I5f748b9de6a2b02d26421a5b6e0b1b5f0db25d0c
Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
Steven Hardy 2013-01-25 14:37:26 +00:00
parent 2ed70d7d50
commit 6836c8f808

View File

@ -255,7 +255,7 @@ class Resource(object):
self.t = self.stack.resolve_static_data(json_snippet)
err = self.properties.validate()
if err:
return err
raise ValueError(err)
if callable(getattr(self, 'handle_update', None)):
result = self.handle_update()
except Exception as ex: