Add project ID in QuotaDefault requests
Currently QuotaDefault doesnt need ID to work with, but it needs the URI to have the project ID so that it can reference the same in the Neutron API. This patch fixes this issue. Partial-Bug:#1652317 Change-Id: I9288b1c9fc64c6326231d535d9c8574b24afeb3a
This commit is contained in:
@@ -1995,7 +1995,8 @@ class Proxy(proxy2.BaseProxy):
|
||||
when no resource can be found.
|
||||
"""
|
||||
quota_obj = self._get_resource(_quota.Quota, quota)
|
||||
return self._get(_quota.QuotaDefault, project=quota_obj.project_id)
|
||||
return self._get(_quota.QuotaDefault, project=quota_obj.id,
|
||||
requires_id=False)
|
||||
|
||||
def quotas(self, **query):
|
||||
"""Return a generator of quotas
|
||||
|
||||
@@ -683,7 +683,8 @@ class TestNetworkProxy(test_proxy_base2.TestProxyBase):
|
||||
self.proxy.get_quota_default,
|
||||
method_args=['QUOTA_ID'],
|
||||
expected_args=[quota.QuotaDefault],
|
||||
expected_kwargs={'project': "PROJECT"})
|
||||
expected_kwargs={'project': fake_quota.id,
|
||||
'requires_id': False})
|
||||
mock_get.assert_called_once_with(quota.Quota, 'QUOTA_ID')
|
||||
|
||||
def test_quotas(self):
|
||||
|
||||
Reference in New Issue
Block a user