diff --git a/openstack/compute/v2/_proxy.py b/openstack/compute/v2/_proxy.py index 0ef062387..419fb4dd9 100644 --- a/openstack/compute/v2/_proxy.py +++ b/openstack/compute/v2/_proxy.py @@ -2465,7 +2465,8 @@ class Proxy(proxy.Proxy): None, project_id=project.id, ) - return res.fetch(self, usage=usage, **query) + base_path = '/os-quota-sets/%(project_id)s/detail' if usage else None + return res.fetch(self, base_path=base_path, **query) def get_quota_set_defaults(self, project): """Show QuotaSet defaults for the project @@ -2484,7 +2485,9 @@ class Proxy(proxy.Proxy): None, project_id=project.id, ) - return res.fetch(self, base_path='/os-quota-sets/defaults') + return res.fetch( + self, base_path='/os-quota-sets/%(project_id)s/defaults' + ) def revert_quota_set(self, project, **query): """Reset Quota for the project/user. diff --git a/openstack/tests/unit/cloud/test_quotas.py b/openstack/tests/unit/cloud/test_quotas.py index 50dbe7f41..d02b2e7d8 100644 --- a/openstack/tests/unit/cloud/test_quotas.py +++ b/openstack/tests/unit/cloud/test_quotas.py @@ -125,7 +125,6 @@ class TestQuotas(base.TestCase): 'compute', 'public', append=['os-quota-sets', project.project_id], - qs_elements=['usage=False'], ), json={'quota_set': fake_quota_set}, ), diff --git a/openstack/tests/unit/compute/v2/test_proxy.py b/openstack/tests/unit/compute/v2/test_proxy.py index 5c11d9e2a..38a6474ec 100644 --- a/openstack/tests/unit/compute/v2/test_proxy.py +++ b/openstack/tests/unit/compute/v2/test_proxy.py @@ -1642,7 +1642,6 @@ class TestQuotaSet(TestComputeProxy): expected_kwargs={ 'error_message': None, 'requires_id': False, - 'usage': False, }, method_result=quota_set.QuotaSet(), expected_result=quota_set.QuotaSet(), @@ -1658,8 +1657,8 @@ class TestQuotaSet(TestComputeProxy): expected_kwargs={ 'error_message': None, 'requires_id': False, - 'usage': True, 'user_id': 'uid', + 'base_path': '/os-quota-sets/%(project_id)s/detail', }, ) @@ -1672,7 +1671,7 @@ class TestQuotaSet(TestComputeProxy): expected_kwargs={ 'error_message': None, 'requires_id': False, - 'base_path': '/os-quota-sets/defaults', + 'base_path': '/os-quota-sets/%(project_id)s/defaults', }, )