1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Merge pull request #542 from catborise/master

add description to snapshots. Stress out live snapshot risks
This commit is contained in:
catborise 2022-09-26 11:03:05 +03:00 committed by GitHub
commit 7b33f511cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 11 deletions

View file

@ -816,7 +816,8 @@ def snapshot(request, pk):
if allow_admin_or_not_template and request.user.has_perm("instances.snapshot_instances"):
name = request.POST.get("name", "")
instance.proxy.create_snapshot(name)
desc = request.POST.get("description", "")
instance.proxy.create_snapshot(name, desc)
msg = _("Create snapshot: %(snap)s") % {"snap": name}
addlogmsg(request.user.username, instance.compute.name, instance.name, msg)
return redirect(request.META.get("HTTP_REFERER") + "#managesnapshot")