Sapan Bhatia | 51a804c | 2017-05-03 17:24:37 +0200 | [diff] [blame] | 1 | def model_policy_veg(pk): |
2 | # TODO: this should be made in to a real model_policy | ||||
3 | with transaction.atomic(): | ||||
4 | veg = VEGTenant.objects.select_for_update().filter(pk=pk) | ||||
5 | if not veg: | ||||
6 | return | ||||
7 | veg = veg[0] | ||||
8 | veg.manage_container() | ||||
9 | veg.manage_vrouter() | ||||
10 | veg.cleanup_orphans() | ||||
11 | |||||
12 |