← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1733030] [NEW] GET /resource_providers?member_of misdocumented for lists

 

Public bug reported:

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

** Affects: nova
     Importance: Undecided
     Assignee: Eric Fried (efried)
         Status: In Progress


** Tags: placement

-- 
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):
  In Progress

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


Follow ups