summaryrefslogtreecommitdiff
path: root/openstackclient/common
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem.os@gmail.com>2019-10-24 13:58:12 -0400
committerEric Fried <openstack@fried.cc>2019-10-31 16:48:29 +0000
commit4b393681d98e6a78248f6fa36e576a9f09c4ee34 (patch)
treebac2a4a0ec11b26855c6ab807a5b8d18110c17a6 /openstackclient/common
parentf1d742f32adeb662a3fdf8fa3ef3bc391e71ed81 (diff)
downloadpython-openstackclient-4b393681d98e6a78248f6fa36e576a9f09c4ee34.tar.gz
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
Diffstat (limited to 'openstackclient/common')
-rw-r--r--openstackclient/common/extension.py4
1 files changed, 2 insertions, 2 deletions
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)