| Sapan Bhatia | 46482ee | 2017-04-21 17:59:48 +0200 | [diff] [blame] | 1 | def 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 | |||||