There is no API sample functional test for listing keypairs for another user

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

Bug Description

The os-keypairs API allows listing keypairs for another user if you're an admin, else it defaults to just listing keypairs for the current context.user_id.

We don't actually test that in the API sample functional tests though, we only test the case that a user creates their own keypair and then lists it back out:

https://github.com/openstack/nova/blob/00b29d86e28b3d00cc8d854a0a721f4b29ab4cd5/nova/tests/functional/api_sample_tests/test_keypairs.py#L74

We should have a functional API sample test for creating a keypair for a non-admin user, and then an admin user listing the keypairs for that user.

Changed in nova:
assignee: nobody → Anusha Unnam (anusha-unnam)
Changed in nova:
assignee: Anusha Unnam (anusha-unnam) → Pavel Kholkin (pkholkin)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 47358449d359a287d21426b4e1f18479a4d1fd36
Author: Pavel Kholkin <email address hidden>
Date: Wed Jul 6 15:02:11 2016 +0300

    Microversion 2.35 adds keypairs pagination support

    After this microversion Nova API allows to get several keypairs
    with the help of new optional parameters 'limit' and 'marker'
    which were added to GET /os-keypairs request.

    Partial-Bug: #1599904

    Implements blueprint: keypairs-pagination

    Change-Id: Idd3757f5be90ec4af1bd1a7ca3f9c20319dbfd33

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/347462

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 260bb7cbf638a4efee708c0c901495905a4c66eb
Author: Pavel Kholkin <email address hidden>
Date: Tue Jul 26 18:54:36 2016 +0300

    test_keypairs_list_for_different_users for v2.10

    Added functional api_sample_test for keypair-list command
    for different users for microversion v2.10

    Closes-Bug: #1599904

    Change-Id: I92cd06efeafb00f5f4678e94185789026896be3a

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

This issue was fixed in the openstack/nova 14.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.