v2.1- os-hypervisors/servers API returns empty servers list

Bug #1435668 reported by Ghanshyam Mann
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Ken'ichi Ohmichi

Bug Description

In v2.1, os-hypervisors/servers API returns empty servers list in case where hypervisors does not have any servers. This is not case with v2 API.
v2 API does not put 'servers' field in response if it is empty.

So v2.1 should be same as v2 in all cases.

summary: - v2.1 os-hypervisors/servers API`response always has "servers"
- attributes
+ v2.1- os-hypervisors/servers API returns empty servers list
description: updated
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/167100

Changed in nova:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Changed in nova:
assignee: Ghanshyam Mann (ghanshyammann) → Ken'ichi Ohmichi (oomichi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 7f5462777b32901adfe7f302e7161cd682eb2682
Author: ghanshyam <email address hidden>
Date: Tue Mar 24 14:33:01 2015 +0900

    Fix v2.1 hypervisor servers to return empty list

    In v2.1, os-hypervisors/servers API returns empty servers list in
    case where hypervisors does not have any servers.

    But this is not case with v2 API. v2 API does not put 'servers' field
    in response if it is empty.

    v2.1 APIs should be same as v2 in all cases/scenarios.

    This is bug fix so not putting as microversions, its just a change to
    the v2.1 code so it is equivalent to v2. If later needed then, this can
    be reverted back as current ways via microversion.

    This was no best test coverage to catch this kind of issue.
    This was caught while merging the v2 and v2.1 tests
    - I5ddf3c54dd80a67f71762769d6130db41e772b01

    Change-Id: I32e5cde65baeca71ec06b814b7db7aa7469eac64
    Closes-Bug: #1435668

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