summaryrefslogtreecommitdiff
path: root/openstackclient/volume/v2
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/volume/v2')
-rw-r--r--openstackclient/volume/v2/qos_specs.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/openstackclient/volume/v2/qos_specs.py b/openstackclient/volume/v2/qos_specs.py
index 8e1d67b5..c7160581 100644
--- a/openstackclient/volume/v2/qos_specs.py
+++ b/openstackclient/volume/v2/qos_specs.py
@@ -187,11 +187,20 @@ class ListQos(command.Lister):
qos_specs_list = volume_client.qos_specs.list()
for qos in qos_specs_list:
- qos_associations = volume_client.qos_specs.get_associations(qos)
- if qos_associations:
- associations = [association.name
- for association in qos_associations]
- qos._info.update({'associations': associations})
+ try:
+ qos_associations = volume_client.qos_specs.get_associations(
+ qos,
+ )
+ if qos_associations:
+ associations = [
+ association.name for association in qos_associations
+ ]
+ qos._info.update({'associations': associations})
+ except Exception as ex:
+ if type(ex).__name__ == 'NotFound':
+ qos._info.update({'associations': None})
+ else:
+ raise
display_columns = (
'ID', 'Name', 'Consumer', 'Associations', 'Properties')