From 37b5093e13695cd94114f945abb5d7d72a03a381 Mon Sep 17 00:00:00 2001 From: catborise Date: Fri, 28 Sep 2018 13:45:56 +0300 Subject: [PATCH] convert default_image_owner to seperate guid and uid --- vrtManager/storage.py | 4 ++-- webvirtcloud/settings.py.template | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/vrtManager/storage.py b/vrtManager/storage.py index 21a1a7a..6fec0e0 100644 --- a/vrtManager/storage.py +++ b/vrtManager/storage.py @@ -233,7 +233,7 @@ class wvmStorage(wvmConnect): - """ % (name, size, alloc, vol_fmt, owner, owner) + """ % (name, size, alloc, vol_fmt, owner['uid'], owner['guid']) self._createXML(xml, metadata) def clone_volume(self, name, target_file, vol_fmt=None, metadata=False, owner=owner): @@ -261,5 +261,5 @@ class wvmStorage(wvmConnect): - """ % (target_file, vol_fmt, owner,owner) + """ % (target_file, vol_fmt, owner['uid'],owner['guid']) self._createXMLFrom(xml, vol, metadata) diff --git a/webvirtcloud/settings.py.template b/webvirtcloud/settings.py.template index 1e4ff8e..f99681d 100644 --- a/webvirtcloud/settings.py.template +++ b/webvirtcloud/settings.py.template @@ -19,7 +19,6 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'dashboards', 'computes', 'console', 'networks', @@ -153,5 +152,5 @@ VIEW_INSTANCES_LIST_STYLE = 'grouped' INSTANCE_VOLUME_DEFAULT_FORMAT = 'qcow2' INSTANCE_VOLUME_DEFAULT_BUS = 'virtio' INSTANCE_VOLUME_DEFAULT_CACHE = 'directsync' -# up to os, 0=root, 107=qemu or libvirt-bin(for ubuntu) -INSTANCE_VOLUME_DEFAULT_OWNER = 0 +# [uid,guid] values are up to os, 0=root, 107=qemu or libvirt-bin(for ubuntu) +INSTANCE_VOLUME_DEFAULT_OWNER = [107, 107] \ No newline at end of file