1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 01:16:10 +00:00

fix(computes): a VM that returns gets its protection, schedules and backups back

A VM that vanished from its compute, or whose compute was deleted and added
again, came back with its owners and tags only: it was no longer protected,
its schedules no longer backed it up, and its backups stayed unlinked, so its
Backups tab no longer listed them and retention left them for good. The
Removed VMs record now keeps its protection, its schedules and its own
backups (not those of a copy under the same UUID), and gives them back.
Turning protection on or off waits for the ownership step, so a VM dropped
from its host's list meanwhile is not told protected.
This commit is contained in:
catborise 2026-11-20 07:55:26 +03:00
parent 5c7687c60d
commit dc5b1dbb2a
14 changed files with 251 additions and 138 deletions

View file

@ -53,7 +53,7 @@ class TombstoneTests(TestCase):
def test_a_get_only_asks_for_confirmation(self):
response = self.client.get(reverse("admin:tombstone_delete", args=[self.tombstone.pk]))
self.assertContains(response, "ts-vm")
self.assertContains(response, "Its owners and tags no longer come back if its UUID shows up again.")
self.assertContains(response, "Its owners, tags, protection and schedules no longer come back if its UUID shows up again, nor are its backups linked to it again.")
self.assertTrue(InstanceTombstone.objects.exists())
def test_a_post_removes_it(self):