Replace voluptuous with JSONSchema in BaseAction

Now that we replaced voluptuous with JSONSchema in all actions,
this patch replaces voluptuous with JSONSchema in BaseAction
and removes validate_parameters method in each action.

Partially Implements: blueprint jsonschema-validation

Change-Id: I07c907ddfa4a568d7fff42776df02218330d56a0
This commit is contained in:
Hidekazu Nakamura
2017-07-25 12:02:33 +09:00
parent 3cd847e2ab
commit b33337b7bd
7 changed files with 6 additions and 51 deletions

View File

@@ -17,7 +17,6 @@
# limitations under the License.
#
import jsonschema
import time
from oslo_log import log
@@ -54,13 +53,6 @@ class Sleep(base.BaseAction):
'additionalProperties': False,
}
def validate_parameters(self):
try:
jsonschema.validate(self.input_parameters, self.schema)
return True
except jsonschema.ValidationError as e:
raise e
@property
def duration(self):
return int(self.input_parameters.get(self.DURATION))