Public bug reported: 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+. ** Affects: nova Importance: Low Status: Triaged ** Tags: api-ref low-hanging-fruit ** Changed in: nova Status: New => Triaged ** Changed in: nova Importance: Undecided => Low -- 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): Triaged 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp