Reviewed:  https://review.openstack.org/580373
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=928746a7bbab829539e532119822e44a932adad8
Submitter: Zuul
Branch:    master

commit 928746a7bbab829539e532119822e44a932adad8
Author: Balazs Gibizer <[email protected]>
Date:   Thu Jul 5 14:55:43 2018 +0200

    Add UUID validation for consumer_uuid
    
    When an allocation is created with PUT /allocations/{consumer_uuid} the
    consumer_uuid is not validated as UUID in the API and the DB schema only
    checks that is fits into String(36). However the Consumer object stores
    this value in a UUIDField oslo only raises a warning today.
    
    This patch adds a UUID validation for that URL path.
    
    Change-Id: Idedd85ca9266f10ce09231c34cab7ca43029a56c
    Closes-Bug: #1780238


** 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/1780238

Title:
  ensure-consumer gabbi test uses invalid consumer id

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The consumer_id is stored in an UUIDField internally and as a
  String(36) in the database. But in the ensure-consumer gabbi test
  '*consumer_id' is used as a consumer_id[1]. It seems gabbi does not
  resolve the yaml ref in the URL but resolves it in the payload part as
  [2] seems to work.

  There are two problems:
  1) the consumer_id field of PUT: /allocations/{consumer_id} is not validated 
so the API allows passing in '*consumer_id' as a string
  2) the test passes in a non UUID value for the consumer_id 

  
[1]https://github.com/openstack/nova/blob/187f80a32c8b5cdfc115e9b90f4818f3d9d1f8fe/nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml#L19
  
https://github.com/openstack/nova/blob/187f80a32c8b5cdfc115e9b90f4818f3d9d1f8fe/nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml#L41[2]

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1780238/+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

Reply via email to