Update allocations, reshaper and usage APIs to accept and present consumer_type in microversion 1.38. ensure_consumer in placement/handlers/util.py is updated to be consumer type aware. allocation, usage and reshaper schema and handlers are updated gabbits/consumer-types-1.38.yaml adds tests across the various URIs A TODO is left in placement/handlers/allocation.py where the database is being accessed in a way that is not ideal. This will be cleared up in a followup patch (to add use of an AttributeCache). Co-Authored-By: Surya Seetharaman <suryaseetharaman.9@gmail.com> Co-Authored-By: melanie witt <melwittt@gmail.com> Story: 2005473 Task: 36421 Change-Id: I24c2315093e07dbf25c4fb53152e6a4de7477a51
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"30328d13-e299-4a93-a102-61e4ccabe474": {
|
|
"consumer_generation": 1,
|
|
"project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f",
|
|
"user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f",
|
|
"allocations": {
|
|
"e10927c4-8bc9-465d-ac60-d2f79f7e4a00": {
|
|
"resources": {
|
|
"VCPU": 2,
|
|
"MEMORY_MB": 3
|
|
},
|
|
"generation": 4
|
|
}
|
|
},
|
|
"consumer_type": "INSTANCE"
|
|
},
|
|
"71921e4e-1629-4c5b-bf8d-338d915d2ef3": {
|
|
"consumer_generation": 1,
|
|
"project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f",
|
|
"user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f",
|
|
"allocations": {},
|
|
"consumer_type": "MIGRATION"
|
|
},
|
|
"48c1d40f-45d8-4947-8d46-52b4e1326df8": {
|
|
"consumer_generation": 1,
|
|
"project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f",
|
|
"user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f",
|
|
"allocations": {
|
|
"e10927c4-8bc9-465d-ac60-d2f79f7e4a00": {
|
|
"resources": {
|
|
"VCPU": 4,
|
|
"MEMORY_MB": 5
|
|
},
|
|
"generation": 12
|
|
}
|
|
},
|
|
"consumer_type": "INSTANCE"
|
|
}
|
|
}
|
|
|
|
|