1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

add log message to attaching disk

This commit is contained in:
catborise 2018-10-25 09:55:57 +03:00
parent 82c87f82bc
commit 1196fb38c9

View file

@ -471,10 +471,10 @@ def instance(request, compute_id, vname):
cache = request.POST.get('cache', default_cache) cache = request.POST.get('cache', default_cache)
connCreate = wvmStorage(compute.hostname, connCreate = wvmStorage(compute.hostname,
compute.login, compute.login,
compute.password, compute.password,
compute.type, compute.type,
storage) storage)
format = connCreate.get_volume_type(name) format = connCreate.get_volume_type(name)
path = connCreate.get_target_path() path = connCreate.get_target_path()
@ -482,6 +482,8 @@ def instance(request, compute_id, vname):
source = path + "/" + name; source = path + "/" + name;
conn.attach_disk(source, target, subdriver=format, cache=cache, targetbus=bus) conn.attach_disk(source, target, subdriver=format, cache=cache, targetbus=bus)
msg = _('Attach Existing disk')
addlogmsg(request.user.username, instance.name, msg)
return HttpResponseRedirect(request.get_full_path() + '#disks') return HttpResponseRedirect(request.get_full_path() + '#disks')
if 'delvolume' in request.POST and (request.user.is_superuser or userinstance.is_change): if 'delvolume' in request.POST and (request.user.is_superuser or userinstance.is_change):