diff options
| author | jichenjc <jichenjc@cn.ibm.com> | 2017-07-27 23:44:39 +0800 |
|---|---|---|
| committer | jichenjc <jichenjc@cn.ibm.com> | 2017-08-18 02:00:33 +0800 |
| commit | ceabc1753cb6c44f70fd45682b494f86abef6e72 (patch) | |
| tree | 10849ad664cc05ae3ae45198f081f56afd61bf9a /nova/api/validation | |
| parent | 41ff707efd2aab3b2dfa4bf92f859ea7b952fa93 (diff) | |
| download | nova-ceabc1753cb6c44f70fd45682b494f86abef6e72.tar.gz | |
Move common definition into common layer
move common definition into common layer, as dependency patches
like I64ad387ec7b532e9dbc791f683a005587825ff61 plan to use the
definitions of the schema, this patch moves these definitions
as common ones
Change-Id: I17c2937e6b8ac3d09fabe273c50c81dd9b0babb6
Diffstat (limited to 'nova/api/validation')
| -rw-r--r-- | nova/api/validation/parameter_types.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/api/validation/parameter_types.py b/nova/api/validation/parameter_types.py index 15935cbd82..d87d2d8269 100644 --- a/nova/api/validation/parameter_types.py +++ b/nova/api/validation/parameter_types.py @@ -42,6 +42,15 @@ def multi_params(schema): return {'type': 'array', 'items': schema} +# NOTE: We don't check actual values of queries on params +# which are defined as the following common_param. +# Please note those are for backward compatible existing +# query parameters because previously multiple parameters +# might be input and accepted. +common_query_param = multi_params({'type': 'string'}) +common_query_regex_param = multi_params({'type': 'string', 'format': 'regex'}) + + class ValidationRegex(object): def __init__(self, regex, reason): self.regex = regex |
