diff --git a/api-ref/source/servers.inc b/api-ref/source/servers.inc index f80ad59912..466185af9e 100644 --- a/api-ref/source/servers.inc +++ b/api-ref/source/servers.inc @@ -156,7 +156,6 @@ whitelist will be silently ignored. - For non-admin users, whitelist is different from admin users whitelist. Valid whitelist for non-admin users includes - - ``all_tenants`` - ``changes-since`` - ``flavor`` - ``image`` diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index a85fc50f17..f5db67933d 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -1212,6 +1212,11 @@ class ServersController(wsgi.Controller): def _get_server_search_options(self, req): """Return server search options allowed by non-admin.""" + # NOTE(mriedem): all_tenants is admin-only by default but because of + # tight-coupling between this method, the remove_invalid_options method + # and how _get_servers uses them, we include all_tenants here but it + # will be removed later for non-admins. Fixing this would be nice but + # probably not trivial. opt_list = ('reservation_id', 'name', 'status', 'image', 'flavor', 'ip', 'changes-since', 'all_tenants') if api_version_request.is_supported(req, min_version='2.5'):