summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorDr. Jens Harbott <harbott@osism.tech>2022-02-17 16:05:28 +0100
committerDr. Jens Harbott <harbott@osism.tech>2022-02-17 16:08:57 +0100
commit077c9a77a2a7e895411f4a4990490cba7764e9c9 (patch)
tree4ab4de9d77de1619fc27df83ca9119363bd201f1 /openstackclient
parentd876b4195884af9dc7b3f6a9e9f53b01fcd80474 (diff)
downloadpython-openstackclient-077c9a77a2a7e895411f4a4990490cba7764e9c9.tar.gz
volume list: don't fail when there's no compute service
There may be deployments that only have a volume service but no compute service, possibly as an intermediate step during the initial setup. Don't fail the "volume list" command when no compute client can be initiated. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: Idef77bdc8753a456a4c431b0385318dff6581a65
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/volume/v2/volume.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py
index cab0b2f4..6d14b360 100644
--- a/openstackclient/volume/v2/volume.py
+++ b/openstackclient/volume/v2/volume.py
@@ -361,7 +361,6 @@ class ListVolume(command.Lister):
def take_action(self, parsed_args):
volume_client = self.app.client_manager.volume
- compute_client = self.app.client_manager.compute
identity_client = self.app.client_manager.identity
if parsed_args.long:
@@ -393,6 +392,7 @@ class ListVolume(command.Lister):
# Cache the server list
server_cache = {}
try:
+ compute_client = self.app.client_manager.compute
for s in compute_client.servers.list():
server_cache[s.id] = s
except Exception: