Add Voluptuous to validate the action parameters

We want a simplest way to validate the input parameters of an
Action through a schema.

APIImpact
DocImpact
Partially implements: blueprint watcher-add-actions-via-conf

Change-Id: I139775f467fe7778c7354b0cfacf796fc27ffcb2
This commit is contained in:
Jean-Emile DARTOIS
2016-01-26 15:31:18 +01:00
committed by Vincent Françoise
parent 33ee575936
commit e3198d25a5
32 changed files with 771 additions and 503 deletions

View File

@@ -129,13 +129,10 @@ class Action(base.APIBase):
alarm = types.uuid
"""An alarm UUID related to this action"""
applies_to = wtypes.text
"""Applies to"""
action_type = wtypes.text
"""Action type"""
input_parameters = wtypes.DictType(wtypes.text, wtypes.text)
input_parameters = types.jsontype
"""One or more key/value pairs """
next_uuid = wsme.wsproperty(types.uuid, _get_next_uuid,