Updated openstack/openstack
Project: openstack/heat  b160972b08ba0c1c6aa90459c7c0da7da8452856

Only do property validation in validate()

This patch changes resource property validation to only validate
properties in the Properties.validate() method.

So far, validation was done for each access to a property's value
in the __getitem__ method of the Properties class. This causes a
lot of un-necessary revalidation and especially with custom
constraints for flavors, images etc. this can become very expensive.

Doing validation in the validate() method should be sufficient since
this invoked as part of the pre-processing of resource actions that
receive new or updated properties (CREATE, UPDATE).

As part of the change in properties.py the validate_data method of
Property was also renamed to get_value with an optional validate
flag, since to the most part this method is really used to get a
sanitized representation of a property's value with only basic
data type checking.

Partial-Bug: #1324102

Change-Id: Ibe0aefbe8fa554c0cf227f16f971baedaa52cd8d