summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorThomas Goirand <zigo@debian.org>2025-10-09 00:00:19 +0200
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2025-10-09 04:39:37 +0000
commit26da6fd3d169f4acba72909f0cfa82cf37d6a7a5 (patch)
tree29478e98834c27c24fdc392c7320114efda33167 /debian
parentae6e0b94f4b7b4b63d852fe03075422bcec53aa7 (diff)
8.2.0-4 (patches unapplied)import/8.2.0-4
Imported using git-ubuntu import.
Notes
Notes: * Add Fix_openstack_quota_show_without_cinder.patch (Closes: #1109288)
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/Fix_openstack_quota_show_without_cinder.patch106
-rw-r--r--debian/patches/series1
3 files changed, 113 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index b8cb820..ad0798d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-openstackclient (8.2.0-4) unstable; urgency=medium
+
+ * Add Fix_openstack_quota_show_without_cinder.patch (Closes: #1109288)
+
+ -- Thomas Goirand <zigo@debian.org> Thu, 09 Oct 2025 00:00:19 +0200
+
python-openstackclient (8.2.0-3) unstable; urgency=medium
* Uploading to unstable.
diff --git a/debian/patches/Fix_openstack_quota_show_without_cinder.patch b/debian/patches/Fix_openstack_quota_show_without_cinder.patch
new file mode 100644
index 0000000..3e6eebf
--- /dev/null
+++ b/debian/patches/Fix_openstack_quota_show_without_cinder.patch
@@ -0,0 +1,106 @@
+Description: Fix openstack quota show without cinder
+ Per this Debian bug [1], 'openstack quota show --default' fails when
+ cinder is NOT installed. This is also true of other services.
+ .
+ [1] https://bugs.debian.org/1109288
+Author: Svein-Erik Skjelbred <svein-erik@skjelbred.com>
+Date: Mon, 29 Sep 2025 14:59:03 +0200
+Change-Id: I361da44b9f1d09ba3a454632d41e2110a3815395
+Signed-off-by: Svein-Erik Skjelbred <svein-erik@skjelbred.com>
+Signed-off-by: Thomas Goirand <zigo@debian.org>
+Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
+Forwarded: https://review.opendev.org/c/openstack/python-openstackclient/+/962838
+Bug-Debian: https://bugs.debian.org/1109288
+
+diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py
+index f706a59..41c57e6 100644
+--- a/openstackclient/common/quota.py
++++ b/openstackclient/common/quota.py
+@@ -746,21 +746,32 @@
+ # values if the project or class does not exist. This is expected
+ # behavior. However, we have already checked for the presence of the
+ # project above so it shouldn't be an issue.
+- if parsed_args.service in {'all', 'compute'}:
++ if parsed_args.service == 'compute' or (
++ parsed_args.service == 'all'
++ and self.app.client_manager.is_compute_endpoint_enabled()
++ ):
+ compute_quota_info = get_compute_quotas(
+ self.app,
+ project,
+ detail=parsed_args.usage,
+ default=parsed_args.default,
+ )
+- if parsed_args.service in {'all', 'volume'}:
++
++ if parsed_args.service == 'volume' or (
++ parsed_args.service == 'all'
++ and self.app.client_manager.is_volume_endpoint_enabled()
++ ):
+ volume_quota_info = get_volume_quotas(
+ self.app,
+ project,
+ detail=parsed_args.usage,
+ default=parsed_args.default,
+ )
+- if parsed_args.service in {'all', 'network'}:
++
++ if parsed_args.service == 'network' or (
++ parsed_args.service == 'all'
++ and self.app.client_manager.is_network_endpoint_enabled()
++ ):
+ network_quota_info = get_network_quotas(
+ self.app,
+ project,
+@@ -906,12 +917,18 @@
+ )
+
+ # compute quotas
+- if parsed_args.service in {'all', 'compute'}:
++ if parsed_args.service == 'compute' or (
++ parsed_args.service == 'all'
++ and self.app.client_manager.is_compute_endpoint_enabled()
++ ):
+ compute_client = self.app.client_manager.compute
+ compute_client.revert_quota_set(project.id)
+
+ # volume quotas
+- if parsed_args.service in {'all', 'volume'}:
++ if parsed_args.service == 'volume' or (
++ parsed_args.service == 'all'
++ and self.app.client_manager.is_volume_endpoint_enabled()
++ ):
+ volume_client = self.app.client_manager.sdk_connection.volume
+ volume_client.revert_quota_set(project.id)
+
+diff --git a/openstackclient/tests/unit/common/test_quota.py b/openstackclient/tests/unit/common/test_quota.py
+index 53df4da..a2418d0 100644
+--- a/openstackclient/tests/unit/common/test_quota.py
++++ b/openstackclient/tests/unit/common/test_quota.py
+@@ -1041,6 +1041,26 @@
+ )
+ self.assertNotCalled(self.network_client.get_quota_default)
+
++ def test_quota_show__missing_services(self):
++ self.app.client_manager.compute_endpoint_enabled = False
++ self.app.client_manager.volume_endpoint_enabled = False
++ self.app.client_manager.network_endpoint_enabled = False
++
++ arglist = [
++ self.projects[0].name,
++ ]
++ verifylist = [
++ ('service', 'all'),
++ ('project', self.projects[0].name),
++ ]
++ parsed_args = self.check_parser(self.cmd, arglist, verifylist)
++
++ self.cmd.take_action(parsed_args)
++
++ self.compute_client.get_quota_set.assert_not_called()
++ self.volume_sdk_client.get_quota_set.assert_not_called()
++ self.network_client.get_quota.assert_not_called()
++
+ def test_quota_show__with_compute(self):
+ arglist = [
+ '--compute',
diff --git a/debian/patches/series b/debian/patches/series
index bb74ab0..b0f0308 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
package-all-files.patch
+Fix_openstack_quota_show_without_cinder.patch