cinder.quota.QuotaEngine.get_default function using unexpected argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Undecided
|
Unassigned |
Bug Description
The get_default function in cinder.
get_default function, but neither DbQuotaDriver nor NestedDbQuotaDriver
actually takes parent_project_id as an argument; see the code below.
def get_default(self, context, resource, parent_
"""Get a specific default quota for a resource.
:param parent_project_id: The id of the current project's parent,
"""
return self._driver.
The NestedDbQuotaDriver get_default function is like this:
def get_default(self, context, resource, project_id):
"""Get a specific default quota for a resource."""
resource = super(NestedDbQ
return 0 if quota_utils.
The DbQuotaDriver get_default function is like this:
def get_default(self, context, resource, project_id):
"""Get a specific default quota for a resource."""
return default_
I used the get_default function while adding a new quota item,
and the unit tests failed a lot. So I read these codes and find this part
being weired. I think this can be easily fixed, since no one seems using
this function and no unit test runs this part too.
description: | updated |
Changed in cinder: | |
assignee: | nobody → Deepak Mourya (mourya007) |
Changed in cinder: | |
assignee: | Deepak Mourya (mourya007) → nobody |
Hi Yang, So do you want to write a test for this also or just change in the get_default method.?