blob: 767a903790eac88789c8e536b96e41159c026b22 [file] [log] [blame]
Sapan Bhatia46482ee2017-04-21 17:59:48 +02001def model_policy_vcpe(pk):
2 # TODO: this should be made in to a real model_policy
3 with transaction.atomic():
4 vcpe = VSGTenant.objects.select_for_update().filter(pk=pk)
5 if not vcpe:
6 return
7 vcpe = vcpe[0]
8 vcpe.manage_container()
9 vcpe.manage_vrouter()
10 vcpe.cleanup_orphans()
11