api: Correct bug in flavors schema

The 'rxtx_factor' is a float, not an integer, and should allow values <
1 so long as they are > 0. Correct this.

Change-Id: I3567f13d7a1bb6f42755e3f5739fa9ecd827aa49
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2024-07-01 11:18:06 +01:00
parent 7491417323
commit 64ac67fd19
@@ -50,7 +50,10 @@ create = {
'rxtx_factor': {
'type': ['number', 'string'],
'pattern': r'^[0-9]+(\.[0-9]+)?$',
'minimum': 1,
# this is a float, so we want to allow everything close to
# 0 (e.g. 0.1) but not 0 itself, hence exclusiveMinimum
# rather than the usual minimum
'exclusiveMinimum': 0,
# maximum's value is limited to db constant's
# SQL_SP_FLOAT_MAX (in nova/db/constants.py)
'maximum': 3.40282e+38