From 1196fb38c9ce3ce4d31ea8cbb63a7368fda0333d Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 25 Oct 2018 09:55:57 +0300 Subject: [PATCH] add log message to attaching disk --- instances/views.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/instances/views.py b/instances/views.py index 86a5608..b955b6a 100644 --- a/instances/views.py +++ b/instances/views.py @@ -471,10 +471,10 @@ def instance(request, compute_id, vname): cache = request.POST.get('cache', default_cache) connCreate = wvmStorage(compute.hostname, - compute.login, - compute.password, - compute.type, - storage) + compute.login, + compute.password, + compute.type, + storage) format = connCreate.get_volume_type(name) path = connCreate.get_target_path() @@ -482,6 +482,8 @@ def instance(request, compute_id, vname): source = path + "/" + name; 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') if 'delvolume' in request.POST and (request.user.is_superuser or userinstance.is_change):