From: Sapan Bhatia Date: Mon, 22 Dec 2014 06:38:00 +0000 (-0500) Subject: Bug fix. Networks were not automaticaly getting added to slices. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d9c484b72fc7385e17917f25f113f44f7548d1d8;p=plstackapi.git Bug fix. Networks were not automaticaly getting added to slices. --- diff --git a/planetstack/model_policies/model_policy_Slice.py b/planetstack/model_policies/model_policy_Slice.py index 46ca9b8..659c139 100644 --- a/planetstack/model_policies/model_policy_Slice.py +++ b/planetstack/model_policies/model_policy_Slice.py @@ -1,5 +1,7 @@ def handle(slice): + import pdb + pdb.set_trace() from core.models import Controller, ControllerSiteDeployments, ControllerSlices,Controller,Network,NetworkSlice,NetworkTemplate from collections import defaultdict ctrl_site_deployments = ControllerSiteDeployments.objects.all() @@ -14,7 +16,7 @@ def handle(slice): #expected_controllers = site_deploy_lookup[slice.site] all_controllers = Controller.objects.all() - for expected_controller in controllers: + for expected_controller in all_controllers: if slice not in slice_deploy_lookup or \ expected_controller not in slice_deploy_lookup[slice]: sd = ControllerSlices(slice=slice, controller=expected_controller)