Incorrect argument while retrieving quota with project and user in DbQuotaDriver

Bug #1255035 reported by Tianpeng Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Tianpeng Wang

Bug Description

The `user_id` passed in db.quota_get() should be a keyword argument.

The prototype of quota_get():

def quota_get(context, project_id, resource, user_id=None)

But In DbQuotaDriver::get_by_project_and_user():

return db.quota_get(context, project_id, user_id, resource)

which should be:

return db.quota_get(context, project_id, resource, user_id=user_id)

Changed in nova:
assignee: nobody → Tianpeng Wang (timonwong)
Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58518

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/58518
Committed: http://github.com/openstack/nova/commit/1447b8117bc4de27243913208ead210b8f36d635
Submitter: Jenkins
Branch: master

commit 1447b8117bc4de27243913208ead210b8f36d635
Author: Tianpeng Wang <email address hidden>
Date: Tue Nov 26 13:10:40 2013 +0000

    Fix incorrect argument position in DbQuotaDriver

    The prototype of db.quota_get is:
    `quota_get(context, project_id, resource, user_id=None)`
    However, in DbQuotaDriver::get_by_project_and_user(), the `user_id`
    is incorrectly used as a positional argument.

    Closes-Bug: #1255035

    Change-Id: I5b6a4c59efe6d9bdc8380e50b7f7c1ff0d2029b1

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.