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
This commit is contained in:
Lingxian Kong 2019-08-25 21:03:17 +12:00
parent 40821578f9
commit 2ee891ddfc

View File

@ -111,7 +111,13 @@ volume = {
"required": ["size"],
"properties": {
"size": volume_size,
"type": non_empty_string
"type": {
"oneOf": [
non_empty_string,
{"type": "null"}
]
}
}
}