When removing an empty res also remove refs to it in depends_on

Change-Id: I4cad4f29d0f9153eb966370089663b419a53dfaf
This commit is contained in:
Mathieu Velten 2017-08-21 11:21:37 +02:00
parent 0640edfa3b
commit eb6354ab6b
2 changed files with 5 additions and 2 deletions

View File

@ -390,6 +390,11 @@ class TranslateNodeTemplates(object):
for resource in to_remove:
self.hot_resources.remove(resource)
for resource in self.hot_resources:
for removed_resource in to_remove:
if removed_resource in resource.depends_on:
resource.depends_on.remove(removed_resource)
return self.hot_resources
def translate_param_value(self, param_value, resource):

View File

@ -16,8 +16,6 @@ resources:
get_resource: myapp_configure_config
server:
get_resource: server
depends_on:
- mysql_database
server:
type: OS::Nova::Server
properties: