Fixed row deletion for deleted stack
Now heat returns stack with "stack_status == 'DELETE_COMPLETE'" for deleted stack. Added corresponding check to ajax handler. HTTPNotFound is not used anymore and deprecated. Removed except block for it. Added raise to generic "except Exception" block to prevent internal errors inside horizon. Change-Id: Ia9cfd975790872918ba25c347319003ddc3468fa Closes-Bug: #1367758
This commit is contained in:
parent
fd6e194463
commit
51024cc13b
@ -83,13 +83,17 @@ class StacksUpdateRow(tables.Row):
|
|||||||
|
|
||||||
def get_data(self, request, stack_id):
|
def get_data(self, request, stack_id):
|
||||||
try:
|
try:
|
||||||
return api.heat.stack_get(request, stack_id)
|
stack = api.heat.stack_get(request, stack_id)
|
||||||
except exc.HTTPNotFound:
|
if stack.stack_status == 'DELETE_COMPLETE':
|
||||||
# returning 404 to the ajax call removes the
|
# returning 404 to the ajax call removes the
|
||||||
# row from the table on the ui
|
# row from the table on the ui
|
||||||
raise Http404
|
raise Http404
|
||||||
|
return stack
|
||||||
|
except Http404:
|
||||||
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
messages.error(request, e)
|
messages.error(request, e)
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
class StacksTable(tables.DataTable):
|
class StacksTable(tables.DataTable):
|
||||||
|
Loading…
Reference in New Issue
Block a user