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 @@
#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)