summaryrefslogtreecommitdiff
path: root/cinderclient/v3
diff options
context:
space:
mode:
authorMinmin Ren <renmm6@chinaunicom.cn>2019-05-14 02:42:30 +0000
committerTakashi Kajinami <tkajinam@redhat.com>2020-01-21 09:31:17 +0900
commit511224425804621550bf30403f7768eebe6f34ca (patch)
treebbcd4dec41118cb772bc3046ffc3485840af1100 /cinderclient/v3
parent9c9e797d07f64d4841ecb695d177c5e0c7d8266b (diff)
downloadpython-cinderclient-4.2.2.tar.gz
Add missed 'Server ID' output in attachment-liststein-em4.2.2
'server_id' is not Attachment attribute, should be set by 'instance' attribute. v3/attachments respond body: {"attachments": [{"status": "attached", "instance": INSTANCE_UUID, "id": ATTACHMENT_UUID, "volume_id": VOLUME_UUID, }, ... ] } Closes-Bug: #1860393 Change-Id: Ica5d278cb7455befe1db4be0ab65114fd606ea0a (cherry picked from commit 03f228c11e0d88dcc396b30b7544b5cfde894750)
Diffstat (limited to 'cinderclient/v3')
-rw-r--r--cinderclient/v3/shell.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py
index da55f4a..dc9fadd 100644
--- a/cinderclient/v3/shell.py
+++ b/cinderclient/v3/shell.py
@@ -2155,6 +2155,8 @@ def do_attachment_list(cs, args):
marker=args.marker,
limit=args.limit,
sort=args.sort)
+ for attachment in attachments:
+ setattr(attachment, 'server_id', getattr(attachment, 'instance', None))
columns = ['ID', 'Volume ID', 'Status', 'Server ID']
if args.sort:
sortby_index = None