'all_tenants' 'all_projects' query param is not only integer as mentioned in api-ref

Bug #1734427 reported by Ghanshyam Mann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ghanshyam Mann

Bug Description

'all_tenants' and 'all_projects' are query param to list the resources for all tenants/projects.

Checking of this query param in code is different in different APIs.
- GET /servers API checks the value of 'all_tenants' as bool[1].
- other APIs just checks the present of it in req, like GET /os-server-groups, /os-fping

api-ref mentioned this param types as integer, boolean or string.

It is good to mention this query param type consistently to avoid confusion for users.

..1 https://github.com/openstack/nova/blob/e9104dbaef9bbccc6b19811125d439fdf9558428/nova/api/openstack/compute/servers.py#L265

..2
https://github.com/openstack/nova/blob/e9104dbaef9bbccc6b19811125d439fdf9558428/nova/api/openstack/compute/server_groups.py#L138

https://github.com/openstack/nova/blob/e9104dbaef9bbccc6b19811125d439fdf9558428/nova/api/openstack/compute/fping.py#L75

Tags: api-ref
Changed in nova:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/522918

Changed in nova:
status: New → In Progress
tags: added: api-ref
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/522918
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6a75cb2ef9b423b03c0be7ddc74dc1a34cd5a4e3
Submitter: Zuul
Branch: master

commit 6a75cb2ef9b423b03c0be7ddc74dc1a34cd5a4e3
Author: ghanshyam <email address hidden>
Date: Sat Nov 25 11:34:24 2017 +0300

    Fix 'all_tenants' & 'all_projects' type in api-ref

    'all_tenants' and 'all_projects' are query param to
    list the resources for all tenants/projects.

    Checking of this query param in code is different in different APIs.
    - GET /servers and /servers/detail API checks the value of 'all_tenants'
      strictly as boolean if there is one present.
    - other APIs just checks the presence of it in req,
      like GET /os-server-groups, /os-fping

    api-ref mentioned this param types as integer, boolean or string.

    This commit make api-ref consistent to have type of this query param
    as string.

    Change-Id: I5297e6baa1e3d06adfc9d29d2bc56124119b9c8c
    Closes-Bug: #1734427

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0rc1

This issue was fixed in the openstack/nova 17.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.