From a317ea56b98036e88ecf9eb00b0d184924819c6e Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 11 Dec 2012 07:43:45 +0000 Subject: Move cache_images to nova.virt.xenapi.vm_utils While the cache_images option sounds hypervisor agnostic, it is actually xenapi specific. Move it into the xenapi driver makes this much more clear. blueprint: scope-config-opts Change-Id: I5c86159f638fc30ee0158a249c91cf29d46cdbb5 --- nova/config.py | 6 ------ nova/virt/xenapi/vm_utils.py | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nova/config.py b/nova/config.py index 8996400d0..28b98f360 100644 --- a/nova/config.py +++ b/nova/config.py @@ -249,12 +249,6 @@ global_opts = [ cfg.ListOpt('isolated_hosts', default=[], help='Host reserved for specific images'), - cfg.StrOpt('cache_images', - default='all', - help='Cache glance images locally. `all` will cache all' - ' images, `some` will only cache images that have the' - ' image_property `cache_in_nova=True`, and `none` turns' - ' off caching entirely'), cfg.BoolOpt('use_cow_images', default=True, help='Whether to use cow images'), diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index bf9687722..b1b4ed69f 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -52,6 +52,12 @@ from nova.virt.xenapi import volume_utils LOG = logging.getLogger(__name__) xenapi_vm_utils_opts = [ + cfg.StrOpt('cache_images', + default='all', + help='Cache glance images locally. `all` will cache all' + ' images, `some` will only cache images that have the' + ' image_property `cache_in_nova=True`, and `none` turns' + ' off caching entirely'), cfg.StrOpt('default_os_type', default='linux', help='Default OS type'), @@ -116,7 +122,6 @@ xenapi_vm_utils_opts = [ CONF = cfg.CONF CONF.register_opts(xenapi_vm_utils_opts) -CONF.import_opt('cache_images', 'nova.config') CONF.import_opt('default_ephemeral_format', 'nova.config') CONF.import_opt('glance_num_retries', 'nova.config') CONF.import_opt('use_cow_images', 'nova.config') -- cgit