api-ref: GET /servers/{server_id}/os-instance-actions/{request_id} does not list 'events' response key as optional

Bug #1702573 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann

Bug Description

The API reference for "GET /servers/{server_id}/os-instance-actions/{request_id}" does not list the "events" key in the response body as optional:

https://developer.openstack.org/api-ref/compute/?expanded=show-server-action-details-detail,list-actions-for-server-detail

However, based on the API code it is:

https://github.com/openstack/nova/blob/635e29433cdadd3d1b664ea2354f049125c393fe/nova/api/openstack/compute/instance_actions.py#L83

By default policy rules, the event details are only shown for admin users:

https://github.com/openstack/nova/blob/635e29433cdadd3d1b664ea2354f049125c393fe/nova/policies/instance_actions.py#L25

Using the os_compute_api:os-instance-actions:events policy rule.

The API reference should be updated to reflect this.

Tags: api-ref
Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
importance: Undecided → Medium
status: New → Triaged
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/480792

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

Reviewed: https://review.openstack.org/480792
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d2d84eb102023d75911ca848c1d30a9f81e6f40f
Submitter: Jenkins
Branch: master

commit d2d84eb102023d75911ca848c1d30a9f81e6f40f
Author: Matt Riedemann <email address hidden>
Date: Wed Jul 5 21:39:58 2017 -0400

    api-ref: mark instance action events parameter as optional

    For "GET /servers/{server_id}/os-instance-actions/{request_id}",
    the "events" parameter in the response body is only included by
    default policy for administrators. You can get details if you're
    an admin or own the server, but the events are only returned for
    admins by default.

    This change does two things:

    1. Fixes the description of the default policy since admin or
       owner can get action details for a particular request.
    2. Fixes the "events" parameter description by pointing out it
       is optional and only returned by default for admins.

    Change-Id: I6410a0aac223133d8d07fd65c268553ebb9e7e67
    Closes-Bug: #1702573

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

This issue was fixed in the openstack/nova 16.0.0.0b3 development milestone.

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.