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:
@@ -18,7 +18,6 @@
|
||||
#
|
||||
|
||||
|
||||
import jsonschema
|
||||
from oslo_log import log
|
||||
from watcher._i18n import _
|
||||
from watcher.applier.actions import base
|
||||
@@ -91,13 +90,6 @@ class Migrate(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 instance_uuid(self):
|
||||
return self.resource_id
|
||||
|
||||
Reference in New Issue
Block a user