From 7a488ce8b77085fd29328dea72320345a930b875 Mon Sep 17 00:00:00 2001 From: micafer Date: Fri, 12 Feb 2016 13:24:13 +0100 Subject: [PATCH] Minor change to avoid recontextualize if no VMs are added --- IM/InfrastructureManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IM/InfrastructureManager.py b/IM/InfrastructureManager.py index d0cdbcd74..8e808c735 100755 --- a/IM/InfrastructureManager.py +++ b/IM/InfrastructureManager.py @@ -535,7 +535,7 @@ def AddResource(inf_id, radl_data, auth, context = True, failed_clouds = []): InfrastructureManager.logger.info("VMs %s successfully added to Inf id %s" % (new_vms, sel_inf.id)) # Let's contextualize! - if context: + if context and new_vms: sel_inf.Contextualize(auth) return [vm.im_id for vm in new_vms]