This change modifies the DB utility to fetch reservation allocations so that a list of reservations is returned with host_ids as an attribute to each reservation. This allows the host plugin to include more information when listing allocations, namely start and end dates. This can be used to see when resources are available, and for the creation of a reservation calendar (blueprint calendar-view). Change-Id: I464898bdeda6b55a028c8a14a54eb137c92a83c1
33 lines
1.1 KiB
JSON
33 lines
1.1 KiB
JSON
{
|
|
"allocations": [
|
|
{
|
|
"resource_id": "1",
|
|
"reservations": [
|
|
{
|
|
"id": "3504fbac-fdb2-458e-a43f-34d27fbd0b86",
|
|
"lease_id": "0ec2bed6-75f9-4959-8198-9d9717dde4cb",
|
|
"start_date": "2021-12-16T17:11:00.000000",
|
|
"end_date": "2021-12-16T17:13:00.000000"
|
|
},
|
|
{
|
|
"id": "4f4743a2-d8c7-44c2-ba39-300eb7659bb9",
|
|
"lease_id": "6050288d-5535-4e3c-93d5-083184b86c61",
|
|
"start_date": "2021-12-16T17:11:00.000000",
|
|
"end_date": "2021-12-16T17:13:00.000000"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"resource_id": "2",
|
|
"reservations": [
|
|
{
|
|
"id": "b2475424-6872-43ec-857d-f4b50b403e97",
|
|
"lease_id": "e92b9d47-9078-47ec-a35c-27e67f7b8429",
|
|
"start_date": "2021-12-16T17:11:00.000000",
|
|
"end_date": "2021-12-16T17:13:00.000000"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|