diff --git a/openstack/block_storage/v3/_proxy.py b/openstack/block_storage/v3/_proxy.py index b7cfef0c6..421644aa0 100644 --- a/openstack/block_storage/v3/_proxy.py +++ b/openstack/block_storage/v3/_proxy.py @@ -2024,7 +2024,9 @@ class Proxy(proxy.Proxy): res = self._get_resource( _quota_set.QuotaSet, None, project_id=project.id ) - return res.fetch(self, base_path='/os-quota-sets/defaults') + return res.fetch( + self, base_path=(f'/os-quota-sets/{project.id}/defaults') + ) def revert_quota_set(self, project, **query): """Reset Quota for the project/user. diff --git a/openstack/tests/unit/block_storage/v3/test_proxy.py b/openstack/tests/unit/block_storage/v3/test_proxy.py index 67f8778a7..eb4cbfe8e 100644 --- a/openstack/tests/unit/block_storage/v3/test_proxy.py +++ b/openstack/tests/unit/block_storage/v3/test_proxy.py @@ -1176,14 +1176,15 @@ class TestQuotaSet(TestVolumeProxy): ) def test_quota_set_get_defaults(self): + project_id = 'prj' self._verify( 'openstack.resource.Resource.fetch', self.proxy.get_quota_set_defaults, - method_args=['prj'], + method_args=[project_id], expected_args=[ self.proxy, False, - '/os-quota-sets/defaults', + f'/os-quota-sets/{project_id}/defaults', None, False, ], diff --git a/releasenotes/notes/fix-quota-show-defaults-0a8c388926eae18b.yaml b/releasenotes/notes/fix-quota-show-defaults-0a8c388926eae18b.yaml new file mode 100644 index 000000000..428abef0e --- /dev/null +++ b/releasenotes/notes/fix-quota-show-defaults-0a8c388926eae18b.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixed issue with ``quota show --default`` command by + correcting the API URL.