From 4f713f6a76b6bdf9e2e6c99121d7a9f8b553134c Mon Sep 17 00:00:00 2001 From: whoami-rajat Date: Thu, 27 Dec 2018 16:20:56 +0000 Subject: [PATCH] Add project_id attribute to the group response Add ``project_id`` attribute to the response body of list groups with detail and show group detail APIs. Change-Id: I3b51ae32750d1e6b2e17ab60a77818e0b4d497a2 Implements: blueprint add-project-id-to-group-response --- .../add-project-id-to-group-response.rst | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 specs/stein/add-project-id-to-group-response.rst diff --git a/specs/stein/add-project-id-to-group-response.rst b/specs/stein/add-project-id-to-group-response.rst new file mode 100644 index 00000000..27476983 --- /dev/null +++ b/specs/stein/add-project-id-to-group-response.rst @@ -0,0 +1,149 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. + + http://creativecommons.org/licenses/by/3.0/legalcode + +========================================== +Add project_id attribute to group response +========================================== +https://blueprints.launchpad.net/cinder/+spec/add-project-id-to-group-response + +This blueprint proposes to add ``project_id`` attribute to +the response body of list groups with detail and show group detail APIs. + +Problem Description +=================== + +Currently, the group show response doesn't include project_id. +It is an important parameter while differentiating between multiple groups +in horizon. + +Use Cases +========= + +As horizon is adding a tab for group listing with detail in the admin panel[1], +it requires project_id as a response parameter from the groups API. +It is similar to what is implemented in volumes and snapshots list. + +Proposed change +=============== + +This spec proposes to add ``project_id`` attribute to the +response body of list groups with detail and show group detail APIs. + +Add a new microverion API to add ``project_id`` attribute +to the response body of list groups with detail and show group detail APIs: + +- List groups with detail GET /v3/{project_id}/groups/detail + +- Show group detail GET /v3/{project_id}/groups/{group_id} + +Alternatives +------------ + +None + +REST API impact +--------------- + +Add a new microversion in Cinder API. + +* List groups with detail:: + + GET /v3/{project_id}/groups/detail + Response BODY: + { + "groups": [{ + ... + "project_id": "7ccf4863071f44aeb8f141f65780c51b" + }] + } + +* Show group detail:: + + GET /v3/{project_id}/groups/{group_id} + Response BODY: + { + "groups": [{ + ... + "project_id": "7ccf4863071f44aeb8f141f65780c51b" + }] + } + +Calling this method shows ``project_id`` for a group. +It is intended for admins to use, which is used to display the project_id to which +the group belongs, and controlled by ``GROUP_ATTRIBUTES_POLICY``. + +Data model impact +----------------- + +None + +Security impact +--------------- + +None + +Notifications impact +-------------------- + +None + +Other end user impact +--------------------- + +None + +Performance Impact +------------------ + +None + +Other deployer impact +--------------------- + +None + +Developer impact +---------------- + +None + +Implementation +============== + +Assignee(s) +----------- + +Primary assignee: + Rajat Dhasmana + +Work Items +---------- + +* Add a new microversion. +* Add ``project_id`` to the response body of list groups + with detail and show group detail APIs. +* Add the related unit tests. +* Update related list groups with detail and show group detail api doc. + +Dependencies +============ + +None + +Testing +======= + +* Unit-tests, tempest and other related test should be implemented + +Documentation Impact +==================== + +None + +References +========== + +[1] https://review.openstack.org/#/c/624599/