Nova API Sample file and its test for get keypair API is wrong

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

Bug Description

Problem -
API sample file for Nova get keypair API is wrong. It contain the response sample of list keypair API.
Below API sample files, from their name it looks like these are for get keypair API. But in actual content of these files are written as List keypair API response. So it create the confusion that for which API these API sample file are. Name suggest for GET and content suggest for LIST Keypair.

        /nova/tests/integrated/api_samples/os-keypairs/keypairs-get-resp.json.tpl
        /nova/tests/integrated/api_samples/os-keypairs/keypairs-get-resp.xml.tpl

Their API sample test cases are written corrosponding to list keypair APIs. This issue is in both V2 and V3 APIs sample.

Solution-
 - Here we need to rename the above sample files and their test from 'keypairs-get-resp.json.tpl' to 'keypairs-list-resp.json.tpl' etc
 - Create the new sample file and test for GET keypair.

Tags: testing
Changed in nova:
assignee: nobody → Ghanshyam (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/83662

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

description: updated
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Low
tags: added: testing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit da3a02243df43ee581c52d3e194c8ed54d4cdd24
Author: Ghanshyam <email address hidden>
Date: Fri Mar 28 15:06:30 2014 +0900

    Correct the keypairs-get-resp.json API sample file

    Current keypair sample files 'keypairs-get-resp.json/xml contain
    'keypairs' as the first key and that means its sample response
    of "list keypairs" API not "get keypair" API.

    The tests don't pass a keypair id, so current tests also are for
    "list keypairs" API.

    Details-
    Below API sample files- from their name it looks like these are for
    get keypair API. But in actual content of these files are written as
    List keypair API response. So it create the confusion that for which
    API these API sample file are. Name suggest for GET and content
    suggest for LIST Keypair.

        /nova/tests/integrated/api_samples/os-keypairs/
        keypairs-get-resp.json.tpl
        /nova/tests/integrated/api_samples/os-keypairs/
        keypairs-get-resp.xml.tpl

    Their API sample test cases are written corrosponding to list keypair
    APIs.

    This patch correct the above API sample file name from get to list
    Keypair APIs.
    API Sample test cases names are also modified accordingly.

    Partial-Bug: 1298769

    Change-Id: I88d894ff9b0f6236221fa922601b641f26a87301

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit c3cb44d688bf3225ef7bddf7b2d259f9da24d308
Author: Ghanshyam <email address hidden>
Date: Wed May 7 21:01:21 2014 +0900

    Add Nova API Sample file & test for get keypair

    This patch adds the new API Sample file and its test for Nova V2 and V3
    get keypair APIs.

    This patch extend the timstamps reg exp to allow the combination
    of TZ and microsecond/

    Closes-Bug: 1298769
    Closes-Bug: 1298818

    Change-Id: If695a23cf95862b7bec6fbc5bdf7fc1733d08d4a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
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.