From 469ddca009c9c3f490f39bf7a291c6e45cd7af2e Mon Sep 17 00:00:00 2001 From: Tetsuro Nakamura Date: Thu, 3 Jan 2019 09:48:39 +0000 Subject: [PATCH] Change "Resource Allocation API" spec This patch changes the "Resource Allocation API" spec according to the discussion in the IRC meeting [1]. [1] http://eavesdrop.openstack.org/meetings/blazar/2018/blazar.2018-11-27-09.00.log.html Partially Implements: blueprint resource-allocation-api Change-Id: I7c6c00ab63c7229a19b38425d35091b738a47bb4 --- .../specs/rocky/resource-availability.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/source/specs/rocky/resource-availability.rst b/doc/source/specs/rocky/resource-availability.rst index d64b47a9..035d64fc 100644 --- a/doc/source/specs/rocky/resource-availability.rst +++ b/doc/source/specs/rocky/resource-availability.rst @@ -76,7 +76,7 @@ None. REST API impact --------------- -* URL: GET /v1/os-hosts/reservations +* URL: GET /v1/os-hosts/allocations * The API replies the all allocations between reservations and hosts. * Nomal response code: 200 @@ -88,10 +88,10 @@ Response Example: .. sourcecode:: json { - "reservations": [ + "allocations": [ { - "id": "host-id1", - "allocations": [ + "resource_id": "host-id1", + "reservations": [ { "id": "reservation-id1", "lease_id": "lease-id1" @@ -107,7 +107,7 @@ Response Example: } -* URL: GET /v1/os-hosts/{host-id}/reservations +* URL: GET /v1/os-hosts/{host-id}/allocation * The API replies the all allocations only for the host. * Nomal response code: 200 @@ -119,9 +119,9 @@ Response Example: .. sourcecode:: json { - "reservation": { - "id": "host-id1", - "allocations": [ + "allocation": { + "resource_id": "host-id1", + "reservations": [ { "id": "reservation-id1", "lease_id": "lease-id1" @@ -159,7 +159,7 @@ The pythonclient will support the allocation APIs. Performance Impact ------------------ -List all allocations API, GET /v1/os-hosts/reservations, returns all +List all allocations API, GET /v1/os-hosts/allocations, returns all allocations. When the number of hosts and reservations are huge, the DB query and response body could become huge, too.