Non-Admin user can filter their instances by more filters
Microversion bump to allow non-admin user to use more filters key when listing instances. In order to stay coherent, all existing instance filters who are related to a field readable by default to non admin users when showing instance details, should be allowed by default without policy modification. Implements: blueprint non-admin-filter-instance-by-az Change-Id: Ia66d3a1ceb74ed521cf44922929b2a502f3ee935
This commit is contained in:
@@ -159,6 +159,17 @@ For different user roles, the user has different query options set:
|
||||
- ``tags-any`` (New in version 2.26)
|
||||
- ``changes-before`` (New in version 2.66)
|
||||
- ``locked`` (New in version 2.73)
|
||||
- ``availability_zone`` (New in version 2.83)
|
||||
- ``config_drive`` (New in version 2.83)
|
||||
- ``key_name`` (New in version 2.83)
|
||||
- ``created_at`` (New in version 2.83)
|
||||
- ``launched_at`` (New in version 2.83)
|
||||
- ``terminated_at`` (New in version 2.83)
|
||||
- ``power_state`` (New in version 2.83)
|
||||
- ``task_state`` (New in version 2.83)
|
||||
- ``vm_state`` (New in version 2.83)
|
||||
- ``progress`` (New in version 2.83)
|
||||
- ``user_id`` (New in version 2.83)
|
||||
|
||||
Other options will be ignored by nova silently.
|
||||
|
||||
@@ -177,12 +188,12 @@ Precondition: there are 2 servers existing in cloud with following info::
|
||||
"servers": [
|
||||
{
|
||||
"name": "t1",
|
||||
"OS-EXT-STS:vm_state": "active",
|
||||
"OS-EXT-SRV-ATTR:host": "devstack1",
|
||||
...
|
||||
},
|
||||
{
|
||||
"name": "t2",
|
||||
"OS-EXT-STS:vm_state": "stopped",
|
||||
"OS-EXT-SRV-ATTR:host": "devstack2",
|
||||
...
|
||||
}
|
||||
]
|
||||
@@ -190,13 +201,13 @@ Precondition: there are 2 servers existing in cloud with following info::
|
||||
|
||||
**Example: General user query server with administrator only options**
|
||||
|
||||
Request with non-administrator context: ``GET /servers/detail?vm_state=active``
|
||||
Request with non-administrator context: ``GET /servers/detail?host=devstack1``
|
||||
|
||||
.. note::
|
||||
|
||||
The ``vm_state`` query parameter is only for administrator users and
|
||||
The ``host`` query parameter is only for administrator users and
|
||||
the query parameter is ignored if specified by non-administrator users.
|
||||
Thus the API returns servers of both ``active`` and ``stopped``
|
||||
Thus the API returns servers of both ``devstack1`` and ``devstack2``
|
||||
in this example.
|
||||
|
||||
Response::
|
||||
@@ -216,7 +227,7 @@ Response::
|
||||
|
||||
**Example: Administrator query server with administrator only options**
|
||||
|
||||
Request with administrator context: ``GET /servers/detail?vm_state=active``
|
||||
Request with administrator context: ``GET /servers/detail?host=devstack1``
|
||||
|
||||
Response::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user