List allocation API missing data for multi-host reservations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Blazar |
Fix Released
|
High
|
Pierre Riteau |
Bug Description
Create a two-node reservation:
blazar lease-create --physical-
Query the allocation list:
curl -s --header "X-Auth-Token: $OS_AUTH_TOKEN" http://
{
"allocations": [
{
"
"
{
"id": "4abc4ddd-
}
]
}
]
}
What I am expecting to see:
{
"allocations": [
{
"
"
{
"id": "4abc4ddd-
}
]
},
{
"
"
{
"id": "4abc4ddd-
}
]
}
]
}
Changed in blazar: | |
importance: | Undecided → High |
assignee: | nobody → Pierre Riteau (priteau) |
status: | New → Incomplete |
status: | Incomplete → Confirmed |
Changed in blazar: | |
status: | Confirmed → In Progress |
Reviewed: https:/ /review. opendev. org/c/openstack /blazar/ +/825181 /opendev. org/openstack/ blazar/ commit/ 39c67f09b8095c4 d8aadfe550f0aa9 24a3693f5a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 39c67f09b8095c4 d8aadfe550f0aa9 24a3693f5a
Author: Pierre Riteau <email address hidden>
Date: Tue Jan 18 23:21:43 2022 +0100
Fix list_allocations for multi-host reservations
The get_reservation _allocations_ by_host_ ids function builds an
allocation dictionary that looks like this:
allocations = {
'r1': ['host1'],
'r2': ['host1', 'host2']
}
The list returned by this function was only using the first host of each
reservation:
Loop over hosts to build the list of (reservation, lease, host) tuples.
Change-Id: I55b3cb4e736f6f 747c8b3254c62fa 40bac3f288f
Closes-Bug: #1958307