Fixed a bug when the Heat template was not deleted on Env deletion

API now passes an empty 'applications' list as part of environment instead
of a Null-environment

Also, the incomplete 'destroy' section of the Instance class has been removed
This needs to be fixed later, however the current version is fine, as the stack
will be properly deleted by the environment deploy code

Change-Id: I176d5026ade2b0092381b0b2f9bb6273ec21abf7
Closes-bug: #1308910
This commit is contained in:
Alexander Tivelkov 2014-05-05 18:08:15 +04:00
parent a671a8b4f3
commit eb203157a8
2 changed files with 3 additions and 11 deletions

View File

@ -88,16 +88,6 @@ Workflow:
- $assignFip: false
- $net.addHostToNetwork($, $assignFip)
destroy:
Body:
- $template: $.environment.stack.current()
- $patchBlock:
op: remove
path: format('/Resources/{0}', $.name)
- $template: patch($template, $patchBlock)
- $.environment.stack.setTemplate($template)
- $.environment.stack.push()
- $.environment.instanceNotifier.untrackApplication($this)
prepareUserData:
Body:

View File

@ -130,7 +130,9 @@ class EnvironmentServices(object):
#preparing data for removal from conductor
env = environment.description
env['Objects'] = None
if 'Objects' in env and 'services' in env['Objects']:
env['Objects'].pop('services')
env['applications'] = []
data = {
'model': env,