Scott Baker | b63ea79 | 2016-08-11 10:24:48 -0700 | [diff] [blame] | 1 | |
| 2 | def handle(instance): |
| 3 | from core.models import Controller, ControllerSlice, ControllerNetwork, NetworkSlice |
| 4 | |
| 5 | networks = [ns.network for ns in NetworkSlice.objects.filter(slice=instance.slice)] |
| 6 | controller_networks = ControllerNetwork.objects.filter(network__in=networks, |
| 7 | controller=instance.node.site_deployment.controller) |
| 8 | |
| 9 | for cn in controller_networks: |
| 10 | if (cn.lazy_blocked): |
| 11 | cn.lazy_blocked=False |
| 12 | cn.backend_register = '{}' |
| 13 | cn.save() |