blob: 2f1f20341db0bf1d6855e8d01312be55f973c229 [file] [log] [blame]
Scott Bakeraf599eb2017-03-21 12:43:26 -07001from synchronizers.new_base.modelaccessor import *
Scott Bakerb63ea792016-08-11 10:24:48 -07002
3def handle(instance):
Scott Bakeraf599eb2017-03-21 12:43:26 -07004 networks = [ns.network for ns in NetworkSlice.objects.filter(slice_id=instance.slice.id)]
5 network_ids = [x.id for x in networks]
6 controller_networks = ControllerNetwork.objects.filter(controller_id=instance.node.site_deployment.controller.id)
7 controller_networks = [x for x in controller_networks if x.network_id in network_ids]
Scott Bakerb63ea792016-08-11 10:24:48 -07008
9 for cn in controller_networks:
10 if (cn.lazy_blocked):
11 cn.lazy_blocked=False
12 cn.backend_register = '{}'
13 cn.save()