From cf2eed697732fec81523343d9b82b34096d1bedf Mon Sep 17 00:00:00 2001 From: Michael Still Date: Tue, 27 Nov 2012 17:31:18 +1100 Subject: Respect the base_dir_name flag in imagebackend. Resolves bug 1083447. Change-Id: Ie23c9f46bbbcd2b87dfa7b3ac767ad7c4a4c6397 --- nova/virt/libvirt/imagebackend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova') 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) -- cgit