From 3cffa6e5053c21e0d8158126788b9fe1d7663d7a Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 4 Apr 2019 16:04:34 +0300 Subject: [PATCH] Fix disk clone xml for proper disk properties --- instances/views.py | 4 ---- vrtManager/instance.py | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/instances/views.py b/instances/views.py index 3262d2a..ecea01b 100644 --- a/instances/views.py +++ b/instances/views.py @@ -476,11 +476,7 @@ def instance(request, compute_id, vname): path = connCreate.create_volume(storage, name, size, format, meta_prealloc, default_owner) conn.attach_disk(path, target, subdriver=format, cache=cache, targetbus=bus) -<<<<<<< HEAD - msg = _('Attach new disk: ' + target) -======= msg = _('Attach new disk {} ({})'.format(name, format)) ->>>>>>> 13ce824... wvmStorage.create_volume, wvmCreate.create_volume image naming respects image/volume format (qcow,qcow2) addlogmsg(request.user.username, instance.name, msg) return HttpResponseRedirect(request.get_full_path() + '#disks') diff --git a/vrtManager/instance.py b/vrtManager/instance.py index 1984195..49d6419 100644 --- a/vrtManager/instance.py +++ b/vrtManager/instance.py @@ -871,18 +871,19 @@ class wvmInstance(wvmConnect): 0 + + %s + %s + 0644 + + + 1.1 + + + - - %s - %s - 0644 - - - 1.1 - - - """ % (target_file, vol_format, owner['uid'], owner['guid']) + stg = vol.storagePoolLookupByVolume() stg.createXMLFrom(vol_clone_xml, vol, meta_prealloc)