blob: 2f1f20341db0bf1d6855e8d01312be55f973c229 [file] [log] [blame]
from synchronizers.new_base.modelaccessor import *
def handle(instance):
networks = [ns.network for ns in NetworkSlice.objects.filter(slice_id=instance.slice.id)]
network_ids = [x.id for x in networks]
controller_networks = ControllerNetwork.objects.filter(controller_id=instance.node.site_deployment.controller.id)
controller_networks = [x for x in controller_networks if x.network_id in network_ids]
for cn in controller_networks:
if (cn.lazy_blocked):
cn.lazy_blocked=False
cn.backend_register = '{}'
cn.save()