diff --git a/watcher/applier/actions/base.py b/watcher/applier/actions/base.py index ef1a5c094..6252c1ebc 100644 --- a/watcher/applier/actions/base.py +++ b/watcher/applier/actions/base.py @@ -131,11 +131,8 @@ class BaseAction(loadable.Loadable): raise NotImplementedError() def validate_parameters(self): - try: - jsonschema.validate(self.input_parameters, self.schema) - return True - except jsonschema.ValidationError as e: - raise e + jsonschema.validate(self.input_parameters, self.schema) + return True @abc.abstractmethod def get_description(self): diff --git a/watcher/applier/actions/volume_migration.py b/watcher/applier/actions/volume_migration.py index 6752e7e3c..1319f7f5e 100644 --- a/watcher/applier/actions/volume_migration.py +++ b/watcher/applier/actions/volume_migration.py @@ -109,11 +109,8 @@ class VolumeMigrate(base.BaseAction): } def validate_parameters(self): - try: - jsonschema.validate(self.input_parameters, self.schema) - return True - except jsonschema.ValidationError as e: - raise e + jsonschema.validate(self.input_parameters, self.schema) + return True @property def volume_id(self): diff --git a/watcher/decision_engine/goal/efficacy/indicators.py b/watcher/decision_engine/goal/efficacy/indicators.py index 713291cfa..a5870a825 100644 --- a/watcher/decision_engine/goal/efficacy/indicators.py +++ b/watcher/decision_engine/goal/efficacy/indicators.py @@ -59,7 +59,7 @@ class IndicatorSpecification(object): jsonschema.validate(value, cls.schema) except (SchemaError, ValidationError) as exc: LOG.exception(exc) - raise exc + raise except Exception as exc: LOG.exception(exc) raise exception.InvalidIndicatorValue(