summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Still <michael.still@canonical.com>2012-11-27 17:31:18 +1100
committerMichael Still <michael.still@canonical.com>2012-11-27 18:14:24 +1100
commitcf2eed697732fec81523343d9b82b34096d1bedf (patch)
tree0b769540867030ee762eebef16ef0f546c0a6d5e
parent5752b4a7bf3c9bbf6dcbbd995fb24bf5e06bc5e3 (diff)
Respect the base_dir_name flag in imagebackend.
Resolves bug 1083447. Change-Id: Ie23c9f46bbbcd2b87dfa7b3ac767ad7c4a4c6397
-rw-r--r--nova/virt/libvirt/imagebackend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py
index 8f1e87680..a77e9e74f 100644
--- a/nova/virt/libvirt/imagebackend.py
+++ b/nova/virt/libvirt/imagebackend.py
@@ -47,6 +47,7 @@ __imagebackend_opts = [
CONF = cfg.CONF
CONF.register_opts(__imagebackend_opts)
+CONF.import_opt('base_dir_name', 'nova.virt.libvirt.imagecache')
class Image(object):
@@ -120,7 +121,7 @@ class Image(object):
fetch_func(target=target, *args, **kwargs)
if not os.path.exists(self.path):
- base_dir = os.path.join(CONF.instances_path, '_base')
+ base_dir = os.path.join(CONF.instances_path, CONF.base_dir_name)
if not os.path.exists(base_dir):
fileutils.ensure_tree(base_dir)
base = os.path.join(base_dir, filename)