Fix describe and delete
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
8a6eb03d62
commit
d9ab5bdad4
|
@ -70,10 +70,9 @@ class StackController(object):
|
||||||
stack_list = rpc.call(con, 'engine',
|
stack_list = rpc.call(con, 'engine',
|
||||||
{'method': 'show_stack',
|
{'method': 'show_stack',
|
||||||
'args': {'stack_name': req.params['StackName']}})
|
'args': {'stack_name': req.params['StackName']}})
|
||||||
stack_list = c.show_stack(req.params['StackName'])
|
|
||||||
res = {'DescribeStacksResult': {'Stacks': [] } }
|
res = {'DescribeStacksResult': {'Stacks': [] } }
|
||||||
stacks = res['DescribeStacksResult']['Stacks']
|
stacks = res['DescribeStacksResult']['Stacks']
|
||||||
for s in stack_list:
|
for s in stack_list['stacks']:
|
||||||
mem = {'member': s}
|
mem = {'member': s}
|
||||||
stacks.append(mem)
|
stacks.append(mem)
|
||||||
|
|
||||||
|
@ -157,13 +156,18 @@ class StackController(object):
|
||||||
"""
|
"""
|
||||||
Returns the following information for all stacks:
|
Returns the following information for all stacks:
|
||||||
"""
|
"""
|
||||||
logger.info('in api delete ')
|
|
||||||
con = context.get_admin_context()
|
con = context.get_admin_context()
|
||||||
|
|
||||||
return rpc.call(con, 'engine',
|
res = rpc.call(con, 'engine',
|
||||||
{'method': 'delete_stack',
|
{'method': 'delete_stack',
|
||||||
'args': {'stack_name': req.params['StackName']}})
|
'args': {'stack_name': req.params['StackName']}})
|
||||||
|
|
||||||
|
if res == None:
|
||||||
|
return {'DeleteStackResult': ''}
|
||||||
|
else:
|
||||||
|
return {'DeleteStackResult': res['Error']}
|
||||||
|
|
||||||
|
|
||||||
def events_list(self, req):
|
def events_list(self, req):
|
||||||
"""
|
"""
|
||||||
Returns the following information for all stacks:
|
Returns the following information for all stacks:
|
||||||
|
|
|
@ -84,10 +84,6 @@ class EngineManager(manager.Manager):
|
||||||
mem['TemplateDescription'] = 'No description'
|
mem['TemplateDescription'] = 'No description'
|
||||||
mem['StackStatus'] = 'unknown'
|
mem['StackStatus'] = 'unknown'
|
||||||
res['stacks'].append(mem)
|
res['stacks'].append(mem)
|
||||||
else:
|
|
||||||
#return webob.exc.HTTPNotFound('No stack by that name')
|
|
||||||
#TODO
|
|
||||||
pass
|
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue