Reviewed: https://review.openstack.org/521216 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ed51eee6c3f7a158afe3c622ea6d1a28a22e9f6e Submitter: Zuul Branch: master
commit ed51eee6c3f7a158afe3c622ea6d1a28a22e9f6e Author: Eric Fried <[email protected]> Date: Fri Nov 17 20:02:40 2017 -0600 placement: Document `in:` prefix for ?member_of= The documentation for the member_of query parameter for GET /resource_providers [1] claims that it accepts a "comma-separated list of strings representing aggregate uuids". But it turns out the code [2] is expecting a single UUID unless the prefix 'in:' is specified. This change set updates the documentation accordingly. [1] https://developer.openstack.org/api-ref/placement/#resource-providers [2] https://github.com/openstack/nova/blob/57728836f25e9201ddec1e7790b552cfa840d572/nova/api/openstack/placement/handlers/resource_provider.py#L229-L233 Change-Id: I2ec46d767ded5be02cfc73136f2d217f1347662a Closes-Bug: #1733030 ** 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/1733030 Title: GET /resource_providers?member_of misdocumented for lists Status in OpenStack Compute (nova): Fix Released Bug description: The documentation for the member_of query parameter for GET /resource_providers [1] claims that it accepts a "comma-separated list of strings representing aggregate uuids". But attempting this with more than one aggregate UUID results in a 400 error claiming: Invalid uuid value: 1ceb128e-a714-4e4a-8eec-0d0a45c7039a,4a10858c- 253e-4df5-8ada-c5dbe5744462,7cb20f93-8789-434f-bbe4-76ea1d485c32 Turns out the code [2] is expecting a single UUID unless the prefix 'in:' is specified. I see three possible solutions: a) Remove the prefix check or make it accepted but ignored. Don't tell anyone. After all, nobody could have been using it unless they had read the source code. b) Document the in: prefix. c) Publish a new placement microversion X with the prefix check removed. Document the in: prefix as being required up to microversion X-1 and forbidden (or perhaps ignored?) at microversion X and beyond. Personally, I think the prefix is superfluous and would rather see it removed. And the code change is trivial - one_uuid.split(',') will happily return [one_uuid] if there's no commas in there. Surely we don't need a new microversion if we make it accepted but ignored?? [1] https://developer.openstack.org/api-ref/placement/#resource-providers [2] https://github.com/openstack/nova/blob/57728836f25e9201ddec1e7790b552cfa840d572/nova/api/openstack/placement/handlers/resource_provider.py#L229-L233 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1733030/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

