Client should support stack-list for global scope
heat supports to get the stacks for global scope, heat-client should supports too. Change-Id: I289e9305ad4c695e4d3ee2d9a2c7ced216bb8166 Closes-Bug: #1322094
This commit is contained in:
parent
94d10f9518
commit
e7da3427e2
|
@ -397,6 +397,7 @@ class ShellTestUserPass(ShellBase):
|
|||
'limit': 2,
|
||||
'status': ['COMPLETE', 'FAILED'],
|
||||
'marker': 'fake_id',
|
||||
'global_tenant': True
|
||||
}, True)
|
||||
fakes.script_heat_list(expected_url)
|
||||
|
||||
|
@ -406,7 +407,8 @@ class ShellTestUserPass(ShellBase):
|
|||
' --limit 2'
|
||||
' --marker fake_id'
|
||||
' --filters=status=COMPLETE'
|
||||
' --filters=status=FAILED')
|
||||
' --filters=status=FAILED'
|
||||
' --global-tenant')
|
||||
|
||||
required = [
|
||||
'teststack',
|
||||
|
|
|
@ -402,13 +402,19 @@ def do_list(hc, args=None):
|
|||
help='Limit the number of stacks returned.')
|
||||
@utils.arg('-m', '--marker', metavar='<ID>',
|
||||
help='Only return stacks that appear after the given stack ID.')
|
||||
@utils.arg('-g', '--global-tenant',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Display stacks from all tenants. Operation only authorized '
|
||||
'for users who match the policy in heat\'s policy.json.')
|
||||
def do_stack_list(hc, args=None):
|
||||
'''List the user's stacks.'''
|
||||
kwargs = {}
|
||||
if args:
|
||||
kwargs = {'limit': args.limit,
|
||||
'marker': args.marker,
|
||||
'filters': utils.format_parameters(args.filters)}
|
||||
'filters': utils.format_parameters(args.filters),
|
||||
'global_tenant': args.global_tenant}
|
||||
|
||||
stacks = hc.stacks.list(**kwargs)
|
||||
fields = ['id', 'stack_name', 'stack_status', 'creation_time']
|
||||
|
|
Loading…
Reference in New Issue