From d9c484b72fc7385e17917f25f113f44f7548d1d8 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Mon, 22 Dec 2014 01:38:00 -0500 Subject: [PATCH] Bug fix. Networks were not automaticaly getting added to slices. --- planetstack/model_policies/model_policy_Slice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.47.0