yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #75696
[Bug 1801789] Re: GET /os-migrations sample has incorrect sort order
Reviewed: https://review.openstack.org/616773
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=084ce9b28af1320d17ff3ebf63d23f7830019982
Submitter: Zuul
Branch: master
commit 084ce9b28af1320d17ff3ebf63d23f7830019982
Author: Takashi NATSUME <natsume.takashi@xxxxxxxxxxxxx>
Date: Fri Nov 9 14:17:07 2018 +0900
api-ref: Add a description about sort order
Add a description about the sort order
in the "List Migrations" (GET /os-migrations) API.
Change-Id: Iaa8e264ca95b69f3c97a6848918862ee22922de1
Closes-Bug: #1801789
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1801789
Title:
GET /os-migrations sample has incorrect sort order
Status in OpenStack Compute (nova):
Fix Released
Bug description:
The API reference sample for the GET /os-migrations API with the 2.59
microversion:
https://developer.openstack.org/api-ref/compute/?expanded=list-
migrations-detail#list-migrations
Shows an incorrect sort order. The returned migrations are sorted by
[created_at, id] in descending order:
https://github.com/openstack/nova/blob/c64b03d218c4d05b9db47eaf7660cdab9baa6468/nova/api/openstack/compute/migrations.py#L158
The response sample shows several random migration records and they
aren't sorted by created_at in descending order, because the sample is
based on stubs in the functional test:
https://github.com/openstack/nova/blob/c64b03d218c4d05b9db47eaf7660cdab9baa6468/nova/tests/functional/api_sample_tests/test_migrations.py#L193
Since the API reference does not mention what the sort order is, a
user might have to guess from the sample, which would be pretty much
impossible with the existing sample.
With this bug, the API reference sample should:
1. Fix the sample response data to use proper sort order from the API
for the 2.59 samples (since there is no guaranteed sort order for
microversion < 2.59, especially with multiple cells).
2. Mention the sort order in the API reference when using microversion
2.59+.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1801789/+subscriptions
References