diff options
author | huangtianhua <huangtianhua@huawei.com> | 2016-12-24 11:28:35 +0800 |
---|---|---|
committer | huangtianhua <huangtianhua@huawei.com> | 2017-01-24 07:09:58 +0000 |
commit | 3ee70cf4e8c2d8505230f73ef0b6b44185567dc2 (patch) | |
tree | 5ad65b9d93c7921ca48de7bc5861fc5d89494b99 /heatclient/v1/shell.py | |
parent | 17dd3068e4d6fc10236290cc082908c439bcfead (diff) | |
download | python-heatclient-3ee70cf4e8c2d8505230f73ef0b6b44185567dc2.tar.gz |
Show 'project' info if heat server returns
Show 'project'/'Project' info in heatclient
if heat server returns 'project' info of stacks.
Change-Id: I7d95ae96a678ef41bcd3d5379f204db83e4b585c
Closes-Bug: #1652412
Diffstat (limited to 'heatclient/v1/shell.py')
-rw-r--r-- | heatclient/v1/shell.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index a3179b3..a38c32a 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -689,13 +689,16 @@ def do_stack_list(hc, args=None): if args.global_tenant or args.show_owner: fields.append('stack_owner') - if args.global_tenant: - fields.append('project') if args.show_deleted: fields.append('deletion_time') stacks = hc.stacks.list(**kwargs) + stacks = list(stacks) + for stk in stacks: + if hasattr(stk, 'project'): + fields.append('project') + break utils.print_list(stacks, fields, sortby_index=sortby_index) |