diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-07-22 14:02:15 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-07-22 14:02:15 +0000 |
commit | e2b2b7adffd554a88bbb780f1fae8168775fd9ee (patch) | |
tree | b8bf7a733b2c57dd9e7a9c33cd9a1ccf043f3aa1 /heat/engine/hot | |
parent | 37b18ed261d23ed3d0597d71f930ed67447e4ac5 (diff) | |
parent | 4503154c1241b73f8efd483b41c111fefe3aaa6e (diff) | |
download | heat-e2b2b7adffd554a88bbb780f1fae8168775fd9ee.tar.gz |
Merge "Fix serialization of InvalidSchemaError"
Diffstat (limited to 'heat/engine/hot')
-rw-r--r-- | heat/engine/hot/parameters.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/heat/engine/hot/parameters.py b/heat/engine/hot/parameters.py index 35dfd6ffa..e3b27e93c 100644 --- a/heat/engine/hot/parameters.py +++ b/heat/engine/hot/parameters.py @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. +from heat.common import exception from heat.engine import constraints as constr from heat.engine import parameters @@ -63,9 +64,9 @@ class HOTParamSchema(parameters.Schema): return if not isinstance(constraints, list): - raise constr.InvalidSchemaError( - _("Invalid parameter constraints for parameter %s, " - "expected a list") % param_name) + raise exception.InvalidSchemaError( + message=_("Invalid parameter constraints for parameter " + "%s, expected a list") % param_name) valid_keys = (DESCRIPTION, LENGTH, RANGE, ALLOWED_VALUES, ALLOWED_PATTERN, CUSTOM_CONSTRAINT) @@ -96,8 +97,8 @@ class HOTParamSchema(parameters.Schema): cdef = constraint.get(CUSTOM_CONSTRAINT) yield constr.CustomConstraint(cdef, desc) else: - raise constr.InvalidSchemaError( - _("No constraint expressed")) + raise exception.InvalidSchemaError( + message=_("No constraint expressed")) # make update_allowed true by default on TemplateResources # as the template should deal with this. |