mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
feat(vmbackups): a schedule of every VM with a tag
A backup schedule backs up a compute's VMs, chosen VMs, or now every VM with a tag: those that have it at each run, templates left out, so a VM given the tag is backed up from the next day on. The form checks the target's pools on the hosts of the tag's VMs now; a VM tagged later on a host without one fails its run with that reason, as a compute's new VM does. The schedules list says "VMs tagged prod". A tag a schedule uses is not deleted: the Tags page says which schedules back up its VMs.
This commit is contained in:
parent
a492031d12
commit
f8cb6f1e0f
15 changed files with 157 additions and 46 deletions
|
|
@ -71,6 +71,6 @@ def vm_tab(instance, user):
|
|||
except libvirtError as err:
|
||||
problem = str(err)
|
||||
schedules = [] if owner else BackupPolicy.objects.filter(
|
||||
Q(instances=instance) | Q(compute=instance.compute_id)).distinct().order_by("name")
|
||||
Q(instances=instance) | Q(compute=instance.compute_id) | Q(tag__instances=instance)).distinct().order_by("name")
|
||||
return {"rows": rows, "targets": targets, "problem": problem, "schedules": schedules,
|
||||
"pending_deletes": pending_deletes()}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue