diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2019-08-25 21:03:17 +1200 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2019-08-26 22:22:48 +1200 |
commit | 2ee891ddfc647907957ab51fbf225d9c0783eeaf (patch) | |
tree | f44bbde282f293a26ba2c5c99b184c6cf68f7bd1 | |
parent | 40821578f9d3fd5264cfa1c1b1328425dea10f80 (diff) | |
download | trove-2ee891ddfc647907957ab51fbf225d9c0783eeaf.tar.gz |
Make volume type optional
Without this patch, creating db instance will fail if no volume type is
provided:
Validation error: instance['volume']['type'] None is not of type 'string' (HTTP 400)
even if `cinder_volume_type` is configured in trove config file.
Change-Id: I3487e45840f72875ffd6cfb6ca75b4bbf60ab51e
-rw-r--r-- | trove/common/apischema.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/trove/common/apischema.py b/trove/common/apischema.py index e714a652..54d4883b 100644 --- a/trove/common/apischema.py +++ b/trove/common/apischema.py @@ -111,7 +111,13 @@ volume = { "required": ["size"], "properties": { "size": volume_size, - "type": non_empty_string + "type": { + "oneOf": [ + non_empty_string, + {"type": "null"} + ] + + } } } |