Reviewed: https://review.opendev.org/c/openstack/blazar/+/828745 Committed: https://opendev.org/openstack/blazar/commit/d20932fd98fefaf76b31e201e3e49dfe0a14e5b9 Submitter: "Zuul (22348)" Branch: stable/xena
commit d20932fd98fefaf76b31e201e3e49dfe0a14e5b9 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:
allocations[r['id']][0]
Loop over hosts to build the list of (reservation, lease, host) tuples.
Change-Id: I55b3cb4e736f6f747c8b3254c62fa40bac3f288f Closes-Bug: #1958307 (cherry picked from commit 39c67f09b8095c4d8aadfe550f0aa924a3693f5a)
Reviewed: https:/ /review. opendev. org/c/openstack /blazar/ +/828745 /opendev. org/openstack/ blazar/ commit/ d20932fd98fefaf 76b31e201e3e49d fe0a14e5b9
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit d20932fd98fefaf 76b31e201e3e49d fe0a14e5b9
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 d8aadfe550f0aa9 24a3693f5a)
Closes-Bug: #1958307
(cherry picked from commit 39c67f09b8095c4