From 4b393681d98e6a78248f6fa36e576a9f09c4ee34 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 24 Oct 2019 13:58:12 -0400 Subject: Use SDK to get compute API extensions python-novaclient 16.0.0 removed the deprecated list_extensions module [1] so this changes the extensions command to use openstacksdk to get the compute API extensions. The functional test ExtensionTests.test_extension_list_compute ensures this works. [1] https://review.opendev.org/686516/ Change-Id: I9894bc395c0474aaa6494ac4534862efe4ea7984 Story: #2006769 Task: #37284 --- openstackclient/common/extension.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstackclient/common') diff --git a/openstackclient/common/extension.py b/openstackclient/common/extension.py index 71206618..1ed2012c 100644 --- a/openstackclient/common/extension.py +++ b/openstackclient/common/extension.py @@ -89,9 +89,9 @@ class ListExtension(command.Lister): LOG.warning(message) if parsed_args.compute or show_all: - compute_client = self.app.client_manager.compute + compute_client = self.app.client_manager.sdk_connection.compute try: - data += compute_client.list_extensions.show_all() + data += compute_client.extensions() except Exception: message = _("Extensions list not supported by Compute API") LOG.warning(message) -- cgit v1.2.1