allocation schema does not set additionalProperties False in all the right places
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Chris Dent |
Bug Description
In microversion 1.12 of placement, a schema for allocations was introduced that required the allocations, project_id and user_id fields. This schema is used for subsequent microversions, copied and manipulated as required.
However, it has a flaw. It does not set additionalPrope
The diff below demonstrates the problem and a potential fix, but this fix may not be right as it is in the 1.12 microversion and we might want it on microversion 1.30 and beyond, only (which is a pain).
I think we should just fix it, as below, but I'll let others chime in too.
diff --git a/nova/
index e149ae3beb.
--- a/nova/
+++ b/nova/
@@ -113,8 +113,9 @@ ALLOCATION_
- }
+ }
},
+ "additionalProp
"required": [
diff --git a/nova/
index df8fadd66b.
--- a/nova/
+++ b/nova/
@@ -238,7 +238,9 @@ tests:
project_id: $ENVIRON[
user_id: $ENVIRON['USER_ID']
- status: 204
+ bad_field: moo
+ #status: 204
+ status: 400
- name: put that allocation to existing consumer
PUT: /allocations/
I say just fix it, in 1.12. Pretty sure the API group has been consistent in their guidance about just fixing errors without a microversion change, right?